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

#include <OptionValue.h>

Inheritance diagram for lldb_private::OptionValue:
Inheritance graph
[legend]
Collaboration diagram for lldb_private::OptionValue:
Collaboration 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
 
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 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)
 
OptionValueArchGetAsArch ()
 
const OptionValueArchGetAsArch () const
 
OptionValueArrayGetAsArray ()
 
const OptionValueArrayGetAsArray () const
 
OptionValueArgsGetAsArgs ()
 
const OptionValueArgsGetAsArgs () const
 
OptionValueBooleanGetAsBoolean ()
 
OptionValueCharGetAsChar ()
 
const OptionValueBooleanGetAsBoolean () const
 
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 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::EntryGetFormatEntity () const
 
const RegularExpressionGetRegexValue () 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 ()
 

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
 

Detailed Description

Definition at line 24 of file OptionValue.h.

Member Typedef Documentation

◆ TopmostBase

Definition at line 324 of file OptionValue.h.

Member Enumeration Documentation

◆ anonymous enum

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

Definition at line 50 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 26 of file OptionValue.h.

Constructor & Destructor Documentation

◆ OptionValue()

lldb_private::OptionValue::OptionValue ( )
default

◆ ~OptionValue()

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

Member Function Documentation

◆ 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

◆ 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 120 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 552 of file OptionValue.cpp.

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

◆ DumpValue()

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

◆ GetAsArch() [1/2]

const OptionValueArch * OptionValue::GetAsArch ( )

Definition at line 94 of file OptionValue.cpp.

◆ GetAsArch() [2/2]

const OptionValueArch* lldb_private::OptionValue::GetAsArch ( ) const

◆ GetAsArgs() [1/2]

const OptionValueArgs * OptionValue::GetAsArgs ( )

◆ GetAsArgs() [2/2]

const OptionValueArgs* lldb_private::OptionValue::GetAsArgs ( ) const

◆ GetAsArray() [1/2]

const OptionValueArray * OptionValue::GetAsArray ( )

◆ GetAsArray() [2/2]

const OptionValueArray* lldb_private::OptionValue::GetAsArray ( ) const

◆ GetAsBoolean() [1/2]

const OptionValueBoolean * OptionValue::GetAsBoolean ( )

Definition at line 46 of file OptionValue.cpp.

◆ GetAsBoolean() [2/2]

const OptionValueBoolean* lldb_private::OptionValue::GetAsBoolean ( ) const

◆ GetAsChar() [1/2]

OptionValueChar * OptionValue::GetAsChar ( )

Definition at line 58 of file OptionValue.cpp.

◆ GetAsChar() [2/2]

const OptionValueChar* lldb_private::OptionValue::GetAsChar ( ) const

◆ GetAsDictionary() [1/2]

const OptionValueDictionary * OptionValue::GetAsDictionary ( )

◆ GetAsDictionary() [2/2]

const OptionValueDictionary* lldb_private::OptionValue::GetAsDictionary ( ) const

◆ GetAsEnumeration() [1/2]

const OptionValueEnumeration * OptionValue::GetAsEnumeration ( )

Definition at line 142 of file OptionValue.cpp.

◆ GetAsEnumeration() [2/2]

const OptionValueEnumeration* lldb_private::OptionValue::GetAsEnumeration ( ) const

◆ GetAsFileSpec() [1/2]

const OptionValueFileSpec * OptionValue::GetAsFileSpec ( )

◆ GetAsFileSpec() [2/2]

const OptionValueFileSpec* lldb_private::OptionValue::GetAsFileSpec ( ) const

◆ GetAsFileSpecList() [1/2]

const OptionValueFileSpecList * OptionValue::GetAsFileSpecList ( )

Definition at line 82 of file OptionValue.cpp.

◆ GetAsFileSpecList() [2/2]

const OptionValueFileSpecList* lldb_private::OptionValue::GetAsFileSpecList ( ) const

