LLDB
mainline
llvm-project
lldb
include
lldb
Interpreter
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
12
#include "
lldb/Core/FormatEntity.h
"
13
#include "
lldb/Interpreter/OptionValue.h
"
14
15
namespace
lldb_private
{
16
17
class
OptionValueFormatEntity
18
:
public
Cloneable
<OptionValueFormatEntity, OptionValue> {
19
public
:
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,
35
VarSetOperationType
op =
eVarSetOperationAssign
)
override
;
36
37
void
Clear
()
override
;
38
39
void
AutoComplete
(
CommandInterpreter
&interpreter,
40
CompletionRequest
&request)
override
;
41
42
// Subclass specific functions
43
44
FormatEntity::Entry
&
GetCurrentValue
() {
return
m_current_entry
; }
45
46
const
FormatEntity::Entry
&
GetCurrentValue
()
const
{
return
m_current_entry
; }
47
48
void
SetCurrentValue
(
const
FormatEntity::Entry
&value) {
49
m_current_entry
= value;
50
}
51
52
FormatEntity::Entry
&
GetDefaultValue
() {
return
m_default_entry
; }
53
54
const
FormatEntity::Entry
&
GetDefaultValue
()
const
{
return
m_default_entry
; }
55
56
protected
:
57
std::string
m_current_format
;
58
std::string
m_default_format
;
59
FormatEntity::Entry
m_current_entry
;
60
FormatEntity::Entry
m_default_entry
;
61
};
62
63
}
// namespace lldb_private
64
65
#endif
// LLDB_INTERPRETER_OPTIONVALUEFORMATENTITY_H
FormatEntity.h
OptionValue.h
lldb_private::Cloneable
A class that implements CRTP-based "virtual constructor" idiom.
Definition:
Cloneable.h:40
lldb_private::CommandInterpreter
Definition:
CommandInterpreter.h:231
lldb_private::CompletionRequest
"lldb/Utility/ArgCompletionRequest.h"
Definition:
CompletionRequest.h:100
lldb_private::ExecutionContext
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
Definition:
ExecutionContext.h:292
lldb_private::OptionValueFormatEntity
Definition:
OptionValueFormatEntity.h:18
lldb_private::OptionValueFormatEntity::GetCurrentValue
const FormatEntity::Entry & GetCurrentValue() const
Definition:
OptionValueFormatEntity.h:46
lldb_private::OptionValueFormatEntity::m_default_format
std::string m_default_format
Definition:
OptionValueFormatEntity.h:58
lldb_private::OptionValueFormatEntity::GetDefaultValue
const FormatEntity::Entry & GetDefaultValue() const
Definition:
OptionValueFormatEntity.h:54
lldb_private::OptionValueFormatEntity::SetCurrentValue
void SetCurrentValue(const FormatEntity::Entry &value)
Definition:
OptionValueFormatEntity.h:48
lldb_private::OptionValueFormatEntity::m_current_format
std::string m_current_format
Definition:
OptionValueFormatEntity.h:57
lldb_private::OptionValueFormatEntity::DumpValue
void DumpValue(const ExecutionContext *exe_ctx, Stream &strm, uint32_t dump_mask) override
Definition:
OptionValueFormatEntity.cpp:50
lldb_private::OptionValueFormatEntity::GetCurrentValue
FormatEntity::Entry & GetCurrentValue()
Definition:
OptionValueFormatEntity.h:44
lldb_private::OptionValueFormatEntity::ToJSON
llvm::json::Value ToJSON(const ExecutionContext *exe_ctx) override
Definition:
OptionValueFormatEntity.cpp:64
lldb_private::OptionValueFormatEntity::m_default_entry
FormatEntity::Entry m_default_entry
Definition:
OptionValueFormatEntity.h:60
lldb_private::OptionValueFormatEntity::SetValueFromString
Status SetValueFromString(llvm::StringRef value, VarSetOperationType op=eVarSetOperationAssign) override
Definition:
OptionValueFormatEntity.cpp:70
lldb_private::OptionValueFormatEntity::GetType
OptionValue::Type GetType() const override
Definition:
OptionValueFormatEntity.h:26
lldb_private::OptionValueFormatEntity::GetDefaultValue
FormatEntity::Entry & GetDefaultValue()
Definition:
OptionValueFormatEntity.h:52
lldb_private::OptionValueFormatEntity::m_current_entry
FormatEntity::Entry m_current_entry
Definition:
OptionValueFormatEntity.h:59
lldb_private::OptionValueFormatEntity::AutoComplete
void AutoComplete(CommandInterpreter &interpreter, CompletionRequest &request) override
Definition:
OptionValueFormatEntity.cpp:119
lldb_private::OptionValueFormatEntity::~OptionValueFormatEntity
~OptionValueFormatEntity() override=default
lldb_private::OptionValueFormatEntity::Clear
void Clear() override
Definition:
OptionValueFormatEntity.cpp:30
lldb_private::OptionValue::Type
Type
Definition:
OptionValue.h:33
lldb_private::OptionValue::eTypeFormatEntity
@ eTypeFormatEntity
Definition:
OptionValue.h:54
lldb_private::Status
An error handling class.
Definition:
Status.h:115
lldb_private::Stream
A stream class that can stream formatted output to a file.
Definition:
Stream.h:28
lldb_private
A class that represents a running process on the host machine.
Definition:
SBAddressRange.h:14
lldb_private::VarSetOperationType
VarSetOperationType
Settable state variable types.
Definition:
lldb-private-enumerations.h:86
lldb_private::eVarSetOperationAssign
@ eVarSetOperationAssign
Definition:
lldb-private-enumerations.h:93
lldb_private::FormatEntity::Entry
Definition:
FormatEntity.h:39
Generated on Sat Dec 21 2024 14:48:17 for LLDB by
1.9.6