LLDB  mainline
Public Types | Public Member Functions | Static Public 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,
  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 ()
 
 OptionValue (const OptionValue &rhs)
 
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 bool Clear ()=0
 
virtual lldb::OptionValueSP DeepCopy () const =0
 
virtual size_t 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)
 
void SetValueChangedCallback (OptionValueChangedCallback callback, void *baton)
 
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 Attributes

lldb::OptionValueWP m_parent_wp
 
OptionValueChangedCallback m_callback
 
void * m_baton
 
bool m_value_was_set
 

Detailed Description

Definition at line 23 of file OptionValue.h.

Member Enumeration Documentation

◆ anonymous enum

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

Definition at line 48 of file OptionValue.h.

◆ Type

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

Definition at line 25 of file OptionValue.h.

Constructor & Destructor Documentation

◆ OptionValue() [1/2]

lldb_private::OptionValue::OptionValue ( )
inline

Definition at line 61 of file OptionValue.h.

◆ OptionValue() [2/2]

lldb_private::OptionValue::OptionValue ( const OptionValue rhs)
inline

Definition at line 64 of file OptionValue.h.

References GetType(), and ~OptionValue().

◆ ~OptionValue()

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

Referenced by OptionValue().

Member Function Documentation

◆ AutoComplete()

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

◆ Clear()

virtual bool lldb_private::OptionValue::Clear ( )
pure 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 122 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()

virtual lldb::OptionValueSP lldb_private::OptionValue::DeepCopy ( ) const
pure virtual

◆ DumpQualifiedName()

bool OptionValue::DumpQualifiedName ( Stream strm) const
virtual

Definition at line 550 of file OptionValue.cpp.

References lldb_private::Stream::PutChar().

Referenced by GetName().

◆ DumpValue()

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

◆ GetAsArch() [1/2]

OptionValueArch * OptionValue::GetAsArch ( )

Definition at line 93 of file OptionValue.cpp.

Referenced by ConvertTypeMaskToType().

◆ GetAsArch() [2/2]

const OptionValueArch * OptionValue::GetAsArch ( ) const

Definition at line 99 of file OptionValue.cpp.

◆ GetAsArgs() [1/2]

OptionValueArgs * OptionValue::GetAsArgs ( )

Definition at line 117 of file OptionValue.cpp.

Referenced by ConvertTypeMaskToType().

◆ GetAsArgs() [2/2]

const OptionValueArgs * OptionValue::GetAsArgs ( ) const

Definition at line 123 of file OptionValue.cpp.

◆ GetAsArray() [1/2]

OptionValueArray * OptionValue::GetAsArray ( )

◆ GetAsArray() [2/2]

const OptionValueArray * OptionValue::GetAsArray ( ) const

Definition at line 111 of file OptionValue.cpp.

◆ GetAsBoolean() [1/2]

OptionValueBoolean * OptionValue::GetAsBoolean ( )

Definition at line 45 of file OptionValue.cpp.

Referenced by ConvertTypeMaskToType().

◆ GetAsBoolean() [2/2]

const OptionValueBoolean * OptionValue::GetAsBoolean ( ) const

Definition at line 51 of file OptionValue.cpp.

◆ GetAsChar() [1/2]

OptionValueChar * OptionValue::GetAsChar ( )

Definition at line 63 of file OptionValue.cpp.

Referenced by ConvertTypeMaskToType().

◆ GetAsChar() [2/2]

const OptionValueChar * OptionValue::GetAsChar ( ) const

Definition at line 57 of file OptionValue.cpp.

◆ GetAsDictionary() [1/2]

OptionValueDictionary * OptionValue::GetAsDictionary ( )

◆ GetAsDictionary() [2/2]

const OptionValueDictionary * OptionValue::GetAsDictionary ( ) const

Definition at line 135 of file OptionValue.cpp.

◆ GetAsEnumeration() [1/2]

OptionValueEnumeration * OptionValue::GetAsEnumeration ( )

Definition at line 141 of file OptionValue.cpp.

Referenced by ConvertTypeMaskToType().

◆ GetAsEnumeration() [2/2]

const OptionValueEnumeration * OptionValue::GetAsEnumeration ( ) const

Definition at line 147 of file OptionValue.cpp.

◆ GetAsFileSpec() [1/2]

OptionValueFileSpec * OptionValue::GetAsFileSpec ( )

◆ GetAsFileSpec() [2/2]

const OptionValueFileSpec * OptionValue::GetAsFileSpec ( ) const

Definition at line 75 of file OptionValue.cpp.

◆ GetAsFileSpecList() [1/2]

OptionValueFileSpecList * OptionValue::GetAsFileSpecList ( )

Definition at line 81 of file OptionValue.cpp.

Referenced by ConvertTypeMaskToType().

◆ GetAsFileSpecList() [2/2]

const OptionValueFileSpecList * OptionValue::GetAsFileSpecList ( ) const

Definition at line 87 of file OptionValue.cpp.

◆ GetAsFormat() [1/2]

OptionValueFormat * OptionValue::GetAsFormat ( )

Definition at line 153 of file OptionValue.cpp.

Referenced by ConvertTypeMaskToType().

◆ GetAsFormat() [2/2]

const OptionValueFormat * OptionValue::GetAsFormat ( ) const

Definition at line 159 of file OptionValue.cpp.