◆ GetAsFormat() [1/2]

const OptionValueFormat * OptionValue::GetAsFormat ( )

Definition at line 154 of file OptionValue.cpp.

◆ GetAsFormat() [2/2]

const OptionValueFormat* lldb_private::OptionValue::GetAsFormat ( ) const

◆ GetAsFormatEntity() [1/2]

const OptionValueFormatEntity * OptionValue::GetAsFormatEntity ( )

Definition at line 178 of file OptionValue.cpp.

◆ GetAsFormatEntity() [2/2]

const OptionValueFormatEntity* lldb_private::OptionValue::GetAsFormatEntity ( ) const

◆ GetAsLanguage() [1/2]

const OptionValueLanguage * OptionValue::GetAsLanguage ( )

Definition at line 166 of file OptionValue.cpp.

◆ GetAsLanguage() [2/2]

const OptionValueLanguage* lldb_private::OptionValue::GetAsLanguage ( ) const

◆ GetAsPathMappings() [1/2]

const OptionValuePathMappings * OptionValue::GetAsPathMappings ( )

Definition at line 190 of file OptionValue.cpp.

◆ GetAsPathMappings() [2/2]

const OptionValuePathMappings* lldb_private::OptionValue::GetAsPathMappings ( ) const

◆ GetAsProperties() [1/2]

const OptionValueProperties * OptionValue::GetAsProperties ( )

◆ GetAsProperties() [2/2]

const OptionValueProperties* lldb_private::OptionValue::GetAsProperties ( ) const

◆ GetAsRegex() [1/2]

const OptionValueRegex * OptionValue::GetAsRegex ( )

◆ GetAsRegex() [2/2]

const OptionValueRegex* lldb_private::OptionValue::GetAsRegex ( ) const

◆ GetAsSInt64() [1/2]

const OptionValueSInt64 * OptionValue::GetAsSInt64 ( )

◆ GetAsSInt64() [2/2]

const OptionValueSInt64* lldb_private::OptionValue::GetAsSInt64 ( ) const

◆ GetAsString() [1/2]

const OptionValueString * OptionValue::GetAsString ( )

Definition at line 238 of file OptionValue.cpp.

◆ GetAsString() [2/2]

const OptionValueString* lldb_private::OptionValue::GetAsString ( ) const

◆ GetAsUInt64() [1/2]

const OptionValueUInt64 * OptionValue::GetAsUInt64 ( )

Definition at line 250 of file OptionValue.cpp.

◆ GetAsUInt64() [2/2]

const OptionValueUInt64* lldb_private::OptionValue::GetAsUInt64 ( ) const

◆ GetAsUUID() [1/2]

const OptionValueUUID * OptionValue::GetAsUUID ( )

Definition at line 262 of file OptionValue.cpp.

◆ GetAsUUID() [2/2]

const OptionValueUUID* lldb_private::OptionValue::GetAsUUID ( ) const

◆ GetBooleanValue()

bool OptionValue::GetBooleanValue ( bool  fail_value = false) const

◆ GetBuiltinTypeAsCString()

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

Definition at line 456 of file OptionValue.cpp.

Referenced by GetTypeAsCString().

◆ GetCharValue()

char OptionValue::GetCharValue ( char  fail_value) const

Definition at line 290 of file OptionValue.cpp.

References lldb_private::OptionValueChar::GetCurrentValue().

◆ GetEnumerationValue()

int64_t OptionValue::GetEnumerationValue ( int64_t  fail_value = -1) const

◆ GetFileSpecListValue()

FileSpecList OptionValue::GetFileSpecListValue ( ) const

◆ GetFileSpecValue()

FileSpec OptionValue::GetFileSpecValue ( ) const

◆ GetFormatEntity()

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

◆ GetFormatValue()

lldb::Format OptionValue::GetFormatValue ( lldb::Format  fail_value = lldb::eFormatDefault) const

◆ GetLanguageValue()

