LLDB mainline
Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
lldb_private::OptionValue Class Referenceabstract

#include <OptionValue.h>

Inheritance diagram for lldb_private::OptionValue:
Inheritance graph
[legend]

Public Types

enum  Type {
  eTypeInvalid = 0 , eTypeArch , eTypeArgs , eTypeArray ,
  eTypeBoolean , eTypeChar , eTypeDictionary , eTypeEnum ,
  eTypeFileLineColumn , eTypeFileSpec , eTypeFileSpecList , eTypeFormat ,
  eTypeLanguage , eTypePathMap , eTypeProperties , eTypeRegex ,
  eTypeSInt64 , eTypeString , eTypeUInt64 , eTypeUUID ,
  eTypeFormatEntity
}
 
enum  {
  eDumpOptionName = (1u << 0) , eDumpOptionType = (1u << 1) , eDumpOptionValue = (1u << 2) , eDumpOptionDescription = (1u << 3) ,
  eDumpOptionRaw = (1u << 4) , eDumpOptionCommand = (1u << 5) , eDumpGroupValue = (eDumpOptionName | eDumpOptionType | eDumpOptionValue) , eDumpGroupHelp ,
  eDumpGroupExport = (eDumpOptionCommand | eDumpOptionName | eDumpOptionValue)
}
 

Public Member Functions

 OptionValue ()=default
 
virtual ~OptionValue ()=default
 
 OptionValue (const OptionValue &other)
 
OptionValueoperator= (const OptionValue &other)
 
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, Status &error) const
 
virtual Status SetSubValue (const ExecutionContext *exe_ctx, VarSetOperationType op, llvm::StringRef name, llvm::StringRef value)
 
virtual bool IsAggregateValue () const
 
virtual llvm::StringRef GetName () const
 
virtual bool DumpQualifiedName (Stream &strm) const
 
uint32_t GetTypeAsMask ()
 
OptionValueArchGetAsArch ()
 
const OptionValueArchGetAsArch () const
 
OptionValueArrayGetAsArray ()
 
const OptionValueArrayGetAsArray () const
 
OptionValueArgsGetAsArgs ()
 
const OptionValueArgsGetAsArgs () const
 
OptionValueBooleanGetAsBoolean ()
 
const OptionValueBooleanGetAsBoolean () const
 
OptionValueCharGetAsChar ()
 
const OptionValueCharGetAsChar () const
 
OptionValueDictionaryGetAsDictionary ()
 
const OptionValueDictionaryGetAsDictionary () const
 
OptionValueEnumerationGetAsEnumeration ()
 
const OptionValueEnumerationGetAsEnumeration () const
 
OptionValueFileSpecGetAsFileSpec ()
 
const OptionValueFileSpecGetAsFileSpec () const
 
OptionValueFileSpecListGetAsFileSpecList ()
 
const OptionValueFileSpecListGetAsFileSpecList () const
 
OptionValueFormatGetAsFormat ()
 
const OptionValueFormatGetAsFormat () const
 
OptionValueLanguageGetAsLanguage ()
 
const OptionValueLanguageGetAsLanguage () const
 
OptionValuePathMappingsGetAsPathMappings ()
 
const OptionValuePathMappingsGetAsPathMappings () const
 
OptionValuePropertiesGetAsProperties ()
 
const OptionValuePropertiesGetAsProperties () const
 
OptionValueRegexGetAsRegex ()
 
const OptionValueRegexGetAsRegex () const
 
OptionValueSInt64GetAsSInt64 ()
 
const OptionValueSInt64GetAsSInt64 () const
 
OptionValueStringGetAsString ()
 
const OptionValueStringGetAsString () const
 
OptionValueUInt64GetAsUInt64 ()
 
const OptionValueUInt64GetAsUInt64 () const
 
OptionValueUUIDGetAsUUID ()
 
const OptionValueUUIDGetAsUUID () const
 
OptionValueFormatEntityGetAsFormatEntity ()
 
const OptionValueFormatEntityGetAsFormatEntity () const
 
bool AppendFileSpecValue (FileSpec file_spec)
 
bool OptionWasSet () const
 
void SetOptionWasSet ()
 
void SetParent (const lldb::OptionValueSP &parent_sp)
 
lldb::OptionValueSP GetParent () const
 
void SetValueChangedCallback (std::function< void()> callback)
 
void NotifyValueChanged ()
 
template<typename T , std::enable_if_t<!std::is_pointer_v< T >, bool > = true>
std::optional< T > GetValueAs () const
 
template<typename T , typename U = typename std::remove_const< typename std::remove_pointer<T>::type>::type, std::enable_if_t< std::is_pointer_v< T >, bool > = true>
GetValueAs () const
 
bool SetValueAs (bool v)
 
bool SetValueAs (char v)
 
