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:
OptionValueFileSpecList()25     OptionValueFileSpecList () :
26         OptionValue(),
27         m_current_value ()
28     {
29     }
30 
OptionValueFileSpecList(const FileSpecList & current_value)31     OptionValueFileSpecList (const FileSpecList &current_value) :
32         OptionValue(),
33         m_current_value (current_value)
34     {
35     }
36 
37 
38     virtual
~OptionValueFileSpecList()39     ~OptionValueFileSpecList()
40     {
41     }
42 
43     //---------------------------------------------------------------------
44     // Virtual subclass pure virtual overrides
45     //---------------------------------------------------------------------
46 
47     virtual OptionValue::Type
GetType()48     GetType () const
49     {
50         return eTypeFileSpecList;
51     }
52 
53     virtual void
54     DumpValue (const ExecutionContext *exe_ctx, Stream &strm, uint32_t dump_mask);
55 
56     virtual Error
57     SetValueFromCString (const char *value,
58                          VarSetOperationType op = eVarSetOperationAssign);
59 
60     virtual bool
Clear()61     Clear ()
62     {
63         m_current_value.Clear();
64         m_value_was_set = false;
65         return true;
66     }
67 
68     virtual lldb::OptionValueSP
69     DeepCopy () const;
70 
71     virtual bool
IsAggregateValue()72     IsAggregateValue () const
73     {
74         return true;
75     }
76 
77     //---------------------------------------------------------------------
78     // Subclass specific functions
79     //---------------------------------------------------------------------
80 
81     FileSpecList &
GetCurrentValue()82     GetCurrentValue()
83     {
84         return m_current_value;
85     }
86 
87     const FileSpecList &
GetCurrentValue()88     GetCurrentValue() const
89     {
90         return m_current_value;
91     }
92 
93     void
SetCurrentValue(const FileSpecList & value)94     SetCurrentValue (const FileSpecList &value)
95     {
96         m_current_value = value;
97     }
98 
99 protected:
100     FileSpecList m_current_value;
101 };
102 
103 } // namespace lldb_private
104 
105 #endif  // liblldb_OptionValueFileSpecList_h_
106