5MP Motion Camera JPEG Image and Movie Catcher  1.1.1.1
A CGI interface to capture and display pictures and movies using OpenCV.
jsonxx::Value Class Reference

#include <jsonxx.h>

Public Types

enum  {
  NUMBER_, STRING_, BOOL_, NULL_,
  ARRAY_, OBJECT_, INVALID_
}
 

Public Member Functions

 Value ()
 
 ~Value ()
 
void reset ()
 
template<typename T >
void import (const T &)
 
void import (const bool &b)
 
 $number (char) $number(int) $number(long) $number(long long) $number(unsigned char) $number(unsigned int) $number(unsigned long) $number(unsigned long long) $number(float) $number(double) $number(long double) $ void import(const Null &)
 
void import (const String &s)
 
void import (const Array &a)
 
void import (const Object &o)
 
void import (const Value &other)
 
template<typename T >
Valueoperator<< (const T &t)
 
template<typename T >
Valueoperator= (const T &t)
 
 Value (const Value &other)
 
template<typename T >
 Value (const T &t)
 
template<size_t N>
 Value (const char(&t)[N])
 
bool parse (std::istream &input)
 
bool parse (const std::string &input)
 
template<typename T >
bool is () const
 
template<typename T >
T & get ()
 
template<typename T >
const T & get () const
 
bool empty () const
 
template<>
bool is () const
 
template<>
bool is () const
 
template<>
bool is () const
 
template<>
bool is () const
 
template<>
bool is () const
 
template<>
bool is () const
 
template<>
bool is () const
 
template<>
Valueget ()
 
template<>
const Valueget () const
 
template<>
bool & get ()
 
template<>
std::string & get ()
 
template<>
Numberget ()
 
template<>
Arrayget ()
 
template<>
Objectget ()
 
template<>
const Booleanget () const
 
template<>
const Stringget () const
 
template<>
const Numberget () const
 
template<>
const Arrayget () const
 
template<>
const Objectget () const
 

Public Attributes

enum jsonxx::Value:: { ... }  type_
 
union {
   Number   number_value_
 
   String *   string_value_
 
   Boolean   bool_value_
 
   Array *   array_value_
 
   Object *   object_value_
 
}; 
 

Static Protected Member Functions

static bool parse (std::istream &input, Value &value)
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
NUMBER_ 
STRING_ 
BOOL_ 
NULL_ 
ARRAY_ 
OBJECT_ 
INVALID_ 

Constructor & Destructor Documentation

◆ Value() [1/4]

jsonxx::Value::Value ( )

◆ ~Value()

jsonxx::Value::~Value ( )
inline

◆ Value() [2/4]

jsonxx::Value::Value ( const Value other)

◆ Value() [3/4]

template<typename T >
jsonxx::Value::Value ( const T &  t)
inline

◆ Value() [4/4]

template<size_t N>
jsonxx::Value::Value ( const char(&)  t[N])
inline

Member Function Documentation

◆ $number()

jsonxx::Value::$number ( char  ) const &
inline

◆ empty()

bool jsonxx::Value::empty ( ) const

◆ get() [1/14]

template<typename T >
T& jsonxx::Value::get ( )

◆ get() [2/14]

template<typename T >
const T& jsonxx::Value::get ( ) const

◆ get() [3/14]

template<>
Value& jsonxx::Value::get ( )
inline

◆ get() [4/14]

template<>
const Value& jsonxx::Value::get ( ) const
inline

◆ get() [5/14]

template<>
bool& jsonxx::Value::get ( )
inline

◆ get() [6/14]

template<>
std::string& jsonxx::Value::get ( )
inline

◆ get() [7/14]

template<>
Number& jsonxx::Value::get ( )
inline

◆ get() [8/14]

template<>
Array& jsonxx::Value::get ( )
inline

◆ get() [9/14]

template<>
Object& jsonxx::Value::get ( )
inline

◆ get() [10/14]

template<>
const Boolean& jsonxx::Value::get ( ) const
inline

◆ get() [11/14]

template<>
const String& jsonxx::Value::get ( ) const
inline

◆ get() [12/14]

template<>
const Number& jsonxx::Value::get ( ) const
inline

◆ get() [13/14]

template<>
const Array& jsonxx::Value::get ( ) const
inline

◆ get() [14/14]

template<>
const Object& jsonxx::Value::get ( ) const
inline

◆ import() [1/6]

template<typename T >
void jsonxx::Value::import ( const T &  )
inline

◆ import() [2/6]

void jsonxx::Value::import ( const bool &  b)
inline

◆ import() [3/6]

void jsonxx::Value::import ( const String s)
inline

◆ import() [4/6]

void jsonxx::Value::import ( const Array a)
inline

◆ import() [5/6]

void jsonxx::Value::import ( const Object o)
inline

◆ import() [6/6]

void jsonxx::Value::import ( const Value other)
inline

◆ is() [1/8]

template<typename T >
bool jsonxx::Value::is ( ) const

◆ is() [2/8]

template<>
bool jsonxx::Value::is ( ) const
inline

◆ is() [3/8]

template<>
bool jsonxx::Value::is ( ) const
inline

◆ is() [4/8]

template<>
bool jsonxx::Value::is ( ) const
inline

◆ is() [5/8]

template<>
bool jsonxx::Value::is ( ) const
inline

◆ is() [6/8]

template<>
bool jsonxx::Value::is ( ) const
inline

◆ is() [7/8]

template<>
bool jsonxx::Value::is ( ) const
inline

◆ is() [8/8]

template<>
bool jsonxx::Value::is ( ) const
inline

◆ operator<<()

template<typename T >
Value& jsonxx::Value::operator<< ( const T &  t)
inline

◆ operator=()

template<typename T >
Value& jsonxx::Value::operator= ( const T &  t)
inline

◆ parse() [1/3]

bool jsonxx::Value::parse ( std::istream &  input)

◆ parse() [2/3]

bool jsonxx::Value::parse ( const std::string &  input)

◆ parse() [3/3]

bool jsonxx::Value::parse ( std::istream &  input,
Value value 
)
staticprotected

◆ reset()

void jsonxx::Value::reset ( )

Member Data Documentation

◆ @2

union { ... }

◆ array_value_

Array* jsonxx::Value::array_value_

◆ bool_value_

Boolean jsonxx::Value::bool_value_

◆ number_value_

Number jsonxx::Value::number_value_

◆ object_value_

Object* jsonxx::Value::object_value_

◆ string_value_

String* jsonxx::Value::string_value_

◆ type_

enum { ... } jsonxx::Value::type_

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