◆ GetAsFormatEntity() [1/2]

OptionValueFormatEntity * OptionValue::GetAsFormatEntity ( )

Definition at line 177 of file OptionValue.cpp.

Referenced by ConvertTypeMaskToType().

◆ GetAsFormatEntity() [2/2]

const OptionValueFormatEntity * OptionValue::GetAsFormatEntity ( ) const

Definition at line 183 of file OptionValue.cpp.

◆ GetAsLanguage() [1/2]

OptionValueLanguage * OptionValue::GetAsLanguage ( )

Definition at line 165 of file OptionValue.cpp.

Referenced by ConvertTypeMaskToType().

◆ GetAsLanguage() [2/2]

const OptionValueLanguage * OptionValue::GetAsLanguage ( ) const

Definition at line 171 of file OptionValue.cpp.

◆ GetAsPathMappings() [1/2]

OptionValuePathMappings * OptionValue::GetAsPathMappings ( )

Definition at line 189 of file OptionValue.cpp.

Referenced by ConvertTypeMaskToType().

◆ GetAsPathMappings() [2/2]

const OptionValuePathMappings * OptionValue::GetAsPathMappings ( ) const

Definition at line 195 of file OptionValue.cpp.

◆ GetAsProperties() [1/2]

OptionValueProperties * OptionValue::GetAsProperties ( )

◆ GetAsProperties() [2/2]

const OptionValueProperties * OptionValue::GetAsProperties ( ) const

Definition at line 207 of file OptionValue.cpp.

◆ GetAsRegex() [1/2]

OptionValueRegex * OptionValue::GetAsRegex ( )

◆ GetAsRegex() [2/2]

const OptionValueRegex * OptionValue::GetAsRegex ( ) const

Definition at line 219 of file OptionValue.cpp.

◆ GetAsSInt64() [1/2]

OptionValueSInt64 * OptionValue::GetAsSInt64 ( )

◆ GetAsSInt64() [2/2]

const OptionValueSInt64 * OptionValue::GetAsSInt64 ( ) const

Definition at line 231 of file OptionValue.cpp.

◆ GetAsString() [1/2]

OptionValueString * OptionValue::GetAsString ( )

Definition at line 237 of file OptionValue.cpp.

Referenced by ConvertTypeMaskToType().

◆ GetAsString() [2/2]

const OptionValueString * OptionValue::GetAsString ( ) const

Definition at line 243 of file OptionValue.cpp.

◆ GetAsUInt64() [1/2]

OptionValueUInt64 * OptionValue::GetAsUInt64 ( )

Definition at line 249 of file OptionValue.cpp.

Referenced by ConvertTypeMaskToType().

◆ GetAsUInt64() [2/2]

const OptionValueUInt64 * OptionValue::GetAsUInt64 ( ) const

Definition at line 255 of file OptionValue.cpp.

◆ GetAsUUID() [1/2]

OptionValueUUID * OptionValue::GetAsUUID ( )

Definition at line 261 of file OptionValue.cpp.

Referenced by ConvertTypeMaskToType().

◆ GetAsUUID() [2/2]

const OptionValueUUID * OptionValue::GetAsUUID ( ) const

Definition at line 267 of file OptionValue.cpp.

◆ GetBooleanValue()

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

◆ GetBuiltinTypeAsCString()

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

Definition at line 455 of file OptionValue.cpp.

Referenced by GetTypeAsCString().

◆ GetCharValue()

char OptionValue::GetCharValue ( char  fail_value) const

Definition at line 289 of file OptionValue.cpp.

References lldb_private::OptionValueChar::GetCurrentValue().

Referenced by ConvertTypeMaskToType().

◆ 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 114 of file OptionValue.h.

References DumpQualifiedName().

◆ GetRegexValue()

const RegularExpression * OptionValue::GetRegexValue ( ) const

◆ GetSInt64Value()

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

◆ GetStringValue() [1/2]

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

◆ GetStringValue() [2/2]

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

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

References lldb_private::OptionValueUUID::GetCurrentValue().

Referenced by GetStringValue().

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

References lldb_private::OptionValueChar::SetCurrentValue().

Referenced by ConvertTypeMaskToType().

◆ 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

◆ SetUInt64Value()

bool OptionValue::SetUInt64Value ( uint64_t  new_value)

◆ SetUUIDValue()

bool OptionValue::SetUUIDValue ( const UUID uuid)

Definition at line 446 of file OptionValue.cpp.

References lldb_private::OptionValueUUID::SetCurrentValue().

Referenced by GetStringValue().

◆ SetValueChangedCallback()

void lldb_private::OptionValue::SetValueChangedCallback ( OptionValueChangedCallback  callback,
void *  baton 
)
inline

Definition at line 311 of file OptionValue.h.

References m_baton, and 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 75 of file OptionValue.h.

References eTypeProperties, and GetType().

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

Member Data Documentation

◆ m_baton

void* lldb_private::OptionValue::m_baton
protected

Definition at line 326 of file OptionValue.h.

Referenced by NotifyValueChanged(), and SetValueChangedCallback().

◆ m_callback

OptionValueChangedCallback lldb_private::OptionValue::m_callback
protected

◆ m_parent_wp

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

Definition at line 324 of file OptionValue.h.

Referenced by SetParent().

◆ m_value_was_set

bool lldb_private::OptionValue::m_value_was_set
protected

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