bool SetValueAs (uint64_t v)
 
bool SetValueAs (int64_t v)
 
bool SetValueAs (UUID v)
 
bool SetValueAs (llvm::StringRef v)
 
bool SetValueAs (lldb::LanguageType v)
 
bool SetValueAs (lldb::Format v)
 
bool SetValueAs (FileSpec v)
 
bool SetValueAs (ArchSpec v)
 
template<typename T , std::enable_if_t< std::is_enum_v< T >, bool > = true>
bool SetValueAs (T t)
 

Static Public Member Functions

static const char * GetBuiltinTypeAsCString (Type t)
 
static uint32_t ConvertTypeToMask (OptionValue::Type type)
 
static OptionValue::Type ConvertTypeMaskToType (uint32_t type_mask)
 
static lldb::OptionValueSP CreateValueFromCStringForTypeMask (const char *value_cstr, uint32_t type_mask, Status &error)
 

Protected Types

using TopmostBase = OptionValue
 

Protected Member Functions

virtual lldb::OptionValueSP Clone () const =0
 

Protected Attributes

lldb::OptionValueWP m_parent_wp
 
std::function< void()> m_callback
 
bool m_value_was_set = false
 

Private Member Functions

std::optional< ArchSpecGetArchSpecValue () const
 
bool SetArchSpecValue (ArchSpec arch_spec)
 
std::optional< bool > GetBooleanValue () const
 
bool SetBooleanValue (bool new_value)
 
std::optional< char > GetCharValue () const
 
bool SetCharValue (char new_value)
 
std::optional< int64_t > GetEnumerationValue () const
 
bool SetEnumerationValue (int64_t value)
 
std::optional< FileSpecGetFileSpecValue () const
 
bool SetFileSpecValue (FileSpec file_spec)
 
std::optional< FileSpecListGetFileSpecListValue () const
 
std::optional< int64_t > GetSInt64Value () const
 
bool SetSInt64Value (int64_t new_value)
 
std::optional< uint64_t > GetUInt64Value () const
 
bool SetUInt64Value (uint64_t new_value)
 
std::optional< lldb::FormatGetFormatValue () const
 
bool SetFormatValue (lldb::Format new_value)
 
std::optional< lldb::LanguageTypeGetLanguageValue () const
 
bool SetLanguageValue (lldb::LanguageType new_language)
 
std::optional< llvm::StringRef > GetStringValue () const
 
bool SetStringValue (llvm::StringRef new_value)
 
std::optional< UUIDGetUUIDValue () const
 
bool SetUUIDValue (const UUID &uuid)
 
const FormatEntity::EntryGetFormatEntity () const
 
const RegularExpressionGetRegexValue () const
 

Private Attributes

std::mutex m_mutex
 

Detailed Description

Definition at line 31 of file OptionValue.h.

Member Typedef Documentation

◆ TopmostBase

Definition at line 338 of file OptionValue.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
eDumpOptionName 
eDumpOptionType 
eDumpOptionValue 
eDumpOptionDescription 
eDumpOptionRaw 
eDumpOptionCommand 
eDumpGroupValue 
eDumpGroupHelp 
eDumpGroupExport 

Definition at line 57 of file OptionValue.h.

◆ Type

Enumerator
eTypeInvalid 
eTypeArch 
eTypeArgs 
eTypeArray 
eTypeBoolean 
eTypeChar 
eTypeDictionary 
eTypeEnum 
eTypeFileLineColumn 
eTypeFileSpec 
eTypeFileSpecList 
eTypeFormat 
eTypeLanguage 
eTypePathMap 
eTypeProperties 
eTypeRegex 
eTypeSInt64 
eTypeString 
eTypeUInt64 
eTypeUUID 
eTypeFormatEntity 

Definition at line 33 of file OptionValue.h.

Constructor & Destructor Documentation

◆ OptionValue() [1/2]

lldb_private::OptionValue::OptionValue ( )
default

◆ ~OptionValue()

virtual lldb_private::OptionValue::~OptionValue ( )
virtualdefault

◆ OptionValue() [2/2]

OptionValue::OptionValue ( const OptionValue other)

Definition at line 18 of file OptionValue.cpp.

References m_callback, m_mutex, m_parent_wp, and m_value_was_set.

Member Function Documentation

◆ AppendFileSpecValue()

bool OptionValue::AppendFileSpecValue ( FileSpec  file_spec)

Definition at line 337 of file OptionValue.cpp.

References GetAsFileSpecList(), and m_mutex.

◆ AutoComplete()

void OptionValue::AutoComplete ( CommandInterpreter interpreter,
CompletionRequest request 
)
virtual

◆ Clear()

virtual void lldb_private::OptionValue::Clear ( )
pure virtual

◆ Clone()

virtual lldb::OptionValueSP lldb_private::OptionValue::Clone ( ) const
protectedpure virtual

