]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionValueFileSpecList.h
Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
[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 #include "lldb/Core/FileSpecList.h"
14 #include "lldb/Interpreter/OptionValue.h"
15
16 namespace lldb_private {
17
18 class OptionValueFileSpecList : public OptionValue {
19 public:
20   OptionValueFileSpecList() : OptionValue(), m_current_value() {}
21
22   OptionValueFileSpecList(const FileSpecList &current_value)
23       : OptionValue(), m_current_value(current_value) {}
24
25   ~OptionValueFileSpecList() override {}
26
27   //---------------------------------------------------------------------
28   // Virtual subclass pure virtual overrides
29   //---------------------------------------------------------------------
30
31   OptionValue::Type GetType() const override { return eTypeFileSpecList; }
32
33   void DumpValue(const ExecutionContext *exe_ctx, Stream &strm,
34                  uint32_t dump_mask) override;
35
36   Status
37   SetValueFromString(llvm::StringRef value,
38                      VarSetOperationType op = eVarSetOperationAssign) override;
39   Status
40   SetValueFromString(const char *,
41                      VarSetOperationType = eVarSetOperationAssign) = delete;
42
43   bool Clear() override {
44     m_current_value.Clear();
45     m_value_was_set = false;
46     return true;
47   }
48
49   lldb::OptionValueSP DeepCopy() const override;
50
51   bool IsAggregateValue() const override { return true; }
52
53   //---------------------------------------------------------------------
54   // Subclass specific functions
55   //---------------------------------------------------------------------
56
57   FileSpecList &GetCurrentValue() { return m_current_value; }
58
59   const FileSpecList &GetCurrentValue() const { return m_current_value; }
60
61   void SetCurrentValue(const FileSpecList &value) { m_current_value = value; }
62
63 protected:
64   FileSpecList m_current_value;
65 };
66
67 } // namespace lldb_private
68
69 #endif // liblldb_OptionValueFileSpecList_h_