]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgContext.h
Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / tools / lldb-mi / MICmdArgContext.h
1 //===-- MICmdArgContext.h ---------------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8
9 #pragma once
10
11 // In-house headers:
12 #include "MIUtilString.h"
13
14 //++
15 //============================================================================
16 // Details: MI common code class. Command arguments and options string. Holds
17 //          the context string.
18 //          Based on the Interpreter pattern.
19 //--
20 class CMICmdArgContext {
21   // Methods:
22 public:
23   /* ctor */ CMICmdArgContext();
24   /* ctor */ CMICmdArgContext(const CMIUtilString &vrCmdLineArgsRaw);
25   //
26   const CMIUtilString &GetArgsLeftToParse() const;
27   size_t GetNumberArgsPresent() const;
28   CMIUtilString::VecString_t GetArgs() const;
29   bool IsEmpty() const;
30   bool RemoveArg(const CMIUtilString &vArg);
31   bool RemoveArgAtPos(const CMIUtilString &vArg, size_t nArgIndex);
32   //
33   CMICmdArgContext &operator=(const CMICmdArgContext &vOther);
34
35   // Overridden:
36 public:
37   // From CMIUtilString
38   /* dtor */ virtual ~CMICmdArgContext();
39
40   // Attributes:
41 private:
42   CMIUtilString m_strCmdArgsAndOptions;
43 };