Implemented in lldb_private::OptionValueFileSpecList, lldb_private::Cloneable< ProcessExperimentalOptionValueProperties, OptionValueProperties >, lldb_private::Cloneable< ProcessOptionValueProperties, OptionValueProperties >, lldb_private::Cloneable< TargetExperimentalOptionValueProperties, OptionValueProperties >, lldb_private::Cloneable< TargetOptionValueProperties, OptionValueProperties >, lldb_private::Cloneable< ThreadOptionValueProperties, OptionValueProperties >, lldb_private::Cloneable< OptionValueArch, OptionValue >, lldb_private::Cloneable< OptionValueArgs, OptionValueArray >, lldb_private::Cloneable< OptionValueArray, OptionValue >, lldb_private::Cloneable< OptionValueBoolean, OptionValue >, lldb_private::Cloneable< OptionValueChar, OptionValue >, lldb_private::Cloneable< OptionValueDictionary, OptionValue >, lldb_private::Cloneable< OptionValueEnumeration, OptionValue >, lldb_private::Cloneable< OptionValueFileColonLine, OptionValue >, lldb_private::Cloneable< OptionValueFileSpec, OptionValue >, lldb_private::Cloneable< OptionValueFileSpecList, OptionValue >, lldb_private::Cloneable< OptionValueFormat, OptionValue >, lldb_private::Cloneable< OptionValueFormatEntity, OptionValue >, lldb_private::Cloneable< OptionValueLanguage, OptionValue >, lldb_private::Cloneable< OptionValuePathMappings, OptionValue >, lldb_private::Cloneable< OptionValueProperties, OptionValue >, lldb_private::Cloneable< OptionValueRegex, OptionValue >, lldb_private::Cloneable< OptionValueSInt64, OptionValue >, lldb_private::Cloneable< OptionValueString, OptionValue >, lldb_private::Cloneable< OptionValueUInt64, OptionValue >, and lldb_private::Cloneable< OptionValueUUID, OptionValue >.

Referenced by DeepCopy().

◆ ConvertTypeMaskToType()

static OptionValue::Type lldb_private::OptionValue::ConvertTypeMaskToType ( uint32_t  type_mask)
inlinestatic

◆ ConvertTypeToMask()

static uint32_t lldb_private::OptionValue::ConvertTypeToMask ( OptionValue::Type  type)
inlinestatic

Definition at line 140 of file OptionValue.h.

Referenced by lldb_private::Property::Property().

◆ CreateValueFromCStringForTypeMask()

lldb::OptionValueSP OptionValue::CreateValueFromCStringForTypeMask ( const char *  value_cstr,
uint32_t  type_mask,
Status error 
)
static

◆ DeepCopy()

OptionValueSP OptionValue::DeepCopy ( const lldb::OptionValueSP new_parent) const
virtual

◆ DumpQualifiedName()

bool OptionValue::DumpQualifiedName ( Stream strm) const
virtual

Definition at line 575 of file OptionValue.cpp.

References GetName(), m_parent_wp, and lldb_private::Stream::PutChar().

◆ DumpValue()

virtual void lldb_private::OptionValue::DumpValue ( const ExecutionContext exe_ctx,
Stream strm,
uint32_t  dump_mask 
)
pure virtual

◆ GetArchSpecValue()

std::optional< ArchSpec > OptionValue::GetArchSpecValue ( ) const
private

Definition at line 463 of file OptionValue.cpp.

References GetAsArch(), and m_mutex.

Referenced by GetValueAs().

◆ GetAsArch() [1/2]

OptionValueArch * OptionValue::GetAsArch ( )

Definition at line 93 of file OptionValue.cpp.

References eTypeArch, and GetType().

Referenced by GetArchSpecValue(), and SetArchSpecValue().

◆ GetAsArch() [2/2]

const OptionValueArch * OptionValue::GetAsArch ( ) const

Definition at line 99 of file OptionValue.cpp.

References eTypeArch, and GetType().

◆ GetAsArgs() [1/2]

OptionValueArgs * OptionValue::GetAsArgs ( )

◆ GetAsArgs() [2/2]

const OptionValueArgs * OptionValue::GetAsArgs ( ) const

Definition at line 123 of file OptionValue.cpp.

References eTypeArgs, and GetType().

◆ GetAsArray() [1/2]

OptionValueArray * OptionValue::GetAsArray ( )

◆ GetAsArray() [2/2]

const OptionValueArray * OptionValue::GetAsArray ( ) const

Definition at line 111 of file OptionValue.cpp.

References eTypeArray, and GetType().

◆ GetAsBoolean() [1/2]

OptionValueBoolean * OptionValue::GetAsBoolean ( )

Definition at line 45 of file OptionValue.cpp.

References eTypeBoolean, and GetType().

