LLDB mainline
|
#include <OptionValueDictionary.h>
Public Member Functions | |
OptionValueDictionary (uint32_t type_mask=UINT32_MAX, OptionEnumValues enum_values=OptionEnumValues(), bool raw_value_dump=true) | |
~OptionValueDictionary () override=default | |
OptionValue::Type | GetType () const override |
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 |
void | Clear () override |
lldb::OptionValueSP | DeepCopy (const lldb::OptionValueSP &new_parent) const override |
bool | IsAggregateValue () const override |
bool | IsHomogenous () const |
size_t | GetNumValues () const |
lldb::OptionValueSP | GetValueForKey (ConstString key) const |
lldb::OptionValueSP | GetSubValue (const ExecutionContext *exe_ctx, llvm::StringRef name, bool will_modify, Status &error) const override |
Status | SetSubValue (const ExecutionContext *exe_ctx, VarSetOperationType op, llvm::StringRef name, llvm::StringRef value) override |
bool | SetValueForKey (ConstString key, const lldb::OptionValueSP &value_sp, bool can_replace=true) |
bool | DeleteValueForKey (ConstString key) |
size_t | GetArgs (Args &args) const |
Status | SetArgs (const Args &args, VarSetOperationType op) |
![]() | |
std::shared_ptr< typename Base::TopmostBase > | Clone () const override |
![]() | |
OptionValue ()=default | |
virtual | ~OptionValue ()=default |
virtual Type | GetType () const =0 |
virtual bool | ValueIsTransparent () const |
virtual const char * | GetTypeAsCString () const |
virtual void | DumpValue (const ExecutionContext *exe_ctx, Stream &strm, uint32_t dump_mask)=0 |
virtual llvm::json::Value | ToJSON (const ExecutionContext *exe_ctx) |
virtual Status | SetValueFromString (llvm::StringRef value, VarSetOperationType op=eVarSetOperationAssign) |
virtual void | Clear ()=0 |
virtual lldb::OptionValueSP | DeepCopy (const lldb::OptionValueSP &new_parent) const |
virtual void | AutoComplete (CommandInterpreter &interpreter, CompletionRequest &request) |
virtual lldb::OptionValueSP | GetSubValue (const ExecutionContext *exe_ctx, llvm::StringRef name, bool will_modify, Status &error) const |
virtual Status | SetSubValue (const ExecutionContext *exe_ctx, VarSetOperationType op, llvm::StringRef name, llvm::StringRef value) |
virtual bool | IsAggregateValue () const |
virtual ConstString | GetName () const |
virtual bool | DumpQualifiedName (Stream &strm) const |
uint32_t | GetTypeAsMask () |
uint64_t | GetUInt64Value (uint64_t fail_value, bool *success_ptr) |
OptionValueArch * | GetAsArch () |
const OptionValueArch * | GetAsArch () const |
OptionValueArray * | GetAsArray () |
const OptionValueArray * | GetAsArray () const |
OptionValueArgs * | GetAsArgs () |
const OptionValueArgs * | GetAsArgs () const |
OptionValueBoolean * | GetAsBoolean () |
OptionValueChar * | GetAsChar () |
const OptionValueBoolean * | GetAsBoolean () const |
const OptionValueChar * | GetAsChar () const |
OptionValueDictionary * | GetAsDictionary () |
const OptionValueDictionary * | GetAsDictionary () const |
OptionValueEnumeration * | GetAsEnumeration () |
const OptionValueEnumeration * | GetAsEnumeration () const |
OptionValueFileSpec * | GetAsFileSpec () |
const OptionValueFileSpec * | GetAsFileSpec () const |
OptionValueFileSpecList * | GetAsFileSpecList () |
const OptionValueFileSpecList * | GetAsFileSpecList () const |
OptionValueFormat * | GetAsFormat () |
const OptionValueFormat * | GetAsFormat () const |
OptionValueLanguage * | GetAsLanguage () |
const OptionValueLanguage * | GetAsLanguage () const |
OptionValuePathMappings * | GetAsPathMappings () |
const OptionValuePathMappings * | GetAsPathMappings () const |
OptionValueProperties * | GetAsProperties () |
const OptionValueProperties * | GetAsProperties () const |
OptionValueRegex * | GetAsRegex () |
const OptionValueRegex * | GetAsRegex () const |
OptionValueSInt64 * | GetAsSInt64 () |
const OptionValueSInt64 * | GetAsSInt64 () const |
OptionValueString * | GetAsString () |
const OptionValueString * | GetAsString () const |
OptionValueUInt64 * | GetAsUInt64 () |
const OptionValueUInt64 * | GetAsUInt64 () const |
OptionValueUUID * | GetAsUUID () |
const OptionValueUUID * | GetAsUUID () const |
OptionValueFormatEntity * | GetAsFormatEntity () |
const OptionValueFormatEntity * | GetAsFormatEntity () const |
bool | GetBooleanValue (bool fail_value=false) const |
bool | SetBooleanValue (bool new_value) |
char | GetCharValue (char fail_value) const |
char | SetCharValue (char new_value) |
int64_t | GetEnumerationValue (int64_t fail_value=-1) const |
bool | SetEnumerationValue (int64_t value) |
FileSpec | GetFileSpecValue () const |
bool | SetFileSpecValue (const FileSpec &file_spec) |
FileSpecList | GetFileSpecListValue () const |
lldb::Format | GetFormatValue (lldb::Format fail_value=lldb::eFormatDefault) const |
bool | SetFormatValue (lldb::Format new_value) |
lldb::LanguageType | GetLanguageValue (lldb::LanguageType fail_value=lldb::eLanguageTypeUnknown) const |
bool | SetLanguageValue (lldb::LanguageType new_language) |
const FormatEntity::Entry * | GetFormatEntity () const |
const RegularExpression * | GetRegexValue () const |
int64_t | GetSInt64Value (int64_t fail_value=0) const |
bool | SetSInt64Value (int64_t new_value) |
llvm::StringRef | GetStringValue (llvm::StringRef fail_value) const |
llvm::StringRef | GetStringValue () const |
bool | SetStringValue (llvm::StringRef new_value) |
uint64_t | GetUInt64Value (uint64_t fail_value=0) const |
bool | SetUInt64Value (uint64_t new_value) |
UUID | GetUUIDValue () const |
bool | SetUUIDValue (const UUID &uuid) |
bool | OptionWasSet () const |
void | SetOptionWasSet () |
void | SetParent (const lldb::OptionValueSP &parent_sp) |
lldb::OptionValueSP | GetParent () const |
void | SetValueChangedCallback (std::function< void()> callback) |
void | NotifyValueChanged () |
Protected Types | |
typedef std::map< ConstString, lldb::OptionValueSP > | collection |
![]() | |
using | TopmostBase = OptionValue |
Protected Attributes | |
uint32_t | m_type_mask |
OptionEnumValues | m_enum_values |
collection | m_values |
bool | m_raw_value_dump |
![]() | |
lldb::OptionValueWP | m_parent_wp |
std::function< void()> | m_callback |
bool | m_value_was_set = false |
Definition at line 19 of file OptionValueDictionary.h.
|
protected |
Definition at line 81 of file OptionValueDictionary.h.
|
inline |
Definition at line 22 of file OptionValueDictionary.h.
|
overridedefault |
|
inlineoverridevirtual |
Implements lldb_private::OptionValue.
Definition at line 43 of file OptionValueDictionary.h.
References lldb_private::OptionValue::m_value_was_set, and m_values.
Referenced by SetArgs().
|
overridevirtual |
Reimplemented from lldb_private::OptionValue.
Definition at line 335 of file OptionValueDictionary.cpp.
References lldb_private::OptionValue::DeepCopy(), and lldbassert.
bool OptionValueDictionary::DeleteValueForKey | ( | ConstString | key | ) |
Definition at line 325 of file OptionValueDictionary.cpp.
References m_values.
Referenced by SetArgs().
|
overridevirtual |
Implements lldb_private::OptionValue.
Definition at line 21 of file OptionValueDictionary.cpp.
References lldb_private::OptionValue::ConvertTypeMaskToType(), lldb_private::OptionValue::DumpValue(), lldb_private::OptionValue::eDumpOptionCommand, lldb_private::OptionValue::eDumpOptionRaw, lldb_private::OptionValue::eDumpOptionType, lldb_private::OptionValue::eDumpOptionValue, lldb_private::Stream::EOL(), lldb_private::OptionValue::eTypeArray, lldb_private::OptionValue::eTypeBoolean, lldb_private::OptionValue::eTypeChar, lldb_private::OptionValue::eTypeDictionary, lldb_private::OptionValue::eTypeEnum, lldb_private::OptionValue::eTypeFileLineColumn, lldb_private::OptionValue::eTypeFileSpec, lldb_private::OptionValue::eTypeFileSpecList, lldb_private::OptionValue::eTypeFormat, lldb_private::OptionValue::eTypeInvalid, lldb_private::OptionValue::eTypePathMap, lldb_private::OptionValue::eTypeProperties, lldb_private::OptionValue::eTypeSInt64, lldb_private::OptionValue::eTypeString, lldb_private::OptionValue::eTypeUInt64, lldb_private::OptionValue::eTypeUUID, lldb_private::OptionValue::GetBuiltinTypeAsCString(), lldb_private::OptionValue::GetTypeAsCString(), lldb_private::Stream::Indent(), lldb_private::Stream::IndentLess(), lldb_private::Stream::IndentMore(), m_raw_value_dump, m_type_mask, m_values, lldb_private::Stream::Printf(), lldb_private::Stream::PutChar(), and lldb_private::Stream::PutCString().
size_t OptionValueDictionary::GetArgs | ( | Args & | args | ) | const |
Definition at line 95 of file OptionValueDictionary.cpp.
References lldb_private::Args::AppendArgument(), lldb_private::Args::Clear(), lldb_private::OptionValue::eDumpOptionRaw, lldb_private::OptionValue::eDumpOptionValue, lldb_private::Args::GetArgumentCount(), lldb_private::StreamString::GetString(), m_values, and lldb_private::Stream::Printf().
Referenced by lldb_private::OptionValueProperties::GetPropertyAtIndexAsArgs().
|
inline |
Definition at line 59 of file OptionValueDictionary.h.
References m_values.
|
overridevirtual |
Reimplemented from lldb_private::OptionValue.
Definition at line 233 of file OptionValueDictionary.cpp.
References error(), lldb_private::OptionValue::GetTypeAsCString(), and GetValueForKey().
Referenced by SetSubValue().
|
inlineoverridevirtual |
Implements lldb_private::OptionValue.
Definition at line 32 of file OptionValueDictionary.h.
References lldb_private::OptionValue::eTypeDictionary.
lldb::OptionValueSP OptionValueDictionary::GetValueForKey | ( | ConstString | key | ) | const |
Definition at line 300 of file OptionValueDictionary.cpp.
References m_values.
Referenced by GetSubValue(), EmulationStateARM::LoadRegistersStateFromDictionary(), EmulationStateARM::LoadStateFromDictionary(), lldb_private::EmulateInstructionARM::TestEmulation(), and lldb_private::Instruction::TestEmulation().
|
inlineoverridevirtual |
Reimplemented from lldb_private::OptionValue.
Definition at line 51 of file OptionValueDictionary.h.
|
inline |
Definition at line 53 of file OptionValueDictionary.h.
References lldb_private::OptionValue::ConvertTypeMaskToType(), lldb_private::OptionValue::eTypeInvalid, and m_type_mask.
Status OptionValueDictionary::SetArgs | ( | const Args & | args, |
VarSetOperationType | op | ||
) |
Definition at line 107 of file OptionValueDictionary.cpp.
References Clear(), lldb_private::OptionValue::CreateValueFromCStringForTypeMask(), DeleteValueForKey(), error(), lldb_private::OptionValue::eTypeEnum, lldb_private::eVarSetOperationAppend, lldb_private::eVarSetOperationAssign, lldb_private::eVarSetOperationClear, lldb_private::eVarSetOperationInsertAfter, lldb_private::eVarSetOperationInsertBefore, lldb_private::eVarSetOperationInvalid, lldb_private::eVarSetOperationRemove, lldb_private::eVarSetOperationReplace, lldb_private::Args::GetArgumentCount(), lldb_private::ConstString::GetCString(), m_enum_values, m_type_mask, lldb_private::OptionValue::m_value_was_set, SetValueForKey(), and lldb_private::OptionValue::SetValueFromString().
Referenced by lldb_private::OptionValueProperties::SetPropertyAtIndexFromArgs(), and SetValueFromString().
|
overridevirtual |
Reimplemented from lldb_private::OptionValue.
Definition at line 283 of file OptionValueDictionary.cpp.
References error(), and GetSubValue().
bool OptionValueDictionary::SetValueForKey | ( | ConstString | key, |
const lldb::OptionValueSP & | value_sp, | ||
bool | can_replace = true |
||
) |
Definition at line 308 of file OptionValueDictionary.cpp.
References m_type_mask, and m_values.
Referenced by SetArgs().
|
overridevirtual |
Reimplemented from lldb_private::OptionValue.
Definition at line 223 of file OptionValueDictionary.cpp.
References error(), lldb_private::OptionValue::NotifyValueChanged(), and SetArgs().
|
overridevirtual |
Reimplemented from lldb_private::OptionValue.
Definition at line 87 of file OptionValueDictionary.cpp.
References m_values.
|
protected |
Definition at line 83 of file OptionValueDictionary.h.
Referenced by SetArgs().
|
protected |
Definition at line 85 of file OptionValueDictionary.h.
Referenced by DumpValue().
|
protected |
Definition at line 82 of file OptionValueDictionary.h.
Referenced by DumpValue(), IsHomogenous(), SetArgs(), and SetValueForKey().
|
protected |
Definition at line 84 of file OptionValueDictionary.h.
Referenced by Clear(), DeleteValueForKey(), DumpValue(), GetArgs(), GetNumValues(), GetValueForKey(), SetValueForKey(), and ToJSON().