LLDB  mainline
OptionValueFormat.h
Go to the documentation of this file.
1 //===-- OptionValueFormat.h -------------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef liblldb_OptionValueFormat_h_
10 #define liblldb_OptionValueFormat_h_
11 
13 
14 namespace lldb_private {
15 
17 public:
19  : OptionValue(), m_current_value(value), m_default_value(value) {}
20 
21  OptionValueFormat(lldb::Format current_value, lldb::Format default_value)
22  : OptionValue(), m_current_value(current_value),
23  m_default_value(default_value) {}
24 
25  ~OptionValueFormat() override {}
26 
27  // Virtual subclass pure virtual overrides
28 
29  OptionValue::Type GetType() const override { return eTypeFormat; }
30 
31  void DumpValue(const ExecutionContext *exe_ctx, Stream &strm,
32  uint32_t dump_mask) override;
33 
34  Status
35  SetValueFromString(llvm::StringRef value,
37  Status
38  SetValueFromString(const char *,
40 
41  bool Clear() override {
43  m_value_was_set = false;
44  return true;
45  }
46 
47  lldb::OptionValueSP DeepCopy() const override;
48 
49  // Subclass specific functions
50 
52 
54 
55  void SetCurrentValue(lldb::Format value) { m_current_value = value; }
56 
57  void SetDefaultValue(lldb::Format value) { m_default_value = value; }
58 
59 protected:
62 };
63 
64 } // namespace lldb_private
65 
66 #endif // liblldb_OptionValueFormat_h_
Enumerations for broadcasting.
Definition: SBLaunchInfo.h:14
OptionValueFormat(lldb::Format value)
OptionValueFormat(lldb::Format current_value, lldb::Format default_value)
A stream class that can stream formatted output to a file.
Definition: Stream.h:28
lldb::Format GetCurrentValue() const
lldb::OptionValueSP DeepCopy() const override
Status SetValueFromString(llvm::StringRef value, VarSetOperationType op=eVarSetOperationAssign) override
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
lldb::Format GetDefaultValue() const
VarSetOperationType
Settable state variable types.
void SetCurrentValue(lldb::Format value)
void DumpValue(const ExecutionContext *exe_ctx, Stream &strm, uint32_t dump_mask) override
void SetDefaultValue(lldb::Format value)
OptionValue::Type GetType() const override
An error handling class.
Definition: Status.h:44