]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionGroupString.h
Merge ^/head r303250 through r308226.
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / include / lldb / Interpreter / OptionGroupString.h
1 //===-- OptionGroupString.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 #ifndef liblldb_OptionGroupString_h_
11 #define liblldb_OptionGroupString_h_
12
13 // C Includes
14 // C++ Includes
15 // Other libraries and framework includes
16 // Project includes
17 #include "lldb/Interpreter/Options.h"
18 #include "lldb/Interpreter/OptionValueString.h"
19
20 namespace lldb_private {
21     //-------------------------------------------------------------------------
22     // OptionGroupString
23     //-------------------------------------------------------------------------
24     
25     class OptionGroupString : public OptionGroup
26     {
27     public:
28         OptionGroupString (uint32_t usage_mask,
29                            bool required,
30                            const char *long_option, 
31                            int short_option,
32                            uint32_t completion_type,
33                            lldb::CommandArgumentType argument_type,
34                            const char *usage_text,
35                            const char *default_value);
36         
37         ~OptionGroupString() override;
38
39         uint32_t
40         GetNumDefinitions() override
41         {
42             return 1;
43         }
44         
45         const OptionDefinition*
46         GetDefinitions() override
47         {
48             return &m_option_definition;
49         }
50         
51         Error
52         SetOptionValue(CommandInterpreter &interpreter,
53                        uint32_t option_idx,
54                        const char *option_value) override;
55         
56         void
57         OptionParsingStarting(CommandInterpreter &interpreter) override;
58         
59         OptionValueString &
60         GetOptionValue ()
61         {
62             return m_value;
63         }
64         
65         const OptionValueString &
66         GetOptionValue () const
67         {
68             return m_value;
69         }
70         
71     protected:
72         OptionValueString m_value;
73         OptionDefinition m_option_definition;
74     };
75     
76 } // namespace lldb_private
77
78 #endif // liblldb_OptionGroupString_h_