lldb::LanguageType OptionValue::GetLanguageValue ( lldb::LanguageType  fail_value = lldb::eLanguageTypeUnknown) const

◆ GetName()

virtual ConstString lldb_private::OptionValue::GetName ( ) const
inlinevirtual

Reimplemented in lldb_private::OptionValueProperties.

Definition at line 112 of file OptionValue.h.

◆ GetParent()

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

Definition at line 311 of file OptionValue.h.

References m_parent_wp.

◆ GetRegexValue()

const RegularExpression * OptionValue::GetRegexValue ( ) const

◆ GetSInt64Value()

int64_t OptionValue::GetSInt64Value ( int64_t  fail_value = 0) const

◆ GetStringValue() [1/2]

llvm::StringRef lldb_private::OptionValue::GetStringValue ( ) const
inline

Definition at line 291 of file OptionValue.h.

References GetStringValue().

Referenced by GetStringValue().

◆ GetStringValue() [2/2]

llvm::StringRef OptionValue::GetStringValue ( llvm::StringRef  fail_value) const

◆ GetSubValue()

virtual lldb::OptionValueSP lldb_private::OptionValue::GetSubValue ( const ExecutionContext exe_ctx,
llvm::StringRef  name,
bool  will_modify,
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 118 of file OptionValue.h.

References GetType().

◆ GetUInt64Value() [1/2]

uint64_t OptionValue::GetUInt64Value ( uint64_t  fail_value,
bool *  success_ptr 
)

◆ GetUInt64Value() [2/2]

uint64_t OptionValue::GetUInt64Value ( uint64_t  fail_value = 0) const

◆ GetUUIDValue()

UUID OptionValue::GetUUIDValue ( ) const

Definition at line 440 of file OptionValue.cpp.

References lldb_private::OptionValueUUID::GetCurrentValue().

◆ IsAggregateValue()

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

◆ NotifyValueChanged()

void lldb_private::OptionValue::NotifyValueChanged ( )
inline

◆ OptionWasSet()

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

◆ SetBooleanValue()

bool OptionValue::SetBooleanValue ( bool  new_value)

◆ SetCharValue()

char OptionValue::SetCharValue ( char  new_value)

Definition at line 297 of file OptionValue.cpp.

References lldb_private::OptionValueChar::SetCurrentValue().

◆ SetEnumerationValue()

bool OptionValue::SetEnumerationValue ( int64_t  value)

◆ SetFileSpecValue()

bool OptionValue::SetFileSpecValue ( const FileSpec file_spec)

◆ SetFormatValue()

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

◆ SetLanguageValue()

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

◆ SetOptionWasSet()

void lldb_private::OptionValue::SetOptionWasSet ( )
inline

◆ SetParent()

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

Definition at line 307 of file OptionValue.h.

References m_parent_wp.

◆ SetSInt64Value()

bool OptionValue::SetSInt64Value ( int64_t  new_value)

◆ SetStringValue()

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

◆ SetSubValue()

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

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

Definition at line 38 of file OptionValue.cpp.

References error().

◆ SetUInt64Value()

bool OptionValue::SetUInt64Value ( uint64_t  new_value)

◆ SetUUIDValue()

bool OptionValue::SetUUIDValue ( const UUID uuid)

Definition at line 447 of file OptionValue.cpp.

References lldb_private::OptionValueUUID::SetCurrentValue().

◆ SetValueChangedCallback()

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

Definition at line 313 of file OptionValue.h.

References m_callback.

◆ SetValueFromString()

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

◆ ValueIsTransparent()

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

Definition at line 72 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 331 of file OptionValue.h.

Referenced by NotifyValueChanged(), and SetValueChangedCallback().

◆ m_parent_wp

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

Definition at line 330 of file OptionValue.h.

Referenced by GetParent(), and SetParent().

◆ m_value_was_set

bool lldb_private::OptionValue::m_value_was_set = false
protected

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