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)
 
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 SBTraceOptions
 
class SBDebugger
 
class SBTarget
 

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.

Referenced by GetItemAtIndex(), and GetValueForKey().

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

Definition at line 48 of file SBStructuredData.cpp.

References operator=().

Member Function Documentation

◆ Clear()

void SBStructuredData::Clear ( )

◆ 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.

Referenced by lldb_private::repro::RegisterMethods< SBStructuredData >().

◆ 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.

Referenced by lldb_private::repro::RegisterMethods< SBStructuredData >().

◆ 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.

Referenced by lldb_private::repro::RegisterMethods< SBStructuredData >().

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

References LLDB_RECORD_METHOD_CONST, LLDB_RECORD_RESULT, m_impl_up, and SBStructuredData().

Referenced by lldb_private::repro::RegisterMethods< SBStructuredData >().

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

References LLDB_RECORD_METHOD_CONST_NO_ARGS, and m_impl_up.

Referenced by lldb_private::repro::RegisterMethods< SBStructuredData >().

◆ 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_METHOD_CONST, and m_impl_up.

Referenced by lldb_private::repro::RegisterMethods< SBStructuredData >().

◆ GetType()

StructuredDataType SBStructuredData::GetType ( ) const

Return the type of data in this data structure.

Definition at line 110 of file SBStructuredData.cpp.

References lldb::eStructuredDataTypeInvalid, LLDB_RECORD_METHOD_CONST_NO_ARGS, and m_impl_up.

Referenced by GetKeys(), and lldb_private::repro::RegisterMethods< SBStructuredData >().

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

References LLDB_RECORD_METHOD_CONST, LLDB_RECORD_RESULT, m_impl_up, and SBStructuredData().

Referenced by lldb_private::repro::RegisterMethods< SBStructuredData >().

◆ IsValid()

bool SBStructuredData::IsValid ( ) const

◆ operator bool()

SBStructuredData::operator bool ( ) const
explicit

Definition at line 79 of file SBStructuredData.cpp.

References LLDB_RECORD_METHOD_CONST_NO_ARGS, and m_impl_up.

◆ 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.

Referenced by ~SBStructuredData().

◆ SetFromJSON()

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

Friends And Related Function Documentation

◆ SBDebugger

friend class SBDebugger
friend

Definition at line 92 of file SBStructuredData.h.

◆ SBTarget

friend class SBTarget
friend

Definition at line 93 of file SBStructuredData.h.

◆ SBTraceOptions

friend class SBTraceOptions
friend

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