]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - tools/lldb-mi/MICmdArgValOptionShort.h
Vendor import of stripped lldb trunk r256633:
[FreeBSD/FreeBSD.git] / tools / lldb-mi / MICmdArgValOptionShort.h
1 //===-- MICmdArgValOptionShort.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 "MICmdArgValOptionLong.h"
14
15 // Declarations:
16 class CMICmdArgContext;
17 class CMIUtilString;
18
19 //++ ============================================================================
20 // Details: MI common code class. Command argument class. Arguments object
21 //          needing specialization derived from the CMICmdArgValOptionLong class.
22 //          An argument knows what type of argument it is and how it is to
23 //          interpret the options (context) string to find and validate a matching
24 //          argument and so extract a value from it.
25 //          If *this argument has expected options following it the option objects
26 //          created to hold each of those option's values belong to *this argument
27 //          object and so are deleted when *this object goes out of scope.
28 //          Based on the Interpreter pattern.
29 //--
30 class CMICmdArgValOptionShort : public CMICmdArgValOptionLong
31 {
32     // Methods:
33   public:
34     /* ctor */ CMICmdArgValOptionShort();
35     /* ctor */ CMICmdArgValOptionShort(const CMIUtilString &vrArgName, const bool vbMandatory, const bool vbHandleByCmd);
36     /* ctor */ CMICmdArgValOptionShort(const CMIUtilString &vrArgName, const bool vbMandatory, const bool vbHandleByCmd,
37                                        const ArgValType_e veType, const MIuint vnExpectingNOptions);
38     //
39     bool IsArgShortOption(const CMIUtilString &vrTxt) const;
40
41     // Overridden:
42   public:
43     // From CMICmdArgValBase
44     /* dtor */ ~CMICmdArgValOptionShort() override;
45
46     // Overridden:
47   private:
48     // From CMICmdArgValOptionLong
49     bool IsArgOptionCorrect(const CMIUtilString &vrTxt) const override;
50     bool ArgNameMatch(const CMIUtilString &vrTxt) const override;
51 };