LLVM  16.0.0git
Public Types | Public Member Functions | Friends | List of all members
llvm::json::Array Class Reference

An Array is a JSON array, which contains heterogeneous JSON values. More...

#include "llvm/Support/JSON.h"

Public Types

using value_type = Value
 
using iterator = std::vector< Value >::iterator
 
using const_iterator = std::vector< Value >::const_iterator
 

Public Member Functions

 Array ()=default
 
 Array (std::initializer_list< Value > Elements)
 
template<typename Collection >
 Array (const Collection &C)
 
Valueoperator[] (size_t I)
 
const Valueoperator[] (size_t I) const
 
Valuefront ()
 
const Valuefront () const
 
Valueback ()
 
const Valueback () const
 
Valuedata ()
 
const Valuedata () const
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
bool empty () const
 
size_t size () const
 
void reserve (size_t S)
 
void clear ()
 
void push_back (const Value &E)
 
void push_back (Value &&E)
 
template<typename... Args>
void emplace_back (Args &&...A)
 
void pop_back ()
 
iterator insert (iterator P, const Value &E)
 
iterator insert (iterator P, Value &&E)
 
template<typename It >
iterator insert (iterator P, It A, It Z)
 
template<typename... Args>
iterator emplace (const_iterator P, Args &&...A)
 

Friends

bool operator== (const Array &L, const Array &R)
 

Detailed Description

An Array is a JSON array, which contains heterogeneous JSON values.

It simulates std::vector<Value>.

Definition at line 157 of file JSON.h.

Member Typedef Documentation

◆ const_iterator

Definition at line 163 of file JSON.h.

◆ iterator

Definition at line 162 of file JSON.h.

◆ value_type

Definition at line 161 of file JSON.h.

Constructor & Destructor Documentation

◆ Array() [1/3]

llvm::json::Array::Array ( )
default

◆ Array() [2/3]

llvm::json::Array::Array ( std::initializer_list< Value Elements)
explicit

Definition at line 95 of file JSON.cpp.

References back(), emplace_back(), and move.

◆ Array() [3/3]

template<typename Collection >
llvm::json::Array::Array ( const Collection &  C)
inlineexplicit

Definition at line 167 of file JSON.h.

References emplace_back().

Member Function Documentation

◆ back() [1/2]

const Value & llvm::json::Array::back ( )
inline

Definition at line 515 of file JSON.h.

Referenced by Array().

◆ back() [2/2]

const Value& llvm::json::Array::back ( ) const

◆ begin() [1/2]

Array::const_iterator llvm::json::Array::begin ( )
inline

Definition at line 520 of file JSON.h.

◆ begin() [2/2]

const_iterator llvm::json::Array::begin ( ) const

◆ clear()

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

Definition at line 529 of file JSON.h.

◆ data() [1/2]

const Value * llvm::json::Array::data ( )
inline

Definition at line 517 of file JSON.h.

◆ data() [2/2]

const Value* llvm::json::Array::data ( ) const

◆ emplace()

template<typename... Args>
Array::iterator llvm::json::Array::emplace ( const_iterator  P,
Args &&...  A 
)
inline

Definition at line 547 of file JSON.h.

References A, and P.

◆ emplace_back()

template<typename... Args>
void llvm::json::Array::emplace_back ( Args &&...  A)
inline

Definition at line 532 of file JSON.h.

References A.

Referenced by Array().

◆ empty()

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

Definition at line 525 of file JSON.h.

Referenced by llvm::checkDebugInfoMetadata().

◆ end() [1/2]

Array::const_iterator llvm::json::Array::end ( )
inline

Definition at line 522 of file JSON.h.

◆ end() [2/2]

const_iterator llvm::json::Array::end ( ) const

◆ front() [1/2]

const Value & llvm::json::Array::front ( )
inline

Definition at line 513 of file JSON.h.

◆ front() [2/2]

const Value& llvm::json::Array::front ( ) const

◆ insert() [1/3]

Array::iterator llvm::json::Array::insert ( iterator  P,
const Value E 
)
inline

Definition at line 536 of file JSON.h.

References E, and P.

◆ insert() [2/3]

template<typename It >
Array::iterator llvm::json::Array::insert ( iterator  P,
It  A,
It  Z 
)
inline

Definition at line 543 of file JSON.h.

References A, P, and llvm::ARCCC::Z.

◆ insert() [3/3]

Array::iterator llvm::json::Array::insert ( iterator  P,
Value &&  E 
)
inline

Definition at line 539 of file JSON.h.

References E, move, and P.

◆ operator[]() [1/2]

Value & llvm::json::Array::operator[] ( size_t  I)
inline

Definition at line 511 of file JSON.h.

References I.

◆ operator[]() [2/2]

const Value & llvm::json::Array::operator[] ( size_t  I) const
inline

Definition at line 512 of file JSON.h.

References I.

◆ pop_back()

void llvm::json::Array::pop_back ( )
inline

Definition at line 535 of file JSON.h.

◆ push_back() [1/2]

void llvm::json::Array::push_back ( const Value E)
inline

Definition at line 530 of file JSON.h.

References E.

Referenced by checkFunctions(), checkInstructions(), checkVars(), and llvm::symbolize::JSONPrinter::print().

◆ push_back() [2/2]

void llvm::json::Array::push_back ( Value &&  E)
inline

Definition at line 531 of file JSON.h.

References E, and move.

◆ reserve()

void llvm::json::Array::reserve ( size_t  S)
inline

Definition at line 527 of file JSON.h.

References S.

◆ size()

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

Definition at line 526 of file JSON.h.

Friends And Related Function Documentation

◆ operator==

bool operator== ( const Array L,
const Array R 
)
friend

Definition at line 550 of file JSON.h.


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