25#pragma mark SBStructuredData
60 std::string json_str(stream.
GetData());
66 error.SetErrorString(
"Invalid Syntax");
79 return this->
operator bool();
82SBStructuredData::operator bool()
const {
85 return m_impl_up->IsValid();
142 llvm::StringRef key =
object->GetStringValue(
"");
168 return m_impl_up->GetIntegerValue(fail_value);
174 return m_impl_up->GetFloatValue(fail_value);
180 return m_impl_up->GetBooleanValue(fail_value);
186 return m_impl_up->GetStringValue(dst, dst_len);
static llvm::raw_ostream & error(Stream &strm)
#define LLDB_INSTRUMENT_VA(...)
void SetError(uint32_t err, lldb::ErrorType type)
void Print(const char *str)
lldb_private::Stream & ref()
void AppendString(const char *str)
lldb::SBStructuredData GetItemAtIndex(size_t idx) const
Return the value corresponding to an index if this data structure is array.
lldb::SBStructuredData & operator=(const lldb::SBStructuredData &rhs)
lldb::SBError GetDescription(lldb::SBStream &stream) const
size_t GetStringValue(char *dst, size_t dst_len) const
Provides the string value if this data structure is a string type.
bool GetBooleanValue(bool fail_value=false) const
Return the boolean value if this data structure is a boolean type.
StructuredDataImplUP m_impl_up
lldb::StructuredDataType GetType() const
Return the type of data in this data structure.
uint64_t GetIntegerValue(uint64_t fail_value=0) const
Return the integer value if this data structure is an integer type.
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::SBError GetAsJSON(lldb::SBStream &stream) const
lldb::SBStructuredData GetValueForKey(const char *key) const
Return the value corresponding to a key if this data structure is a dictionary type.
lldb::SBError SetFromJSON(lldb::SBStream &stream)
double GetFloatValue(double fail_value=0.0) const
Return the floating point value if this data structure is a floating type.
bool ForEach(std::function< bool(Object *object)> const &foreach_callback) const
Dictionary * GetAsDictionary()
std::shared_ptr< Object > ObjectSP
static ObjectSP ParseJSON(const std::string &json_text)
A class that represents a running process on the host machine.
@ eStructuredDataTypeDictionary