]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/tools/lldb-mi/MICmdArgValOptionShort.h
Merge ^/head r275118 through r275209.
[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, const ArgValType_e veType, const MIuint vnExpectingNOptions );
52         //
53         bool    IsArgShortOption( const CMIUtilString & vrTxt ) const;
54         
55 // Overridden:
56 public:
57         // From CMICmdArgValBase
58         /* dtor */ virtual ~CMICmdArgValOptionShort( void );
59
60 // Overridden:
61 private:
62         // From CMICmdArgValOptionLong
63         virtual bool IsArgOptionCorrect( const CMIUtilString & vrTxt ) const;
64         virtual bool ArgNameMatch( const CMIUtilString & vrTxt ) const;
65 };