LLDB  mainline
Public Member Functions | Protected Types | Protected Attributes | List of all members
lldb_private::StructuredData::Array Class Reference

#include <StructuredData.h>

Inheritance diagram for lldb_private::StructuredData::Array:
Inheritance graph
[legend]
Collaboration diagram for lldb_private::StructuredData::Array:
Collaboration graph
[legend]

Public Member Functions

 Array ()
 
 ~Array () override=default
 
bool ForEach (std::function< bool(Object *object)> const &foreach_callback) const
 
size_t GetSize () const
 
ObjectSP operator[] (size_t idx)
 
ObjectSP GetItemAtIndex (size_t idx) const
 
template<class IntType >
bool GetItemAtIndexAsInteger (size_t idx, IntType &result) const
 
template<class IntType >
bool GetItemAtIndexAsInteger (size_t idx, IntType &result, IntType default_val) const
 
bool GetItemAtIndexAsString (size_t idx, llvm::StringRef &result) const
 
bool GetItemAtIndexAsString (size_t idx, llvm::StringRef &result, llvm::StringRef default_val) const
 
bool GetItemAtIndexAsString (size_t idx, ConstString &result) const
 
bool GetItemAtIndexAsString (size_t idx, ConstString &result, const char *default_val) const
 
bool GetItemAtIndexAsDictionary (size_t idx, Dictionary *&result) const
 
bool GetItemAtIndexAsArray (size_t idx, Array *&result) const
 
void Push (ObjectSP item)
 
void AddItem (ObjectSP item)
 
void Dump (Stream &s, bool pretty_print=true) const override
 
- Public Member Functions inherited from lldb_private::StructuredData::Object
 Object (lldb::StructuredDataType t=lldb::eStructuredDataTypeInvalid)
 
virtual ~Object ()=default
 
virtual bool IsValid () const
 
virtual void Clear ()
 
lldb::StructuredDataType GetType () const
 
void SetType (lldb::StructuredDataType t)
 
ArrayGetAsArray ()
 
DictionaryGetAsDictionary ()
 
IntegerGetAsInteger ()
 
uint64_t GetIntegerValue (uint64_t fail_value=0)
 
FloatGetAsFloat ()
 
double GetFloatValue (double fail_value=0.0)
 
BooleanGetAsBoolean ()
 
bool GetBooleanValue (bool fail_value=false)
 
StringGetAsString ()
 
llvm::StringRef GetStringValue (const char *fail_value=nullptr)
 
GenericGetAsGeneric ()
 
ObjectSP GetObjectForDotSeparatedPath (llvm::StringRef path)
 
void DumpToStdout (bool pretty_print=true) const
 

Protected Types

typedef std::vector< ObjectSPcollection
 

Protected Attributes

collection m_items
 

Detailed Description

Definition at line 161 of file StructuredData.h.

Member Typedef Documentation

◆ collection

Definition at line 277 of file StructuredData.h.

Constructor & Destructor Documentation

◆ Array()

lldb_private::StructuredData::Array::Array ( )
inline

Definition at line 163 of file StructuredData.h.

◆ ~Array()

lldb_private::StructuredData::Array::~Array ( )
overridedefault

Member Function Documentation

◆ AddItem()

void lldb_private::StructuredData::Array::AddItem ( ObjectSP  item)
inline

◆ Dump()

void StructuredData::Array::Dump ( Stream s,
bool  pretty_print = true 
) const
overridevirtual

◆ ForEach()

bool lldb_private::StructuredData::Array::ForEach ( std::function< bool(Object *object)> const &  foreach_callback) const
inline

◆ GetItemAtIndex()

ObjectSP lldb_private::StructuredData::Array::GetItemAtIndex ( size_t  idx) const
inline

◆ GetItemAtIndexAsArray()

bool lldb_private::StructuredData::Array::GetItemAtIndexAsArray ( size_t  idx,
Array *&  result 
) const
inline

◆ GetItemAtIndexAsDictionary()

bool lldb_private::StructuredData::Array::GetItemAtIndexAsDictionary ( size_t  idx,
Dictionary *&  result 
) const
inline

◆ GetItemAtIndexAsInteger() [1/2]

template<class IntType >
bool lldb_private::StructuredData::Array::GetItemAtIndexAsInteger ( size_t  idx,
IntType &  result 
) const
inline

◆ GetItemAtIndexAsInteger() [2/2]

template<class IntType >
bool lldb_private::StructuredData::Array::GetItemAtIndexAsInteger ( size_t  idx,
IntType &  result,
IntType  default_val 
) const
inline

Definition at line 204 of file StructuredData.h.

◆ GetItemAtIndexAsString() [1/4]

bool lldb_private::StructuredData::Array::GetItemAtIndexAsString ( size_t  idx,
llvm::StringRef &  result 
) const
inline

◆ GetItemAtIndexAsString() [2/4]

bool lldb_private::StructuredData::Array::GetItemAtIndexAsString ( size_t  idx,
llvm::StringRef &  result,
llvm::StringRef  default_val 
) const
inline

Definition at line 223 of file StructuredData.h.

◆ GetItemAtIndexAsString() [3/4]

bool lldb_private::StructuredData::Array::GetItemAtIndexAsString ( size_t  idx,
ConstString result 
) const
inline

Definition at line 231 of file StructuredData.h.

◆ GetItemAtIndexAsString() [4/4]

bool lldb_private::StructuredData::Array::GetItemAtIndexAsString ( size_t  idx,
ConstString result,
const char *  default_val 
) const
inline

Definition at line 242 of file StructuredData.h.

References lldb_private::ConstString::SetCString().

◆ GetSize()

size_t lldb_private::StructuredData::Array::GetSize ( ) const
inline

◆ operator[]()

ObjectSP lldb_private::StructuredData::Array::operator[] ( size_t  idx)
inline

Definition at line 178 of file StructuredData.h.

◆ Push()

void lldb_private::StructuredData::Array::Push ( ObjectSP  item)
inline

Member Data Documentation

◆ m_items

collection lldb_private::StructuredData::Array::m_items
protected

Definition at line 278 of file StructuredData.h.


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