Referenced by GetBooleanValue(), and SetBooleanValue().

◆ GetAsBoolean() [2/2]

const OptionValueBoolean * OptionValue::GetAsBoolean ( ) const

Definition at line 51 of file OptionValue.cpp.

References eTypeBoolean, and GetType().

◆ GetAsChar() [1/2]

OptionValueChar * OptionValue::GetAsChar ( )

Definition at line 63 of file OptionValue.cpp.

References eTypeChar, and GetType().

Referenced by GetCharValue(), and SetCharValue().

◆ GetAsChar() [2/2]

const OptionValueChar * OptionValue::GetAsChar ( ) const

Definition at line 57 of file OptionValue.cpp.

References eTypeChar, and GetType().

◆ GetAsDictionary() [1/2]

OptionValueDictionary * OptionValue::GetAsDictionary ( )

◆ GetAsDictionary() [2/2]

const OptionValueDictionary * OptionValue::GetAsDictionary ( ) const

Definition at line 135 of file OptionValue.cpp.

References eTypeDictionary, and GetType().

◆ GetAsEnumeration() [1/2]

OptionValueEnumeration * OptionValue::GetAsEnumeration ( )

Definition at line 141 of file OptionValue.cpp.

References eTypeEnum, and GetType().

Referenced by GetEnumerationValue(), and SetEnumerationValue().

◆ GetAsEnumeration() [2/2]

const OptionValueEnumeration * OptionValue::GetAsEnumeration ( ) const

Definition at line 147 of file OptionValue.cpp.

References eTypeEnum, and GetType().

◆ GetAsFileSpec() [1/2]

OptionValueFileSpec * OptionValue::GetAsFileSpec ( )

◆ GetAsFileSpec() [2/2]

const OptionValueFileSpec * OptionValue::GetAsFileSpec ( ) const

Definition at line 75 of file OptionValue.cpp.

References eTypeFileSpec, and GetType().

◆ GetAsFileSpecList() [1/2]

OptionValueFileSpecList * OptionValue::GetAsFileSpecList ( )

Definition at line 81 of file OptionValue.cpp.

References eTypeFileSpecList, and GetType().

Referenced by AppendFileSpecValue(), and GetFileSpecListValue().

◆ GetAsFileSpecList() [2/2]

const OptionValueFileSpecList * OptionValue::GetAsFileSpecList ( ) const

Definition at line 87 of file OptionValue.cpp.

References eTypeFileSpecList, and GetType().

◆ GetAsFormat() [1/2]

OptionValueFormat * OptionValue::GetAsFormat ( )

Definition at line 153 of file OptionValue.cpp.

References eTypeFormat, and GetType().

Referenced by GetFormatValue(), and SetFormatValue().

◆ GetAsFormat() [2/2]

const OptionValueFormat * OptionValue::GetAsFormat ( ) const

Definition at line 159 of file OptionValue.cpp.

References eTypeFormat, and GetType().

◆ GetAsFormatEntity() [1/2]

OptionValueFormatEntity * OptionValue::GetAsFormatEntity ( )

Definition at line 177 of file OptionValue.cpp.

References eTypeFormatEntity, and GetType().

Referenced by GetFormatEntity().

◆ GetAsFormatEntity() [2/2]

const OptionValueFormatEntity * OptionValue::GetAsFormatEntity ( ) const

Definition at line 183 of file OptionValue.cpp.

References eTypeFormatEntity, and GetType().

◆ GetAsLanguage() [1/2]

OptionValueLanguage * OptionValue::GetAsLanguage ( )

Definition at line 165 of file OptionValue.cpp.

References eTypeLanguage, and GetType().

Referenced by GetLanguageValue(), and SetLanguageValue().

◆ GetAsLanguage() [2/2]

const OptionValueLanguage * OptionValue::GetAsLanguage ( ) const

Definition at line 171 of file OptionValue.cpp.

References eTypeLanguage, and GetType().

◆ GetAsPathMappings() [1/2]

OptionValuePathMappings * OptionValue::GetAsPathMappings ( )

Definition at line 189 of file OptionValue.cpp.

References eTypePathMap, and GetType().

◆ GetAsPathMappings() [2/2]

const OptionValuePathMappings * OptionValue::GetAsPathMappings ( ) const

Definition at line 195 of file OptionValue.cpp.

References eTypePathMap, and GetType().

◆ GetAsProperties() [1/2]

OptionValueProperties * OptionValue::GetAsProperties ( )

◆ GetAsProperties() [2/2]

const OptionValueProperties * OptionValue::GetAsProperties ( ) const

Definition at line 207 of file OptionValue.cpp.

References eTypeProperties, and GetType().

◆ GetAsRegex() [1/2]

OptionValueRegex * OptionValue::GetAsRegex ( )

