Value Class Reference

Ratpac-two: json::Value Class Reference
Ratpac-two

Public Member Functions

 Value (Type type_)
 
 Value (TInteger integer)
 
 Value (TUInteger uinteger)
 
 Value (TReal real)
 
 Value (TBool boolean)
 
 Value (unsigned int uinteger)
 
 Value (int integer)
 
 Value (TString string)
 
 Value (TObject object)
 
 Value (TArray array)
 
template<typename T >
 Value (const std::vector< T > &ref)
 
 Value (const Value &other)
 
Valueoperator= (const Value &other)
 
template<typename T >
Valueoperator= (const T &val)
 
Valueoperator[] (const std::string &key) const
 
Valueoperator[] (const size_t index) const
 
void reset (Type type)
 
void reset ()
 
Type getType () const
 
TInteger getInteger () const
 
TUInteger getUInteger () const
 
TReal getReal () const
 
TBool getBool () const
 
TString getString () const
 
ValuegetMember (TString key) const
 
size_t getArraySize () const
 
ValuegetIndex (size_t index) const
 
template<typename T >
cast () const
 
template<typename T >
std::vector< T > toVector () const
 
std::vector< std::string > getMembers () const
 
bool isMember (std::string key) const
 
void setInteger (TInteger integer)
 
void setUINteger (TUInteger uinteger)
 
void setReal (TReal real)
 
void setReal (TBool boolean)
 
void setString (TString string)
 
void setMember (TString key, Value value)
 
void setArraySize (size_t size)
 
void setIndex (size_t index, Value value)
 
template<>
int cast () const
 
template<>
double cast () const
 
template<>
bool cast () const
 

Protected Member Functions

void checkType (Type type_) const
 
void checkTypeReset (Type type_)
 
void decref ()
 
void incref ()
 
void clean ()
 

Static Protected Member Functions

static std::string prettyType (Type type)
 
static void wrongType (Type actual, Type requested)
 

Protected Attributes

TUInteger * refcount
 
Type type
 
TData data
 

Friends

class Reader
 
class Writer
 

The documentation for this class was generated from the following files:
  • /home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/src/db/include/RAT/json.hh
  • /home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/src/db/src/json.cc