1 //===-- OptionValueFileSpecList.h -------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef liblldb_OptionValueFileSpecList_h_
11 #define liblldb_OptionValueFileSpecList_h_
13 #include "lldb/Core/FileSpecList.h"
14 #include "lldb/Interpreter/OptionValue.h"
16 namespace lldb_private {
18 class OptionValueFileSpecList : public OptionValue {
20 OptionValueFileSpecList() : OptionValue(), m_current_value() {}
22 OptionValueFileSpecList(const FileSpecList ¤t_value)
23 : OptionValue(), m_current_value(current_value) {}
25 ~OptionValueFileSpecList() override {}
27 //---------------------------------------------------------------------
28 // Virtual subclass pure virtual overrides
29 //---------------------------------------------------------------------
31 OptionValue::Type GetType() const override { return eTypeFileSpecList; }
33 void DumpValue(const ExecutionContext *exe_ctx, Stream &strm,
34 uint32_t dump_mask) override;
37 SetValueFromString(llvm::StringRef value,
38 VarSetOperationType op = eVarSetOperationAssign) override;
40 SetValueFromString(const char *,
41 VarSetOperationType = eVarSetOperationAssign) = delete;
43 bool Clear() override {
44 m_current_value.Clear();
45 m_value_was_set = false;
49 lldb::OptionValueSP DeepCopy() const override;
51 bool IsAggregateValue() const override { return true; }
53 //---------------------------------------------------------------------
54 // Subclass specific functions
55 //---------------------------------------------------------------------
57 FileSpecList &GetCurrentValue() { return m_current_value; }
59 const FileSpecList &GetCurrentValue() const { return m_current_value; }
61 void SetCurrentValue(const FileSpecList &value) { m_current_value = value; }
64 FileSpecList m_current_value;
67 } // namespace lldb_private
69 #endif // liblldb_OptionValueFileSpecList_h_