cprover
json_arrayt Class Reference

#include <json.h>

Inheritance diagram for json_arrayt:
[legend]
Collaboration diagram for json_arrayt:
[legend]

Public Types

typedef jsont value_type
 
- Public Types inherited from jsont
enum  kindt {
  kindt::J_STRING, kindt::J_NUMBER, kindt::J_OBJECT, kindt::J_ARRAY,
  kindt::J_TRUE, kindt::J_FALSE, kindt::J_NULL
}
 
typedef std::vector< jsontarrayt
 
typedef std::map< std::string, jsontobjectt
 

Public Member Functions

 json_arrayt ()
 
void resize (std::size_t size)
 
std::size_t size () const
 
jsontpush_back (const jsont &json)
 
jsontpush_back ()
 
template<typename... argumentst>
void emplace_back (argumentst &&... arguments)
 
std::vector< jsont >::iterator begin ()
 
std::vector< jsont >::const_iterator begin () const
 
std::vector< jsont >::const_iterator cbegin () const
 
std::vector< jsont >::iterator end ()
 
std::vector< jsont >::const_iterator end () const
 
std::vector< jsont >::const_iterator cend () const
 
- Public Member Functions inherited from jsont
bool is_string () const
 
bool is_number () const
 
bool is_object () const
 
bool is_array () const
 
bool is_true () const
 
bool is_false () const
 
bool is_null () const
 
 jsont ()
 
void output (std::ostream &out) const
 
void swap (jsont &other)
 
void clear ()
 
json_arraytmake_array ()
 
json_objecttmake_object ()
 
const jsontoperator[] (const std::string &key) const
 
void output_rec (std::ostream &, unsigned indent) const
 Recursive printing of the json object. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from jsont
static jsont json_boolean (bool value)
 
static void output_object (std::ostream &out, const objectt &object, unsigned indent)
 Basic handling of the printing of a JSON object. More...
 
static void output_key (std::ostream &out, const std::string &key)
 
- Public Attributes inherited from jsont
kindt kind
 
arrayt array
 
objectt object
 
std::string value
 
- Static Public Attributes inherited from jsont
static const jsont null_json_object
 
- Protected Member Functions inherited from jsont
 jsont (kindt _kind)
 
 jsont (kindt _kind, std::string _value)
 
- Static Protected Member Functions inherited from jsont
static void escape_string (const std::string &, std::ostream &)
 

Detailed Description

Definition at line 146 of file json.h.

Member Typedef Documentation

◆ value_type

Definition at line 211 of file json.h.

Constructor & Destructor Documentation

◆ json_arrayt()

json_arrayt::json_arrayt ( )
inline

Definition at line 149 of file json.h.

Member Function Documentation

◆ begin() [1/2]

std::vector<jsont>::iterator json_arrayt::begin ( )
inline

Definition at line 181 of file json.h.

References jsont::array.

◆ begin() [2/2]

std::vector<jsont>::const_iterator json_arrayt::begin ( ) const
inline

Definition at line 186 of file json.h.

References jsont::array.

◆ cbegin()

std::vector<jsont>::const_iterator json_arrayt::cbegin ( ) const
inline

Definition at line 191 of file json.h.

References jsont::array.

◆ cend()

std::vector<jsont>::const_iterator json_arrayt::cend ( ) const
inline

Definition at line 206 of file json.h.

References jsont::array.

◆ emplace_back()

template<typename... argumentst>
void json_arrayt::emplace_back ( argumentst &&...  arguments)
inline

Definition at line 176 of file json.h.

References jsont::array.

◆ end() [1/2]

std::vector<jsont>::iterator json_arrayt::end ( )
inline

Definition at line 196 of file json.h.

References jsont::array.

◆ end() [2/2]

std::vector<jsont>::const_iterator json_arrayt::end ( ) const
inline

Definition at line 201 of file json.h.

References jsont::array.

◆ push_back() [1/2]

◆ push_back() [2/2]

jsont& json_arrayt::push_back ( )
inline

Definition at line 169 of file json.h.

References jsont::array, and jsont::jsont().

◆ resize()

void json_arrayt::resize ( std::size_t  size)
inline

Definition at line 153 of file json.h.

References jsont::array, and size().

◆ size()

std::size_t json_arrayt::size ( ) const
inline

Definition at line 158 of file json.h.

References jsont::array.

Referenced by resize().


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