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

#include <SBStructuredData.h>

Public Member Functions

 SBStructuredData ()
 
 SBStructuredData (const lldb::SBStructuredData &rhs)
 
 ~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.
 
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 GetUnsignedIntegerValue (uint64_t fail_value=0) const
 Return the integer value if this data structure is an integer type.
 
int64_t GetSignedIntegerValue (int64_t fail_value=0) const
 Return the integer value if this data structure is an integer type.
 
 LLDB_DEPRECATED ("Specify if the value is signed or unsigned", "uint64_t GetUnsignedIntegerValue(uint64_t fail_value = 0)") uint64_t GetIntegerValue(uint64_t fail_value=0) const
 
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 Member Functions

 SBStructuredData (const lldb_private::StructuredDataImpl &impl)
 
 SBStructuredData (const lldb::EventSP &event_sp)
 

Protected Attributes

StructuredDataImplUP m_impl_up
 

Friends

class SBAttachInfo
 
class SBLaunchInfo
 
class SBDebugger
 
class SBTarget
 
class SBProcess
 
class SBThread
 
class SBThreadPlan
 
class SBBreakpoint
 
class SBBreakpointLocation
 
class SBBreakpointName
 
class SBTrace
 
class lldb_private::python::SWIGBridge
 
class lldb_private::lua::SWIGBridge
 

Detailed Description

Definition at line 26 of file SBStructuredData.h.

Constructor & Destructor Documentation

◆ SBStructuredData() [1/4]

SBStructuredData::SBStructuredData ( )

Definition at line 27 of file SBStructuredData.cpp.

References LLDB_INSTRUMENT_VA.

◆ SBStructuredData() [2/4]

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

Definition at line 31 of file SBStructuredData.cpp.

References LLDB_INSTRUMENT_VA.

◆ ~SBStructuredData()

SBStructuredData::~SBStructuredData ( )
default

◆ SBStructuredData() [3/4]

SBStructuredData::SBStructuredData ( const lldb_private::StructuredDataImpl impl)
protected

Definition at line 41 of file SBStructuredData.cpp.

References LLDB_INSTRUMENT_VA.

◆ SBStructuredData() [4/4]

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

Definition at line 36 of file SBStructuredData.cpp.

References LLDB_INSTRUMENT_VA.

Member Function Documentation

◆ Clear()

void SBStructuredData::Clear ( )

Definition at line 88 of file SBStructuredData.cpp.

References LLDB_INSTRUMENT_VA, and m_impl_up.

◆ GetAsJSON()

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().

◆ GetBooleanValue()

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

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

Definition at line 189 of file SBStructuredData.cpp.

References LLDB_INSTRUMENT_VA, 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 183 of file SBStructuredData.cpp.

References LLDB_INSTRUMENT_VA, 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 157 of file SBStructuredData.cpp.

References LLDB_INSTRUMENT_VA, and m_impl_up.

◆ GetKeys()

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

◆ GetSignedIntegerValue()

int64_t SBStructuredData::GetSignedIntegerValue ( int64_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_INSTRUMENT_VA, and m_impl_up.

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

References LLDB_INSTRUMENT_VA, 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 195 of file SBStructuredData.cpp.

References LLDB_INSTRUMENT_VA, and m_impl_up.

◆ GetType()

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().

◆ GetUnsignedIntegerValue()

uint64_t SBStructuredData::GetUnsignedIntegerValue ( uint64_t  fail_value = 0) const

Return the integer value if this data structure is an integer type.

Definition at line 171 of file SBStructuredData.cpp.

References LLDB_INSTRUMENT_VA, and m_impl_up.

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

References LLDB_INSTRUMENT_VA, and m_impl_up.

◆ IsValid()

bool SBStructuredData::IsValid ( ) const

◆ LLDB_DEPRECATED()

lldb::SBStructuredData::LLDB_DEPRECATED ( "Specify if the value is signed or unsigned"  ,
"uint64_t GetUnsignedIntegerValue(uint64_t fail_value = 0)"   
) const
pure virtual

◆ operator bool()

SBStructuredData::operator bool ( ) const
explicit

Definition at line 82 of file SBStructuredData.cpp.

References LLDB_INSTRUMENT_VA.

◆ operator=()

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

Definition at line 48 of file SBStructuredData.cpp.

References LLDB_INSTRUMENT_VA, and m_impl_up.

◆ SetFromJSON() [1/2]

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

Definition at line 70 of file SBStructuredData.cpp.

References LLDB_INSTRUMENT_VA, lldb::SBStream::Print(), and SetFromJSON().

◆ SetFromJSON() [2/2]

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

Friends And Related Function Documentation

◆ lldb_private::lua::SWIGBridge

friend class lldb_private::lua::SWIGBridge
friend

Definition at line 116 of file SBStructuredData.h.

◆ lldb_private::python::SWIGBridge

friend class lldb_private::python::SWIGBridge
friend

Definition at line 115 of file SBStructuredData.h.

◆ SBAttachInfo

friend class SBAttachInfo
friend

Definition at line 104 of file SBStructuredData.h.

◆ SBBreakpoint

friend class SBBreakpoint
friend

Definition at line 111 of file SBStructuredData.h.

◆ SBBreakpointLocation

friend class SBBreakpointLocation
friend

Definition at line 112 of file SBStructuredData.h.

◆ SBBreakpointName

friend class SBBreakpointName
friend

Definition at line 113 of file SBStructuredData.h.

◆ SBDebugger

friend class SBDebugger
friend

Definition at line 106 of file SBStructuredData.h.

◆ SBLaunchInfo

friend class SBLaunchInfo
friend

Definition at line 105 of file SBStructuredData.h.

◆ SBProcess

friend class SBProcess
friend

Definition at line 108 of file SBStructuredData.h.

◆ SBTarget

friend class SBTarget
friend

Definition at line 107 of file SBStructuredData.h.

◆ SBThread

friend class SBThread
friend

Definition at line 109 of file SBStructuredData.h.

◆ SBThreadPlan

friend class SBThreadPlan
friend

Definition at line 110 of file SBStructuredData.h.

◆ SBTrace

friend class SBTrace
friend

Definition at line 114 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: