]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValueUUID.h
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
[FreeBSD/releng/10.2.git] / contrib / llvm / tools / lldb / include / lldb / Interpreter / OptionValueUUID.h
1 //===-- OptionValueUUID.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_OptionValueUUID_h_
11 #define liblldb_OptionValueUUID_h_
12
13 // C Includes
14 // C++ Includes
15 // Other libraries and framework includes
16 // Project includes
17 #include "lldb/Core/UUID.h"
18 #include "lldb/Interpreter/OptionValue.h"
19
20 namespace lldb_private {
21
22 class OptionValueUUID : public OptionValue
23 {
24 public:
25     OptionValueUUID () :
26         OptionValue(),
27         m_uuid ()
28     {
29     }
30     
31     OptionValueUUID (const UUID &uuid) :
32         OptionValue(),
33         m_uuid (uuid)
34     {
35     }
36     
37     virtual 
38     ~OptionValueUUID()
39     {
40     }
41     
42     //---------------------------------------------------------------------
43     // Virtual subclass pure virtual overrides
44     //---------------------------------------------------------------------
45     
46     virtual OptionValue::Type
47     GetType () const
48     {
49         return eTypeUUID;
50     }
51     
52     virtual void
53     DumpValue (const ExecutionContext *exe_ctx, Stream &strm, uint32_t dump_mask);
54     
55     virtual Error
56     SetValueFromCString (const char *value,
57                          VarSetOperationType op = eVarSetOperationAssign);
58     
59     virtual bool
60     Clear ()
61     {
62         m_uuid.Clear();
63         m_value_was_set = false;
64         return true;
65     }
66     
67     virtual lldb::OptionValueSP
68     DeepCopy () const;
69     
70     //---------------------------------------------------------------------
71     // Subclass specific functions
72     //---------------------------------------------------------------------
73     
74     UUID &
75     GetCurrentValue()
76     {
77         return m_uuid;
78     }
79     
80     const UUID &
81     GetCurrentValue() const
82     {
83         return m_uuid;
84     }
85     
86     void
87     SetCurrentValue (const UUID &value)
88     {
89         m_uuid = value;
90     }
91     
92     virtual size_t
93     AutoComplete (CommandInterpreter &interpreter,
94                   const char *s,
95                   int match_start_point,
96                   int max_return_elements,
97                   bool &word_complete,
98                   StringList &matches);
99
100 protected:
101     UUID m_uuid;
102 };
103
104 } // namespace lldb_private
105
106 #endif  // liblldb_OptionValueUUID_h_