◆ GetAsRegex() [2/2]

const OptionValueRegex * OptionValue::GetAsRegex ( ) const

Definition at line 219 of file OptionValue.cpp.

References eTypeRegex, and GetType().

◆ GetAsSInt64() [1/2]

OptionValueSInt64 * OptionValue::GetAsSInt64 ( )

◆ GetAsSInt64() [2/2]

const OptionValueSInt64 * OptionValue::GetAsSInt64 ( ) const

Definition at line 231 of file OptionValue.cpp.

References eTypeSInt64, and GetType().

◆ GetAsString() [1/2]

OptionValueString * OptionValue::GetAsString ( )

Definition at line 237 of file OptionValue.cpp.

References eTypeString, and GetType().

Referenced by GetStringValue(), and SetStringValue().

◆ GetAsString() [2/2]

const OptionValueString * OptionValue::GetAsString ( ) const

Definition at line 243 of file OptionValue.cpp.

References eTypeString, and GetType().

◆ GetAsUInt64() [1/2]

OptionValueUInt64 * OptionValue::GetAsUInt64 ( )

◆ GetAsUInt64() [2/2]

const OptionValueUInt64 * OptionValue::GetAsUInt64 ( ) const

Definition at line 255 of file OptionValue.cpp.

References eTypeUInt64, and GetType().

◆ GetAsUUID() [1/2]

OptionValueUUID * OptionValue::GetAsUUID ( )

Definition at line 261 of file OptionValue.cpp.

References eTypeUUID, and GetType().

Referenced by GetUUIDValue(), and SetUUIDValue().

◆ GetAsUUID() [2/2]

const OptionValueUUID * OptionValue::GetAsUUID ( ) const

Definition at line 267 of file OptionValue.cpp.

References eTypeUUID, and GetType().

◆ GetBooleanValue()

std::optional< bool > OptionValue::GetBooleanValue ( ) const
private

Definition at line 273 of file OptionValue.cpp.

References GetAsBoolean(), and m_mutex.

Referenced by GetValueAs().

◆ GetBuiltinTypeAsCString()

const char * OptionValue::GetBuiltinTypeAsCString ( Type  t)
static

◆ GetCharValue()

std::optional< char > OptionValue::GetCharValue ( ) const
private

Definition at line 289 of file OptionValue.cpp.

References GetAsChar(), and m_mutex.

Referenced by GetValueAs().

◆ GetEnumerationValue()

std::optional< int64_t > OptionValue::GetEnumerationValue ( ) const
private

Definition at line 305 of file OptionValue.cpp.

References GetAsEnumeration(), and m_mutex.

Referenced by GetValueAs().

◆ GetFileSpecListValue()

std::optional< FileSpecList > OptionValue::GetFileSpecListValue ( ) const
private

Definition at line 346 of file OptionValue.cpp.

References GetAsFileSpecList(), and m_mutex.

Referenced by GetValueAs().

◆ GetFileSpecValue()

std::optional< FileSpec > OptionValue::GetFileSpecValue ( ) const
private

Definition at line 321 of file OptionValue.cpp.

References GetAsFileSpec(), and m_mutex.

Referenced by GetValueAs().

◆ GetFormatEntity()

const FormatEntity::Entry * OptionValue::GetFormatEntity ( ) const
private

Definition at line 385 of file OptionValue.cpp.

References GetAsFormatEntity(), and m_mutex.

Referenced by GetValueAs().

◆ GetFormatValue()

std::optional< lldb::Format > OptionValue::GetFormatValue ( ) const
private

Definition at line 353 of file OptionValue.cpp.

References GetAsFormat(), and m_mutex.

Referenced by GetValueAs().

◆ GetLanguageValue()

std::optional< lldb::LanguageType > OptionValue::GetLanguageValue ( ) const
private

Definition at line 369 of file OptionValue.cpp.

References GetAsLanguage(), and m_mutex.

Referenced by GetValueAs().

◆ GetName()

virtual llvm::StringRef lldb_private::OptionValue::GetName ( ) const
inlinevirtual

Reimplemented in lldb_private::OptionValueProperties.

Definition at line 132 of file OptionValue.h.

Referenced by DumpQualifiedName().

◆ GetParent()

lldb::OptionValueSP lldb_private::OptionValue::GetParent ( ) const
inline

Definition at line 261 of file OptionValue.h.

References m_parent_wp.

◆ GetRegexValue()

const RegularExpression * OptionValue::GetRegexValue ( ) const
private

Definition at line 392 of file OptionValue.cpp.

References GetAsRegex(), and m_mutex.

Referenced by GetValueAs().

◆ GetSInt64Value()

std::optional< int64_t > OptionValue::GetSInt64Value ( ) const
private

Definition at line 399 of file OptionValue.cpp.

References GetAsSInt64(), and m_mutex.

