]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValueFileSpecList.h
MFV r308265: Update tzdata to 2016i.
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / include / lldb / Interpreter / OptionValueFileSpecList.h
1 //===-- OptionValueFileSpecList.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_OptionValueFileSpecList_h_
11 #define liblldb_OptionValueFileSpecList_h_
12
13 // C Includes
14 // C++ Includes
15 // Other libraries and framework includes
16 // Project includes
17 #include "lldb/Core/FileSpecList.h"
18 #include "lldb/Interpreter/OptionValue.h"
19
20 namespace lldb_private {
21
22 class OptionValueFileSpecList : public OptionValue
23 {
24 public:
25     OptionValueFileSpecList () :
26         OptionValue(),
27         m_current_value ()
28     {
29     }
30     
31     OptionValueFileSpecList (const FileSpecList &current_value) :
32         OptionValue(),
33         m_current_value (current_value)
34     {
35     }
36     
37     ~OptionValueFileSpecList() override
38     {
39     }
40     
41     //---------------------------------------------------------------------
42     // Virtual subclass pure virtual overrides
43     //---------------------------------------------------------------------
44     
45     OptionValue::Type
46     GetType() const override
47     {
48         return eTypeFileSpecList;
49     }
50     
51     void
52     DumpValue(const ExecutionContext *exe_ctx, Stream &strm, uint32_t dump_mask) override;
53     
54     Error
55     SetValueFromString(llvm::StringRef value,
56                        VarSetOperationType op = eVarSetOperationAssign) override;
57     
58     bool
59     Clear() override
60     {
61         m_current_value.Clear();
62         m_value_was_set = false;
63         return true;
64     }
65     
66     lldb::OptionValueSP
67     DeepCopy() const override;
68     
69     bool
70     IsAggregateValue() const override
71     {
72         return true;
73     }
74
75     //---------------------------------------------------------------------
76     // Subclass specific functions
77     //---------------------------------------------------------------------
78     
79     FileSpecList &
80     GetCurrentValue()
81     {
82         return m_current_value;
83     }
84     
85     const FileSpecList &
86     GetCurrentValue() const
87     {
88         return m_current_value;
89     }
90     
91     void
92     SetCurrentValue (const FileSpecList &value)
93     {
94         m_current_value = value;
95     }
96     
97 protected:
98     FileSpecList m_current_value;
99 };
100
101 } // namespace lldb_private
102
103 #endif // liblldb_OptionValueFileSpecList_h_