]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValOptionShort.h
Update LLDB snapshot to upstream r225923 (git 2b588ecd)
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / 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 //++
11 // File:        MICmdArgValOptionShort.h
12 //
13 // Overview:    CMICmdArgValOptionShort interface.
14 //
15 // Environment: Compilers:  Visual C++ 12.
16 //                          gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
17 //              Libraries:  See MIReadmetxt.
18 //
19 // Copyright:   None.
20 //--
21
22 #pragma once
23
24 // In-house headers:
25 #include "MICmdArgValOptionLong.h"
26
27 // Declarations:
28 class CMICmdArgContext;
29 class CMIUtilString;
30
31 //++ ============================================================================
32 // Details: MI common code class. Command argument class. Arguments object
33 //          needing specialization derived from the CMICmdArgValOptionLong class.
34 //          An argument knows what type of argument it is and how it is to
35 //          interpret the options (context) string to find and validate a matching
36 //          argument and so extract a value from it.
37 //          If *this argument has expected options following it the option objects
38 //          created to hold each of those option's values belong to *this argument
39 //          object and so are deleted when *this object goes out of scope.
40 //          Based on the Interpreter pattern.
41 // Gotchas: None.
42 // Authors: Illya Rudkin 16/04/2014.
43 // Changes: None.
44 //--
45 class CMICmdArgValOptionShort : public CMICmdArgValOptionLong
46 {
47     // Methods:
48   public:
49     /* ctor */ CMICmdArgValOptionShort(void);
50     /* ctor */ CMICmdArgValOptionShort(const CMIUtilString &vrArgName, const bool vbMandatory, const bool vbHandleByCmd);
51     /* ctor */ CMICmdArgValOptionShort(const CMIUtilString &vrArgName, const bool vbMandatory, const bool vbHandleByCmd,
52                                        const ArgValType_e veType, const MIuint vnExpectingNOptions);
53     //
54     bool IsArgShortOption(const CMIUtilString &vrTxt) const;
55
56     // Overridden:
57   public:
58     // From CMICmdArgValBase
59     /* dtor */ virtual ~CMICmdArgValOptionShort(void);
60
61     // Overridden:
62   private:
63     // From CMICmdArgValOptionLong
64     virtual bool IsArgOptionCorrect(const CMIUtilString &vrTxt) const;
65     virtual bool ArgNameMatch(const CMIUtilString &vrTxt) const;
66 };