Referenced by GetValueAs().

◆ GetStringValue()

std::optional< llvm::StringRef > OptionValue::GetStringValue ( ) const
private

Definition at line 415 of file OptionValue.cpp.

References GetAsString(), and m_mutex.

Referenced by GetValueAs().

◆ GetSubValue()

virtual lldb::OptionValueSP lldb_private::OptionValue::GetSubValue ( const ExecutionContext exe_ctx,
llvm::StringRef  name,
Status error 
) const
inlinevirtual

◆ GetType()

virtual Type lldb_private::OptionValue::GetType ( ) const
pure virtual

◆ GetTypeAsCString()

virtual const char * lldb_private::OptionValue::GetTypeAsCString ( ) const
inlinevirtual

◆ GetTypeAsMask()

uint32_t lldb_private::OptionValue::GetTypeAsMask ( )
inline

Definition at line 138 of file OptionValue.h.

References GetType().

◆ GetUInt64Value()

std::optional< uint64_t > OptionValue::GetUInt64Value ( ) const
private

Definition at line 431 of file OptionValue.cpp.

References GetAsUInt64(), and m_mutex.

Referenced by GetValueAs().

◆ GetUUIDValue()

std::optional< UUID > OptionValue::GetUUIDValue ( ) const
private

Definition at line 447 of file OptionValue.cpp.

References GetAsUUID(), and m_mutex.

◆ GetValueAs() [1/2]

template<typename T , std::enable_if_t<!std::is_pointer_v< T >, bool > = true>
std::optional< T > lldb_private::OptionValue::GetValueAs ( ) const
inline

◆ GetValueAs() [2/2]

template<typename T , typename U = typename std::remove_const< typename std::remove_pointer<T>::type>::type, std::enable_if_t< std::is_pointer_v< T >, bool > = true>
T lldb_private::OptionValue::GetValueAs ( ) const
inline

Definition at line 304 of file OptionValue.h.

References GetFormatEntity(), and GetRegexValue().

◆ IsAggregateValue()

virtual bool lldb_private::OptionValue::IsAggregateValue ( ) const
inlinevirtual

◆ NotifyValueChanged()

void lldb_private::OptionValue::NotifyValueChanged ( )
inline

◆ operator=()

OptionValue & OptionValue::operator= ( const OptionValue other)

Definition at line 27 of file OptionValue.cpp.

References m_callback, m_mutex, m_parent_wp, and m_value_was_set.

◆ OptionWasSet()

bool lldb_private::OptionValue::OptionWasSet ( ) const
inline

◆ SetArchSpecValue()

bool OptionValue::SetArchSpecValue ( ArchSpec  arch_spec)
private

Definition at line 470 of file OptionValue.cpp.

References GetAsArch(), and m_mutex.

Referenced by SetValueAs().

◆ SetBooleanValue()

bool OptionValue::SetBooleanValue ( bool  new_value)
private

Definition at line 280 of file OptionValue.cpp.

References GetAsBoolean(), and m_mutex.

Referenced by SetValueAs().

◆ SetCharValue()

bool OptionValue::SetCharValue ( char  new_value)
private

Definition at line 296 of file OptionValue.cpp.

References GetAsChar(), and m_mutex.

Referenced by SetValueAs().

◆ SetEnumerationValue()

bool OptionValue::SetEnumerationValue ( int64_t  value)
private

Definition at line 312 of file OptionValue.cpp.

References GetAsEnumeration(), and m_mutex.

Referenced by SetValueAs().

◆ SetFileSpecValue()

bool OptionValue::SetFileSpecValue ( FileSpec  file_spec)
private

Definition at line 328 of file OptionValue.cpp.

References GetAsFileSpec(), and m_mutex.

Referenced by SetValueAs().

◆ SetFormatValue()

bool OptionValue::SetFormatValue ( lldb::Format  new_value)
private

Definition at line 360 of file OptionValue.cpp.

References GetAsFormat(), and m_mutex.

Referenced by SetValueAs().

◆ SetLanguageValue()

bool OptionValue::SetLanguageValue ( lldb::LanguageType  new_language)
private

Definition at line 376 of file OptionValue.cpp.

References GetAsLanguage(), and m_mutex.

Referenced by SetValueAs().

◆ SetOptionWasSet()

void lldb_private::OptionValue::SetOptionWasSet ( )
inline

◆ SetParent()

void lldb_private::OptionValue::SetParent ( const lldb::OptionValueSP parent_sp)
inline

Definition at line 257 of file OptionValue.h.

References m_parent_wp.

◆ SetSInt64Value()

bool OptionValue::SetSInt64Value ( int64_t  new_value)
private

Definition at line 406 of file OptionValue.cpp.

References GetAsSInt64(), and m_mutex.

Referenced by SetValueAs().

