LLDB mainline
lldb_private::StructuredData Class Reference

A class which can hold structured data. More...

#include "lldb/Utility/StructuredData.h"

Classes

class  Array
class  Boolean
class  Dictionary
class  Float
class  Generic
class  Integer
class  Null
class  Object
class  String

Public Types

using UnsignedInteger = Integer<uint64_t>
using SignedInteger = Integer<int64_t>
typedef std::shared_ptr< Object > ObjectSP
typedef std::shared_ptr< Array > ArraySP
typedef std::shared_ptr< UnsignedInteger > UnsignedIntegerSP
typedef std::shared_ptr< SignedInteger > SignedIntegerSP
typedef std::shared_ptr< Float > FloatSP
typedef std::shared_ptr< Boolean > BooleanSP
typedef std::shared_ptr< String > StringSP
typedef std::shared_ptr< Dictionary > DictionarySP
typedef std::shared_ptr< Generic > GenericSP
typedef std::variant< UnsignedIntegerSP, SignedIntegerSP > IntegerSP

Static Public Member Functions

template<typename T>
static ObjectSP FromInteger (T value)
static StructuredData::ObjectSP FromFloat (double value)
static StructuredData::ObjectSP FromBoolean (bool value)
static StructuredData::ObjectSP FromString (llvm::StringRef value)
static StructuredData::ObjectSP FromGeneric (void *value)
static StructuredData::ObjectSP FromKeyValue (llvm::StringRef key, const StructuredData::ObjectSP &value_sp)
static ObjectSP ParseJSON (llvm::StringRef json_text)
static ObjectSP ParseJSONFromFile (const FileSpec &file, Status &error)
static bool IsRecordType (const ObjectSP object_sp)

Detailed Description

A class which can hold structured data.

The StructuredData class is designed to hold the data from a JSON or plist style file – a serialized data structure with dictionaries (maps, hashes), arrays, and concrete values like integers, floating point numbers, strings, booleans.

StructuredData does not presuppose any knowledge of the schema for the data it is holding; it can parse JSON data, for instance, and other parts of lldb can iterate through the parsed data set to find keys and values that may be present.

Definition at line 54 of file StructuredData.h.

Member Typedef Documentation

◆ ArraySP

typedef std::shared_ptr<Array> lldb_private::StructuredData::ArraySP

Definition at line 69 of file StructuredData.h.

◆ BooleanSP

Definition at line 73 of file StructuredData.h.

◆ DictionarySP

Definition at line 75 of file StructuredData.h.

◆ FloatSP

typedef std::shared_ptr<Float> lldb_private::StructuredData::FloatSP

Definition at line 72 of file StructuredData.h.

◆ GenericSP

Definition at line 76 of file StructuredData.h.

◆ IntegerSP

◆ ObjectSP

Definition at line 68 of file StructuredData.h.

◆ SignedInteger

Definition at line 61 of file StructuredData.h.

◆ SignedIntegerSP

Definition at line 71 of file StructuredData.h.

◆ StringSP

Definition at line 74 of file StructuredData.h.

◆ UnsignedInteger

Definition at line 60 of file StructuredData.h.

◆ UnsignedIntegerSP

Definition at line 70 of file StructuredData.h.

Member Function Documentation

◆ FromBoolean()

StructuredData::ObjectSP lldb_private::StructuredData::FromBoolean ( bool value)
inlinestatic

Definition at line 601 of file StructuredData.h.

Referenced by lldb_private::StructuredDataImpl::SetBooleanValue().

◆ FromFloat()

StructuredData::ObjectSP lldb_private::StructuredData::FromFloat ( double value)
inlinestatic

Definition at line 598 of file StructuredData.h.

Referenced by lldb_private::StructuredDataImpl::SetFloatValue().

◆ FromGeneric()

StructuredData::ObjectSP lldb_private::StructuredData::FromGeneric ( void * value)
inlinestatic

Definition at line 607 of file StructuredData.h.

Referenced by lldb_private::StructuredDataImpl::SetGenericValue().

◆ FromInteger()

template<typename T>
ObjectSP lldb_private::StructuredData::FromInteger ( T value)
inlinestatic

◆ FromKeyValue()

StructuredData::ObjectSP lldb_private::StructuredData::FromKeyValue ( llvm::StringRef key,
const StructuredData::ObjectSP & value_sp )
inlinestatic

Definition at line 612 of file StructuredData.h.

Referenced by lldb_private::StructuredDataImpl::SetValueForKey().

◆ FromString()

StructuredData::ObjectSP lldb_private::StructuredData::FromString ( llvm::StringRef value)
inlinestatic

Definition at line 604 of file StructuredData.h.

Referenced by lldb_private::StructuredDataImpl::SetStringValue().

◆ IsRecordType()

◆ ParseJSON()

StructuredData::ObjectSP StructuredData::ParseJSON ( llvm::StringRef json_text)
static

◆ ParseJSONFromFile()


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