LLDB mainline
|
#include <SBStructuredData.h>
Public Member Functions | |
SBStructuredData () | |
SBStructuredData (const lldb::SBStructuredData &rhs) | |
SBStructuredData (const lldb::EventSP &event_sp) | |
SBStructuredData (const lldb_private::StructuredDataImpl &impl) | |
~SBStructuredData () | |
lldb::SBStructuredData & | operator= (const lldb::SBStructuredData &rhs) |
operator bool () const | |
bool | IsValid () const |
lldb::SBError | SetFromJSON (lldb::SBStream &stream) |
lldb::SBError | SetFromJSON (const char *json) |
void | Clear () |
lldb::SBError | GetAsJSON (lldb::SBStream &stream) const |
lldb::SBError | GetDescription (lldb::SBStream &stream) const |
lldb::StructuredDataType | GetType () const |
Return the type of data in this data structure. | |
size_t | GetSize () const |
Return the size (i.e. | |
bool | GetKeys (lldb::SBStringList &keys) const |
Fill keys with the keys in this object and return true if this data structure is a dictionary. | |
lldb::SBStructuredData | GetValueForKey (const char *key) const |
Return the value corresponding to a key if this data structure is a dictionary type. | |
lldb::SBStructuredData | GetItemAtIndex (size_t idx) const |
Return the value corresponding to an index if this data structure is array. | |
uint64_t | GetIntegerValue (uint64_t fail_value=0) const |
Return the integer value if this data structure is an integer type. | |
double | GetFloatValue (double fail_value=0.0) const |
Return the floating point value if this data structure is a floating type. | |
bool | GetBooleanValue (bool fail_value=false) const |
Return the boolean value if this data structure is a boolean type. | |
size_t | GetStringValue (char *dst, size_t dst_len) const |
Provides the string value if this data structure is a string type. | |
Protected Attributes | |
StructuredDataImplUP | m_impl_up |
Friends | |
class | SBLaunchInfo |
class | SBDebugger |
class | SBTarget |
class | SBProcess |
class | SBThread |
class | SBThreadPlan |
class | SBBreakpoint |
class | SBBreakpointLocation |
class | SBBreakpointName |
class | SBTrace |
Definition at line 17 of file SBStructuredData.h.
SBStructuredData::SBStructuredData | ( | ) |
Definition at line 27 of file SBStructuredData.cpp.
References LLDB_INSTRUMENT_VA.
SBStructuredData::SBStructuredData | ( | const lldb::SBStructuredData & | rhs | ) |
Definition at line 31 of file SBStructuredData.cpp.
References LLDB_INSTRUMENT_VA.
SBStructuredData::SBStructuredData | ( | const lldb::EventSP & | event_sp | ) |
Definition at line 36 of file SBStructuredData.cpp.
References LLDB_INSTRUMENT_VA.
SBStructuredData::SBStructuredData | ( | const lldb_private::StructuredDataImpl & | impl | ) |
Definition at line 41 of file SBStructuredData.cpp.
References LLDB_INSTRUMENT_VA.
|
default |
void SBStructuredData::Clear | ( | ) |
Definition at line 88 of file SBStructuredData.cpp.
References LLDB_INSTRUMENT_VA, and m_impl_up.
SBError SBStructuredData::GetAsJSON | ( | lldb::SBStream & | stream | ) | const |
Definition at line 94 of file SBStructuredData.cpp.
References error(), LLDB_INSTRUMENT_VA, m_impl_up, and lldb::SBStream::ref().
bool SBStructuredData::GetBooleanValue | ( | bool | fail_value = false | ) | const |
Return the boolean value if this data structure is a boolean type.
Definition at line 177 of file SBStructuredData.cpp.
References LLDB_INSTRUMENT_VA, and m_impl_up.
lldb::SBError SBStructuredData::GetDescription | ( | lldb::SBStream & | stream | ) | const |
Definition at line 102 of file SBStructuredData.cpp.
References error(), LLDB_INSTRUMENT_VA, m_impl_up, lldb::SBStream::ref(), and lldb::SBError::SetError().
double SBStructuredData::GetFloatValue | ( | double | fail_value = 0.0 | ) | const |
Return the floating point value if this data structure is a floating type.
Definition at line 171 of file SBStructuredData.cpp.
References LLDB_INSTRUMENT_VA, and m_impl_up.
uint64_t SBStructuredData::GetIntegerValue | ( | uint64_t | fail_value = 0 | ) | const |
Return the integer value if this data structure is an integer type.
Definition at line 165 of file SBStructuredData.cpp.
References LLDB_INSTRUMENT_VA, and m_impl_up.
lldb::SBStructuredData SBStructuredData::GetItemAtIndex | ( | size_t | idx | ) | const |
Return the value corresponding to an index if this data structure is array.
Definition at line 157 of file SBStructuredData.cpp.
References LLDB_INSTRUMENT_VA, and m_impl_up.
bool SBStructuredData::GetKeys | ( | lldb::SBStringList & | keys | ) | const |
Fill keys with the keys in this object and return true if this data structure is a dictionary.
Returns false otherwise.
Definition at line 123 of file SBStructuredData.cpp.
References lldb::SBStringList::AppendString(), lldb::eStructuredDataTypeDictionary, lldb_private::StructuredData::Array::ForEach(), lldb_private::StructuredData::Object::GetAsArray(), lldb_private::StructuredData::Object::GetAsDictionary(), lldb_private::StructuredData::Dictionary::GetKeys(), GetType(), LLDB_INSTRUMENT_VA, and m_impl_up.
size_t SBStructuredData::GetSize | ( | ) | const |
Return the size (i.e.
number of elements) in this data structure if it is an array or dictionary type. For other types, 0 will be
Definition at line 117 of file SBStructuredData.cpp.
References LLDB_INSTRUMENT_VA, and m_impl_up.
size_t SBStructuredData::GetStringValue | ( | char * | dst, |
size_t | dst_len | ||
) | const |
Provides the string value if this data structure is a string type.
[out] | dst | pointer where the string value will be written. In case it is null, nothing will be written at dst. |
[in] | dst_len | max number of characters that can be written at dst. In case it is zero, nothing will be written at dst. If this length is not enough to write the complete string value, (dst_len - 1) bytes of the string value will be written at dst followed by a null character. |
Definition at line 183 of file SBStructuredData.cpp.
References LLDB_INSTRUMENT_VA, and m_impl_up.
StructuredDataType SBStructuredData::GetType | ( | ) | const |
Return the type of data in this data structure.
Definition at line 111 of file SBStructuredData.cpp.
References LLDB_INSTRUMENT_VA, and m_impl_up.
Referenced by GetKeys().
lldb::SBStructuredData SBStructuredData::GetValueForKey | ( | const char * | key | ) | const |
Return the value corresponding to a key if this data structure is a dictionary type.
Definition at line 149 of file SBStructuredData.cpp.
References LLDB_INSTRUMENT_VA, and m_impl_up.
bool SBStructuredData::IsValid | ( | ) | const |
Definition at line 77 of file SBStructuredData.cpp.
References LLDB_INSTRUMENT_VA.
Referenced by lldb::SBLaunchInfo::SetScriptedProcessDictionary().
|
explicit |
Definition at line 82 of file SBStructuredData.cpp.
References LLDB_INSTRUMENT_VA.
SBStructuredData & SBStructuredData::operator= | ( | const lldb::SBStructuredData & | rhs | ) |
Definition at line 48 of file SBStructuredData.cpp.
References LLDB_INSTRUMENT_VA, and m_impl_up.
lldb::SBError SBStructuredData::SetFromJSON | ( | const char * | json | ) |
Definition at line 70 of file SBStructuredData.cpp.
References LLDB_INSTRUMENT_VA, lldb::SBStream::Print(), and SetFromJSON().
lldb::SBError SBStructuredData::SetFromJSON | ( | lldb::SBStream & | stream | ) |
Definition at line 56 of file SBStructuredData.cpp.
References error(), lldb::eStructuredDataTypeDictionary, lldb::SBStream::GetData(), LLDB_INSTRUMENT_VA, m_impl_up, and lldb_private::StructuredData::ParseJSON().
Referenced by SetFromJSON().
|
friend |
Definition at line 99 of file SBStructuredData.h.
|
friend |
Definition at line 100 of file SBStructuredData.h.
|
friend |
Definition at line 101 of file SBStructuredData.h.
|
friend |
Definition at line 94 of file SBStructuredData.h.
|
friend |
Definition at line 93 of file SBStructuredData.h.
|
friend |
Definition at line 96 of file SBStructuredData.h.
|
friend |
Definition at line 95 of file SBStructuredData.h.
|
friend |
Definition at line 97 of file SBStructuredData.h.
|
friend |
Definition at line 98 of file SBStructuredData.h.
|
friend |
Definition at line 102 of file SBStructuredData.h.
|
protected |
Definition at line 104 of file SBStructuredData.h.
Referenced by lldb::SBTarget::BreakpointCreateFromScript(), Clear(), GetAsJSON(), lldb::SBDebugger::GetAvailablePlatformInfoAtIndex(), GetBooleanValue(), lldb::SBDebugger::GetBuildConfiguration(), GetDescription(), lldb::SBDebugger::GetDiagnosticFromEvent(), lldb::SBProcess::GetExtendedCrashInformation(), GetFloatValue(), GetIntegerValue(), GetItemAtIndex(), GetKeys(), lldb::SBLaunchInfo::GetScriptedProcessDictionary(), lldb::SBDebugger::GetScriptInterpreterInfo(), lldb::SBDebugger::GetSetting(), GetSize(), lldb::SBTarget::GetStatistics(), GetStringValue(), GetType(), GetValueForKey(), operator=(), lldb::SBThreadPlan::QueueThreadPlanForStepScripted(), lldb::SBThreadPlan::SBThreadPlan(), lldb::SBBreakpoint::SerializeToStructuredData(), SetFromJSON(), lldb::SBBreakpointLocation::SetScriptCallbackFunction(), lldb::SBBreakpoint::SetScriptCallbackFunction(), lldb::SBBreakpointName::SetScriptCallbackFunction(), lldb::SBLaunchInfo::SetScriptedProcessDictionary(), lldb::SBTrace::Start(), and lldb::SBThread::StepUsingScriptedThreadPlan().