◆ SetStringValue()

bool OptionValue::SetStringValue ( llvm::StringRef  new_value)
private

Definition at line 422 of file OptionValue.cpp.

References GetAsString(), and m_mutex.

Referenced by SetValueAs().

◆ SetSubValue()

Status OptionValue::SetSubValue ( const ExecutionContext exe_ctx,
VarSetOperationType  op,
llvm::StringRef  name,
llvm::StringRef  value 
)
virtual

Reimplemented in lldb_private::OptionValueDictionary, and lldb_private::OptionValueProperties.

Definition at line 37 of file OptionValue.cpp.

References error().

◆ SetUInt64Value()

bool OptionValue::SetUInt64Value ( uint64_t  new_value)
private

Definition at line 438 of file OptionValue.cpp.

References GetAsUInt64(), and m_mutex.

Referenced by SetValueAs().

◆ SetUUIDValue()

bool OptionValue::SetUUIDValue ( const UUID uuid)
private

Definition at line 454 of file OptionValue.cpp.

References GetAsUUID(), and m_mutex.

Referenced by SetValueAs().

◆ SetValueAs() [1/11]

bool lldb_private::OptionValue::SetValueAs ( ArchSpec  v)
inline

Definition at line 330 of file OptionValue.h.

References SetArchSpecValue().

◆ SetValueAs() [2/11]

bool lldb_private::OptionValue::SetValueAs ( bool  v)
inline

Definition at line 312 of file OptionValue.h.

References SetBooleanValue().

◆ SetValueAs() [3/11]

bool lldb_private::OptionValue::SetValueAs ( char  v)
inline

Definition at line 314 of file OptionValue.h.

References SetCharValue().

◆ SetValueAs() [4/11]

bool lldb_private::OptionValue::SetValueAs ( FileSpec  v)
inline

Definition at line 328 of file OptionValue.h.

References SetFileSpecValue().

◆ SetValueAs() [5/11]

bool lldb_private::OptionValue::SetValueAs ( int64_t  v)
inline

Definition at line 318 of file OptionValue.h.

References SetSInt64Value().

◆ SetValueAs() [6/11]

bool lldb_private::OptionValue::SetValueAs ( lldb::Format  v)
inline

Definition at line 326 of file OptionValue.h.

References SetFormatValue().

◆ SetValueAs() [7/11]

bool lldb_private::OptionValue::SetValueAs ( lldb::LanguageType  v)
inline

Definition at line 324 of file OptionValue.h.

References SetLanguageValue().

◆ SetValueAs() [8/11]

bool lldb_private::OptionValue::SetValueAs ( llvm::StringRef  v)
inline

Definition at line 322 of file OptionValue.h.

References SetStringValue().

◆ SetValueAs() [9/11]

template<typename T , std::enable_if_t< std::is_enum_v< T >, bool > = true>
bool lldb_private::OptionValue::SetValueAs ( t)
inline

Definition at line 333 of file OptionValue.h.

References SetEnumerationValue().

◆ SetValueAs() [10/11]

bool lldb_private::OptionValue::SetValueAs ( uint64_t  v)
inline

Definition at line 316 of file OptionValue.h.

References SetUInt64Value().

◆ SetValueAs() [11/11]

bool lldb_private::OptionValue::SetValueAs ( UUID  v)
inline

Definition at line 320 of file OptionValue.h.

References SetUUIDValue().

◆ SetValueChangedCallback()

void lldb_private::OptionValue::SetValueChangedCallback ( std::function< void()>  callback)
inline

Definition at line 263 of file OptionValue.h.

References m_callback.

◆ SetValueFromString()

Status OptionValue::SetValueFromString ( llvm::StringRef  value,
VarSetOperationType  op = eVarSetOperationAssign 
)
virtual

Reimplemented in lldb_private::OptionValueArch, lldb_private::OptionValueArray, lldb_private::OptionValueBoolean, lldb_private::OptionValueChar, lldb_private::OptionValueDictionary, lldb_private::OptionValueEnumeration, lldb_private::OptionValueFileColonLine, lldb_private::OptionValueFileSpec, lldb_private::OptionValueFileSpecList, lldb_private::OptionValueFormat, lldb_private::OptionValueFormatEntity, lldb_private::OptionValueLanguage, lldb_private::OptionValuePathMappings, lldb_private::OptionValueProperties, lldb_private::OptionValueRegex, lldb_private::OptionValueSInt64, lldb_private::OptionValueString, lldb_private::OptionValueUInt64, and lldb_private::OptionValueUUID.

Definition at line 602 of file OptionValue.cpp.

References error(), lldb_private::eVarSetOperationAppend, lldb_private::eVarSetOperationAssign, lldb_private::eVarSetOperationClear, lldb_private::eVarSetOperationInsertAfter, lldb_private::eVarSetOperationInsertBefore, lldb_private::eVarSetOperationInvalid, lldb_private::eVarSetOperationRemove, lldb_private::eVarSetOperationReplace, and GetTypeAsCString().

