LLDB  mainline
Public Member Functions | Protected Attributes | Friends | List of all members
lldb::SBStructuredData Class Reference

#include <SBStructuredData.h>

Collaboration diagram for lldb::SBStructuredData:
Collaboration graph
[legend]

Public Member Functions

 SBStructuredData ()
 
 SBStructuredData (const lldb::SBStructuredData &rhs)
 
 SBStructuredData (const lldb::EventSP &event_sp)
 
 SBStructuredData (lldb_private::StructuredDataImpl *impl)
 
 ~SBStructuredData ()
 
lldb::SBStructuredDataoperator= (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. More...
 
size_t GetSize () const
 Return the size (i.e. More...
 
bool GetKeys (lldb::SBStringList &keys) const
 Fill keys with the keys in this object and return true if this data structure is a dictionary. More...
 
lldb::SBStructuredData GetValueForKey (const char *key) const
 Return the value corresponding to a key if this data structure is a dictionary type. More...
 
lldb::SBStructuredData GetItemAtIndex (size_t idx) const
 Return the value corresponding to an index if this data structure is array. More...
 
uint64_t GetIntegerValue (uint64_t fail_value=0) const
 Return the integer value if this data structure is an integer type. More...
 
double GetFloatValue (double fail_value=0.0) const
 Return the floating point value if this data structure is a floating type. More...
 
bool GetBooleanValue (bool fail_value=false) const
 Return the boolean value if this data structure is a boolean type. More...
 
size_t GetStringValue (char *dst, size_t dst_len) const
 Provides the string value if this data structure is a string type. More...
 

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
 

Detailed Description

Definition at line 17 of file SBStructuredData.h.

Constructor & Destructor Documentation

◆ SBStructuredData() [1/4]

SBStructuredData::SBStructuredData ( )

Definition at line 27 of file SBStructuredData.cpp.

References LLDB_RECORD_CONSTRUCTOR_NO_ARGS.

◆ SBStructuredData() [2/4]

SBStructuredData::SBStructuredData ( const lldb::SBStructuredData rhs)

Definition at line 31 of file SBStructuredData.cpp.

References LLDB_RECORD_CONSTRUCTOR.

◆ SBStructuredData() [3/4]

SBStructuredData::SBStructuredData ( const lldb::EventSP &  event_sp)

Definition at line 37 of file SBStructuredData.cpp.

References LLDB_RECORD_CONSTRUCTOR.

◆ SBStructuredData() [4/4]

SBStructuredData::SBStructuredData ( lldb_private::StructuredDataImpl impl)

Definition at line 42 of file SBStructuredData.cpp.

References LLDB_RECORD_CONSTRUCTOR.

◆ ~SBStructuredData()

SBStructuredData::~SBStructuredData ( )
default

Member Function Documentation

◆ Clear()

void SBStructuredData::Clear ( )

Definition at line 94 of file SBStructuredData.cpp.

References LLDB_RECORD_METHOD_NO_ARGS, and m_impl_up.

◆ GetAsJSON()

SBError SBStructuredData::GetAsJSON ( lldb::SBStream stream) const

◆ GetBooleanValue()

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

Return the boolean value if this data structure is a boolean type.

Definition at line 191 of file SBStructuredData.cpp.

References LLDB_RECORD_METHOD_CONST, and m_impl_up.

◆ GetDescription()

lldb::SBError SBStructuredData::GetDescription ( lldb::SBStream stream) const

◆ GetFloatValue()

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 184 of file SBStructuredData.cpp.

References LLDB_RECORD_METHOD_CONST, and m_impl_up.

◆ GetIntegerValue()

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 177 of file SBStructuredData.cpp.

References LLDB_RECORD_METHOD_CONST, and m_impl_up.

◆ GetItemAtIndex()

lldb::SBStructuredData SBStructuredData::GetItemAtIndex ( size_t  idx) const

Return the value corresponding to an index if this data structure is array.

Definition at line 168 of file SBStructuredData.cpp.

References LLDB_RECORD_METHOD_CONST, LLDB_RECORD_RESULT, and m_impl_up.

◆ GetKeys()

bool SBStructuredData::GetKeys ( lldb::SBStringList keys) const

◆ GetSize()

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 126 of file SBStructuredData.cpp.

References LLDB_RECORD_METHOD_CONST_NO_ARGS, and m_impl_up.

◆ GetStringValue()

size_t SBStructuredData::GetStringValue ( char *  dst,
size_t  dst_len 
) const

Provides the string value if this data structure is a string type.

Parameters
[out]dstpointer where the string value will be written. In case it is null, nothing will be written at dst.
[in]dst_lenmax 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.
Returns
Returns the byte size needed to completely write the string value at dst in all cases.

Definition at line 198 of file SBStructuredData.cpp.

References LLDB_RECORD_CHAR_PTR_METHOD_CONST, and m_impl_up.

◆ GetType()

StructuredDataType SBStructuredData::GetType ( ) const

Return the type of data in this data structure.

Definition at line 119 of file SBStructuredData.cpp.

References LLDB_RECORD_METHOD_CONST_NO_ARGS, and m_impl_up.

Referenced by GetKeys().

◆ GetValueForKey()

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 159 of file SBStructuredData.cpp.

References LLDB_RECORD_METHOD_CONST, LLDB_RECORD_RESULT, and m_impl_up.

◆ IsValid()

bool SBStructuredData::IsValid ( ) const

Definition at line 83 of file SBStructuredData.cpp.

References LLDB_RECORD_METHOD_CONST_NO_ARGS.

◆ operator bool()

SBStructuredData::operator bool ( ) const
explicit

Definition at line 88 of file SBStructuredData.cpp.

References LLDB_RECORD_METHOD_CONST_NO_ARGS.

◆ operator=()

SBStructuredData & SBStructuredData::operator= ( const lldb::SBStructuredData rhs)

Definition at line 51 of file SBStructuredData.cpp.

References LLDB_RECORD_METHOD, LLDB_RECORD_RESULT, and m_impl_up.

◆ SetFromJSON() [1/2]

lldb::SBError SBStructuredData::SetFromJSON ( const char *  json)

◆ SetFromJSON() [2/2]

lldb::SBError SBStructuredData::SetFromJSON ( lldb::SBStream stream)

Friends And Related Function Documentation

◆ SBBreakpoint

friend class SBBreakpoint
friend

Definition at line 99 of file SBStructuredData.h.

◆ SBBreakpointLocation

friend class SBBreakpointLocation
friend

Definition at line 100 of file SBStructuredData.h.

◆ SBBreakpointName

friend class SBBreakpointName
friend

Definition at line 101 of file SBStructuredData.h.

◆ SBDebugger

friend class SBDebugger
friend

Definition at line 94 of file SBStructuredData.h.

◆ SBLaunchInfo

friend class SBLaunchInfo
friend

Definition at line 93 of file SBStructuredData.h.

◆ SBProcess

friend class SBProcess
friend

Definition at line 96 of file SBStructuredData.h.

◆ SBTarget

friend class SBTarget
friend

Definition at line 95 of file SBStructuredData.h.

◆ SBThread

friend class SBThread
friend

Definition at line 97 of file SBStructuredData.h.

◆ SBThreadPlan

friend class SBThreadPlan
friend

Definition at line 98 of file SBStructuredData.h.

◆ SBTrace

friend class SBTrace
friend

Definition at line 102 of file SBStructuredData.h.

Member Data Documentation

◆ m_impl_up

StructuredDataImplUP lldb::SBStructuredData::m_impl_up
protected

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