]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgContext.h
MFV r316693:
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / tools / lldb-mi / MICmdArgContext.h
1 //===-- MICmdArgContext.h ---------------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #pragma once
11
12 // In-house headers:
13 #include "MIUtilString.h"
14
15 //++
16 //============================================================================
17 // Details: MI common code class. Command arguments and options string. Holds
18 //          the context string.
19 //          Based on the Interpreter pattern.
20 //--
21 class CMICmdArgContext {
22   // Methods:
23 public:
24   /* ctor */ CMICmdArgContext();
25   /* ctor */ CMICmdArgContext(const CMIUtilString &vrCmdLineArgsRaw);
26   //
27   const CMIUtilString &GetArgsLeftToParse() const;
28   size_t GetNumberArgsPresent() const;
29   CMIUtilString::VecString_t GetArgs() const;
30   bool IsEmpty() const;
31   bool RemoveArg(const CMIUtilString &vArg);
32   bool RemoveArgAtPos(const CMIUtilString &vArg, size_t nArgIndex);
33   //
34   CMICmdArgContext &operator=(const CMICmdArgContext &vOther);
35
36   // Overridden:
37 public:
38   // From CMIUtilString
39   /* dtor */ virtual ~CMICmdArgContext();
40
41   // Attributes:
42 private:
43   CMIUtilString m_strCmdArgsAndOptions;
44 };