Referenced by lldb_private::OptionValueDictionary::SetArgs(), lldb_private::OptionValueArch::SetValueFromString(), lldb_private::OptionValueBoolean::SetValueFromString(), lldb_private::OptionValueChar::SetValueFromString(), lldb_private::OptionValueEnumeration::SetValueFromString(), lldb_private::OptionValueFileColonLine::SetValueFromString(), lldb_private::OptionValueFileSpec::SetValueFromString(), lldb_private::OptionValueFileSpecList::SetValueFromString(), lldb_private::OptionValueFormat::SetValueFromString(), lldb_private::OptionValueFormatEntity::SetValueFromString(), lldb_private::OptionValueLanguage::SetValueFromString(), lldb_private::OptionValuePathMappings::SetValueFromString(), lldb_private::OptionValueProperties::SetValueFromString(), lldb_private::OptionValueRegex::SetValueFromString(), lldb_private::OptionValueSInt64::SetValueFromString(), lldb_private::OptionValueString::SetValueFromString(), lldb_private::OptionValueUInt64::SetValueFromString(), and lldb_private::OptionValueUUID::SetValueFromString().

◆ ToJSON()

virtual llvm::json::Value lldb_private::OptionValue::ToJSON ( const ExecutionContext exe_ctx)
inlinevirtual

◆ ValueIsTransparent()

virtual bool lldb_private::OptionValue::ValueIsTransparent ( ) const
inlinevirtual

Definition at line 83 of file OptionValue.h.

References eTypeProperties, and GetType().

Referenced by lldb_private::OptionValueProperties::DumpValue().

Member Data Documentation

◆ m_callback

std::function<void()> lldb_private::OptionValue::m_callback
protected

Definition at line 345 of file OptionValue.h.

Referenced by NotifyValueChanged(), operator=(), OptionValue(), and SetValueChangedCallback().

◆ m_mutex

std::mutex lldb_private::OptionValue::m_mutex
mutableprivate

◆ m_parent_wp

lldb::OptionValueWP lldb_private::OptionValue::m_parent_wp
protected

Definition at line 344 of file OptionValue.h.

Referenced by DumpQualifiedName(), GetParent(), operator=(), OptionValue(), and SetParent().

◆ m_value_was_set

bool lldb_private::OptionValue::m_value_was_set = false
protected

Definition at line 346 of file OptionValue.h.

Referenced by lldb_private::OptionValueArch::Clear(), lldb_private::OptionValueArray::Clear(), lldb_private::OptionValueBoolean::Clear(), lldb_private::OptionValueChar::Clear(), lldb_private::OptionValueDictionary::Clear(), lldb_private::OptionValueEnumeration::Clear(), lldb_private::OptionValueFileSpec::Clear(), lldb_private::OptionValueFileSpecList::Clear(), lldb_private::OptionValueFormat::Clear(), lldb_private::OptionValueFormatEntity::Clear(), lldb_private::OptionValueLanguage::Clear(), lldb_private::OptionValuePathMappings::Clear(), lldb_private::OptionValueRegex::Clear(), lldb_private::OptionValueSInt64::Clear(), lldb_private::OptionValueString::Clear(), lldb_private::OptionValueUInt64::Clear(), lldb_private::OptionValueUUID::Clear(), lldb_private::OptionValueString::DumpValue(), operator=(), OptionValue(), OptionWasSet(), lldb_private::OptionValueArray::SetArgs(), lldb_private::OptionValueDictionary::SetArgs(), lldb_private::OptionValueArch::SetCurrentValue(), lldb_private::OptionValueFileSpec::SetCurrentValue(), SetOptionWasSet(), lldb_private::OptionValueArch::SetValueFromString(), lldb_private::OptionValueBoolean::SetValueFromString(), lldb_private::OptionValueChar::SetValueFromString(), lldb_private::OptionValueFileColonLine::SetValueFromString(), lldb_private::OptionValueFileSpec::SetValueFromString(), lldb_private::OptionValueFileSpecList::SetValueFromString(), lldb_private::OptionValueFormat::SetValueFromString(), lldb_private::OptionValueFormatEntity::SetValueFromString(), lldb_private::OptionValueLanguage::SetValueFromString(), lldb_private::OptionValuePathMappings::SetValueFromString(), lldb_private::OptionValueRegex::SetValueFromString(), lldb_private::OptionValueSInt64::SetValueFromString(), lldb_private::OptionValueString::SetValueFromString(), lldb_private::OptionValueUInt64::SetValueFromString(), and lldb_private::OptionValueUUID::SetValueFromString().


The documentation for this class was generated from the following files: