LLDB mainline
OptionValueFormatEntity.h
Go to the documentation of this file.
1//===-- OptionValueFormatEntity.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_OPTIONVALUEFORMATENTITY_H
10#define LLDB_INTERPRETER_OPTIONVALUEFORMATENTITY_H
11
14
15namespace lldb_private {
16
18 : public Cloneable<OptionValueFormatEntity, OptionValue> {
19public:
20 OptionValueFormatEntity(const char *default_format);
21
22 ~OptionValueFormatEntity() override = default;
23
24 // Virtual subclass pure virtual overrides
25
26 OptionValue::Type GetType() const override { return eTypeFormatEntity; }
27
28 void DumpValue(const ExecutionContext *exe_ctx, Stream &strm,
29 uint32_t dump_mask) override;
30
31 llvm::json::Value ToJSON(const ExecutionContext *exe_ctx) override;
32
33 Status
34 SetValueFromString(llvm::StringRef value,
36
37 void Clear() override;
38
39 void AutoComplete(CommandInterpreter &interpreter,
40 CompletionRequest &request) override;
41
42 // Subclass specific functions
43
45
47
49 m_current_entry = value;
50 }
51
53
55
56protected:
57 std::string m_current_format;
58 std::string m_default_format;
61};
62
63} // namespace lldb_private
64
65#endif // LLDB_INTERPRETER_OPTIONVALUEFORMATENTITY_H
A class that implements CRTP-based "virtual constructor" idiom.
Definition: Cloneable.h:40
"lldb/Utility/ArgCompletionRequest.h"
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
const FormatEntity::Entry & GetCurrentValue() const
const FormatEntity::Entry & GetDefaultValue() const
void SetCurrentValue(const FormatEntity::Entry &value)
void DumpValue(const ExecutionContext *exe_ctx, Stream &strm, uint32_t dump_mask) override
llvm::json::Value ToJSON(const ExecutionContext *exe_ctx) override
Status SetValueFromString(llvm::StringRef value, VarSetOperationType op=eVarSetOperationAssign) override
OptionValue::Type GetType() const override
void AutoComplete(CommandInterpreter &interpreter, CompletionRequest &request) override
~OptionValueFormatEntity() override=default
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.
Definition: SBAttachInfo.h:14
VarSetOperationType
Settable state variable types.