LLVM: llvm::json::Object Class Reference (original) (raw)

An Object is a JSON object, which maps strings to heterogenous JSON values. More...

#include "[llvm/Support/JSON.h](JSON%5F8h%5Fsource.html)"

Public Types
using key_type = ObjectKey
using mapped_type = Value
using value_type = Storage::value_type
using iterator = Storage::iterator
using const_iterator = Storage::const_iterator
Public Member Functions
Object ()=default
Object (std::initializer_list< KV > Properties)
iterator begin ()
const_iterator begin () const
iterator end ()
const_iterator end () const
bool empty () const
size_t size () const
void clear ()
std::pair< iterator, bool > insert (KV E)
template<typename... Ts>
std::pair< iterator, bool > try_emplace (const ObjectKey &K, Ts &&... Args)
template<typename... Ts>
std::pair< iterator, bool > try_emplace (ObjectKey &&K, Ts &&... Args)
bool erase (StringRef K)
void erase (iterator I)
iterator find (StringRef K)
const_iterator find (StringRef K) const
LLVM_ABI Value & operator[] (const ObjectKey &K)
LLVM_ABI Value & operator[] (ObjectKey &&K)
LLVM_ABI Value * get (StringRef K)
LLVM_ABI const Value * get (StringRef K) const
LLVM_ABI std::optional< std::nullptr_t > getNull (StringRef K) const
LLVM_ABI std::optional< bool > getBoolean (StringRef K) const
LLVM_ABI std::optional< double > getNumber (StringRef K) const
LLVM_ABI std::optional< int64_t > getInteger (StringRef K) const
LLVM_ABI std::optional< llvm::StringRef > getString (StringRef K) const
LLVM_ABI const json::Object * getObject (StringRef K) const
LLVM_ABI json::Object * getObject (StringRef K)
LLVM_ABI const json::Array * getArray (StringRef K) const
LLVM_ABI json::Array * getArray (StringRef K)

An Object is a JSON object, which maps strings to heterogenous JSON values.

It simulates DenseMap<ObjectKey, Value>. ObjectKey is a maybe-owned string.

Definition at line 98 of file JSON.h.

const_iterator

iterator

key_type

mapped_type

value_type

Object() [1/2]

llvm::json::Object::Object ( ) default

Object() [2/2]

llvm::json::Object::Object ( std::initializer_list< KV > Properties) inlineexplicit

begin() [1/2]

iterator llvm::json::Object::begin ( ) inline

Definition at line 115 of file JSON.h.

begin() [2/2]

const_iterator llvm::json::Object::begin ( ) const inline

Definition at line 116 of file JSON.h.

clear()

void llvm::json::Object::clear ( ) inline

Definition at line 123 of file JSON.h.

empty()

bool llvm::json::Object::empty ( ) const inline

Definition at line 120 of file JSON.h.

end() [1/2]

iterator llvm::json::Object::end ( ) inline

end() [2/2]

const_iterator llvm::json::Object::end ( ) const inline

Definition at line 118 of file JSON.h.

erase() [1/2]

void llvm::json::Object::erase ( iterator I) inline

Definition at line 134 of file JSON.h.

References I.

erase() [2/2]

find() [1/2]

find() [2/2]

get() [1/2]

Definition at line 30 of file JSON.cpp.

References end(), find(), and I.

Referenced by getArray(), getArray(), getBoolean(), getInteger(), getNull(), getNumber(), getObject(), getObject(), getString(), and llvm::ir2vec::VocabStorage::parseVocabSection().

get() [2/2]

getArray() [1/2]

getArray() [2/2]

getBoolean()

std::optional< bool > llvm::json::Object::getBoolean ( StringRef K ) const

getInteger()

std::optional< int64_t > llvm::json::Object::getInteger ( StringRef K ) const

getNull()

std::optional< std::nullptr_t > llvm::json::Object::getNull ( StringRef K ) const

getNumber()

std::optional< double > llvm::json::Object::getNumber ( StringRef K ) const

getObject() [1/2]

getObject() [2/2]

getString()

insert()

std::pair< Object::iterator, bool > llvm::json::Object::insert ( KV E) inline

operator[]() [1/2]

operator[]() [2/2]

size()

size_t llvm::json::Object::size ( ) const inline

Definition at line 121 of file JSON.h.

try_emplace() [1/2]

try_emplace() [2/2]

template<typename... Ts>

std::pair< iterator, bool > llvm::json::Object::try_emplace ( ObjectKey && K, Ts &&... Args ) inline

Definition at line 130 of file JSON.h.

operator==


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