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 LLDB_INTERPRETER_OPTIONVALUEFORMAT_H
10#define LLDB_INTERPRETER_OPTIONVALUEFORMAT_H
11
13
14namespace lldb_private {
15
17 : public Cloneable<OptionValueFormat, OptionValue> {
18public:
20 : m_current_value(value), m_default_value(value) {}
21
22 OptionValueFormat(lldb::Format current_value, lldb::Format default_value)
23 : m_current_value(current_value), m_default_value(default_value) {}
24
25 ~OptionValueFormat() override = default;
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 llvm::json::Value ToJSON(const ExecutionContext *exe_ctx) override;
35
36 Status
37 SetValueFromString(llvm::StringRef value,
39
40 void Clear() override {
42 m_value_was_set = false;
43 }
44
45 // Subclass specific functions
46
48
50
52
54
55protected:
58};
59
60} // namespace lldb_private
61
62#endif // LLDB_INTERPRETER_OPTIONVALUEFORMAT_H
A class that implements CRTP-based "virtual constructor" idiom.
Definition: Cloneable.h:40
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
llvm::json::Value ToJSON(const ExecutionContext *exe_ctx) override
OptionValueFormat(lldb::Format value)
Status SetValueFromString(llvm::StringRef value, VarSetOperationType op=eVarSetOperationAssign) override
void DumpValue(const ExecutionContext *exe_ctx, Stream &strm, uint32_t dump_mask) override
~OptionValueFormat() override=default
OptionValue::Type GetType() const override
void SetCurrentValue(lldb::Format value)
lldb::Format GetDefaultValue() const
lldb::Format GetCurrentValue() const
OptionValueFormat(lldb::Format current_value, lldb::Format default_value)
void SetDefaultValue(lldb::Format value)
An error handling class.
Definition: Status.h:44
A stream class that can stream formatted output to a file.
Definition: Stream.h:28
A class that represents a running process on the host machine.
VarSetOperationType
Settable state variable types.
Format
Display format definitions.