gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
picojson::value Class Reference

#include <picojson.h>

Collaboration diagram for picojson::value:

Classes

union  _storage
 

Public Types

typedef std::vector< valuearray
 
typedef std::map< std::string, valueobject
 

Public Member Functions

 value ()
 
 value (int type, bool)
 
 value (bool b)
 
 value (double n)
 
 value (const std::string &s)
 
 value (const array &a)
 
 value (const object &o)
 
 value (const char *s)
 
 value (const char *s, size_t len)
 
 ~value ()
 
 value (const value &x)
 
valueoperator= (const value &x)
 
void swap (value &x) throw ()
 
template<typename T >
bool is () const
 
template<typename T >
const T & get () const
 
template<typename T >
T & get ()
 
template<typename T >
void set (const T &)
 
bool evaluate_as_boolean () const
 
const valueget (const size_t idx) const
 
const valueget (const std::string &key) const
 
valueget (const size_t idx)
 
valueget (const std::string &key)
 
bool contains (const size_t idx) const
 
bool contains (const std::string &key) const
 
std::string to_str () const
 
template<typename Iter >
void serialize (Iter os, bool prettify=false) const
 
std::string serialize (bool prettify=false) const
 
template<>
bool is () const
 

Protected Attributes

int type_
 
_storage u_
 

Private Member Functions

template<typename T >
 value (const T *)
 
template<typename Iter >
void serialize_ (Iter os, int indent) const
 
std::string serialize_ (int indent) const
 
void clear ()
 

Static Private Member Functions

template<typename Iter >
static void _indent (Iter os, int indent)
 

Detailed Description

Definition at line 122 of file picojson.h.

Member Typedef Documentation

◆ array

typedef std::vector<value> picojson::value::array

Definition at line 124 of file picojson.h.

◆ object

typedef std::map<std::string, value> picojson::value::object

Definition at line 125 of file picojson.h.

Constructor & Destructor Documentation

◆ value() [1/11]

picojson::value::value ( )
inline

Definition at line 197 of file picojson.h.

◆ value() [2/11]

picojson::value::value ( int  type,
bool   
)
inline

Definition at line 200 of file picojson.h.

◆ value() [3/11]

picojson::value::value ( bool  b)
inlineexplicit

Definition at line 220 of file picojson.h.

◆ value() [4/11]

picojson::value::value ( double  n)
inlineexplicit

Definition at line 230 of file picojson.h.

◆ value() [5/11]

picojson::value::value ( const std::string &  s)
inlineexplicit

Definition at line 245 of file picojson.h.

◆ value() [6/11]

picojson::value::value ( const array a)
inlineexplicit

Definition at line 249 of file picojson.h.

◆ value() [7/11]

picojson::value::value ( const object o)
inlineexplicit

Definition at line 253 of file picojson.h.

◆ value() [8/11]

picojson::value::value ( const char *  s)
inlineexplicit

Definition at line 271 of file picojson.h.

◆ value() [9/11]

picojson::value::value ( const char *  s,
size_t  len 
)
inline

Definition at line 275 of file picojson.h.

◆ ~value()

picojson::value::~value ( )
inline

Definition at line 294 of file picojson.h.

Here is the call graph for this function:

◆ value() [10/11]

picojson::value::value ( const value x)
inline

Definition at line 298 of file picojson.h.

◆ value() [11/11]

template<typename T >
picojson::value::value ( const T *  )
private

Member Function Documentation

◆ _indent()

template<typename Iter >
void picojson::value::_indent ( Iter  os,
int  indent 
)
staticprivate

Definition at line 559 of file picojson.h.

Referenced by serialize_().

Here is the caller graph for this function:

◆ clear()

void picojson::value::clear ( )
inlineprivate

Definition at line 279 of file picojson.h.

Referenced by ~value().

Here is the caller graph for this function:

◆ contains() [1/2]

bool picojson::value::contains ( const size_t  idx) const
inline

Definition at line 454 of file picojson.h.

◆ contains() [2/2]

bool picojson::value::contains ( const std::string &  key) const
inline

Definition at line 459 of file picojson.h.

◆ evaluate_as_boolean()

bool picojson::value::evaluate_as_boolean ( ) const
inline

Definition at line 409 of file picojson.h.

◆ get() [1/6]

template<typename T >
T& picojson::value::get ( )

◆ get() [2/6]

◆ get() [3/6]

value & picojson::value::get ( const size_t  idx)
inline

Definition at line 434 of file picojson.h.

◆ get() [4/6]

const value & picojson::value::get ( const size_t  idx) const
inline

Definition at line 428 of file picojson.h.

◆ get() [5/6]

value & picojson::value::get ( const std::string &  key)
inline

Definition at line 447 of file picojson.h.

◆ get() [6/6]

const value & picojson::value::get ( const std::string &  key) const
inline

Definition at line 440 of file picojson.h.

◆ is() [1/2]

template<typename T >
bool picojson::value::is ( ) const

◆ is() [2/2]

template<>
bool picojson::value::is ( ) const
inline

Definition at line 349 of file picojson.h.

◆ operator=()

value & picojson::value::operator= ( const value x)
inline

Definition at line 314 of file picojson.h.

Here is the call graph for this function:

◆ serialize() [1/2]

std::string picojson::value::serialize ( bool  prettify = false) const
inline

Definition at line 555 of file picojson.h.

Here is the call graph for this function:

◆ serialize() [2/2]

template<typename Iter >
void picojson::value::serialize ( Iter  os,
bool  prettify = false 
) const

Definition at line 551 of file picojson.h.

Referenced by operator<<().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ serialize_() [1/2]

std::string picojson::value::serialize_ ( int  indent) const
inlineprivate

Definition at line 631 of file picojson.h.

Here is the call graph for this function:

◆ serialize_() [2/2]

template<typename Iter >
void picojson::value::serialize_ ( Iter  os,
int  indent 
) const
private

Definition at line 566 of file picojson.h.

Referenced by serialize(), and serialize_().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set()

template<typename T >
void picojson::value::set ( const T &  )

◆ swap()

void picojson::value::swap ( value x)
throw (
)
inline

Definition at line 331 of file picojson.h.

Referenced by operator=(), and std::swap().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ to_str()

std::string picojson::value::to_str ( ) const
inline

Definition at line 465 of file picojson.h.

Referenced by serialize_().

Here is the caller graph for this function:

Member Data Documentation

◆ type_

int picojson::value::type_
protected

Definition at line 138 of file picojson.h.

Referenced by clear(), evaluate_as_boolean(), is(), serialize_(), to_str(), and value().

◆ u_

_storage picojson::value::u_
protected

Definition at line 139 of file picojson.h.

Referenced by contains(), evaluate_as_boolean(), get(), serialize_(), to_str(), and value().


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