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
OptionValue::Type
GetType
()
const override
{
return
eTypeFormatEntity
; }
25
26
void
DumpValue
(
const
ExecutionContext
*exe_ctx,
Stream
&strm,
27
uint32_t dump_mask)
override
;
28
29
llvm::json::Value
ToJSON
(
const
ExecutionContext
*exe_ctx)
const override
;
30
31
Status
32
SetValueFromString
(llvm::StringRef value,
33
VarSetOperationType
op =
eVarSetOperationAssign
)
override
;
34
35
void
Clear
()
override
;
36
37
void
AutoComplete
(
CommandInterpreter
&interpreter,
38
CompletionRequest
&request)
override
;
39
40
const
FormatEntity::Entry
&
GetCurrentValue
()
const
{
return
m_current_entry
; }
41
42
void
SetCurrentValue
(
const
FormatEntity::Entry
&value) {
43
m_current_entry
= value;
44
}
45
46
const
FormatEntity::Entry
&
GetDefaultValue
()
const
{
return
m_default_entry
; }
47
48
protected
:
49
std::string
m_current_format
;
50
std::string
m_default_format
;
51
FormatEntity::Entry
m_current_entry
;
52
FormatEntity::Entry
m_default_entry
;
53
};
54
55
}
// namespace lldb_private
56
57
#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:293
lldb_private::OptionValueFormatEntity::GetCurrentValue
const FormatEntity::Entry & GetCurrentValue() const
Definition
OptionValueFormatEntity.h:40
lldb_private::OptionValueFormatEntity::ToJSON
llvm::json::Value ToJSON(const ExecutionContext *exe_ctx) const override
Definition
OptionValueFormatEntity.cpp:68
lldb_private::OptionValueFormatEntity::m_default_format
std::string m_default_format
Definition
OptionValueFormatEntity.h:50
lldb_private::OptionValueFormatEntity::GetDefaultValue
const FormatEntity::Entry & GetDefaultValue() const
Definition
OptionValueFormatEntity.h:46
lldb_private::OptionValueFormatEntity::SetCurrentValue
void SetCurrentValue(const FormatEntity::Entry &value)
Definition
OptionValueFormatEntity.h:42
lldb_private::OptionValueFormatEntity::m_current_format
std::string m_current_format
Definition
OptionValueFormatEntity.h:49
lldb_private::OptionValueFormatEntity::DumpValue
void DumpValue(const ExecutionContext *exe_ctx, Stream &strm, uint32_t dump_mask) override
Definition
OptionValueFormatEntity.cpp:51
lldb_private::OptionValueFormatEntity::m_default_entry
FormatEntity::Entry m_default_entry
Definition
OptionValueFormatEntity.h:52
lldb_private::OptionValueFormatEntity::SetValueFromString
Status SetValueFromString(llvm::StringRef value, VarSetOperationType op=eVarSetOperationAssign) override
Definition
OptionValueFormatEntity.cpp:72
lldb_private::OptionValueFormatEntity::GetType
OptionValue::Type GetType() const override
Definition
OptionValueFormatEntity.h:24
lldb_private::OptionValueFormatEntity::m_current_entry
FormatEntity::Entry m_current_entry
Definition
OptionValueFormatEntity.h:51
lldb_private::OptionValueFormatEntity::AutoComplete
void AutoComplete(CommandInterpreter &interpreter, CompletionRequest &request) override
Definition
OptionValueFormatEntity.cpp:121
lldb_private::OptionValueFormatEntity::~OptionValueFormatEntity
~OptionValueFormatEntity() override=default
lldb_private::OptionValueFormatEntity::Clear
void Clear() override
Definition
OptionValueFormatEntity.cpp:31
lldb_private::OptionValueFormatEntity::OptionValueFormatEntity
OptionValueFormatEntity(const char *default_format)
Definition
OptionValueFormatEntity.cpp:19
lldb_private::OptionValue::Type
Type
Definition
OptionValue.h:34
lldb_private::OptionValue::eTypeFormatEntity
@ eTypeFormatEntity
Definition
OptionValue.h:55
lldb_private::Status
An error handling class.
Definition
Status.h:118
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
for LLDB by
1.14.0