Fabcoin Core  0.16.2
P2P Digital Currency
Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
UniValue Class Reference

#include <univalue.h>

Public Types

enum  VType {
  VNULL, VOBJ, VARR, VSTR,
  VNUM, VBOOL
}
 

Public Member Functions

 UniValue ()
 
 UniValue (UniValue::VType initialType, const std::string &initialStr="")
 
 UniValue (uint64_t val_)
 
 UniValue (int64_t val_)
 
 UniValue (bool val_)
 
 UniValue (int val_)
 
 UniValue (double val_)
 
 UniValue (const std::string &val_)
 
 UniValue (const char *val_)
 
 ~UniValue ()
 
void clear ()
 
bool setNull ()
 
bool setBool (bool val)
 
bool setNumStr (const std::string &val)
 
bool setInt (uint64_t val)
 
bool setInt (int64_t val)
 
bool setInt (int val_)
 
bool setFloat (double val)
 
bool setStr (const std::string &val)
 
bool setArray ()
 
bool setObject ()
 
enum VType getType () const
 
const std::string & getValStr () const
 
bool empty () const
 
size_t size () const
 
bool getBool () const
 
void getObjMap (std::map< std::string, UniValue > &kv) const
 
bool checkObject (const std::map< std::string, UniValue::VType > &memberTypes) const
 
const UniValueoperator[] (const std::string &key) const
 
const UniValueoperator[] (size_t index) const
 
bool exists (const std::string &key) const
 
bool isNull () const
 
bool isTrue () const
 
bool isFalse () const
 
bool isBool () const
 
bool isStr () const
 
bool isNum () const
 
bool isArray () const
 
bool isObject () const
 
bool push_back (const UniValue &val)
 
bool push_back (const std::string &val_)
 
bool push_back (const char *val_)
 
bool push_back (uint64_t val_)
 
bool push_back (int64_t val_)
 
bool push_back (int val_)
 
bool push_back (double val_)
 
bool push_backV (const std::vector< UniValue > &vec)
 
void __pushKV (const std::string &key, const UniValue &val)
 
bool pushKV (const std::string &key, const UniValue &val)
 
bool pushKV (const std::string &key, const std::string &val_)
 
bool pushKV (const std::string &key, const char *val_)
 
bool pushKV (const std::string &key, int64_t val_)
 
bool pushKV (const std::string &key, uint64_t val_)
 
bool pushKV (const std::string &key, int val_)
 
bool pushKV (const std::string &key, double val_)
 
bool pushKVs (const UniValue &obj)
 
std::string write (unsigned int prettyIndent=0, unsigned int indentLevel=0) const
 
bool read (const char *raw, size_t len)
 
bool read (const char *raw)
 
bool read (const std::string &rawStr)
 
const std::vector< std::string > & getKeys () const
 
const std::vector< UniValue > & getValues () const
 
bool get_bool () const
 
const std::string & get_str () const
 
int get_int () const
 
int64_t get_int64 () const
 
double get_real () const
 
const UniValueget_obj () const
 
const UniValueget_array () const
 
enum VType type () const
 
bool push_back (std::pair< std::string, UniValue > pear)
 

Private Member Functions

bool findKey (const std::string &key, size_t &retIdx) const
 
void writeArray (unsigned int prettyIndent, unsigned int indentLevel, std::string &s) const
 
void writeObject (unsigned int prettyIndent, unsigned int indentLevel, std::string &s) const
 

Private Attributes

UniValue::VType typ
 
std::string val
 
std::vector< std::string > keys
 
std::vector< UniValuevalues
 

Friends

const UniValuefind_value (const UniValue &obj, const std::string &name)
 

Detailed Description

Definition at line 20 of file univalue.h.

Member Enumeration Documentation

Enumerator
VNULL 
VOBJ 
VARR 
VSTR 
VNUM 
VBOOL 

Definition at line 22 of file univalue.h.

Constructor & Destructor Documentation

UniValue::UniValue ( )
inline

Definition at line 24 of file univalue.h.

Here is the caller graph for this function:

UniValue::UniValue ( UniValue::VType  initialType,
const std::string &  initialStr = "" 
)
inline

Definition at line 25 of file univalue.h.

UniValue::UniValue ( uint64_t  val_)
inline

Definition at line 29 of file univalue.h.

Here is the call graph for this function:

UniValue::UniValue ( int64_t  val_)
inline

Definition at line 32 of file univalue.h.

Here is the call graph for this function:

UniValue::UniValue ( bool  val_)
inline

Definition at line 35 of file univalue.h.

Here is the call graph for this function:

UniValue::UniValue ( int  val_)
inline

Definition at line 38 of file univalue.h.

Here is the call graph for this function:

UniValue::UniValue ( double  val_)
inline

Definition at line 41 of file univalue.h.

Here is the call graph for this function:

UniValue::UniValue ( const std::string &  val_)
inline

Definition at line 44 of file univalue.h.

Here is the call graph for this function:

UniValue::UniValue ( const char *  val_)
inline

Definition at line 47 of file univalue.h.

Here is the call graph for this function:

UniValue::~UniValue ( )
inline

Definition at line 51 of file univalue.h.

Here is the call graph for this function:

Member Function Documentation

void UniValue::__pushKV ( const std::string &  key,
const UniValue val 
)

Definition at line 129 of file univalue.cpp.

Here is the caller graph for this function:

bool UniValue::checkObject ( const std::map< std::string, UniValue::VType > &  memberTypes) const

Definition at line 181 of file univalue.cpp.

Here is the caller graph for this function:

void UniValue::clear ( )

Definition at line 17 of file univalue.cpp.

Here is the caller graph for this function:

bool UniValue::empty ( void  ) const
inline

Definition at line 68 of file univalue.h.

Here is the caller graph for this function:

bool UniValue::exists ( const std::string &  key) const
inline

Definition at line 77 of file univalue.h.

Here is the call graph for this function:

Here is the caller graph for this function:

bool UniValue::findKey ( const std::string &  key,
size_t &  retIdx 
) const
private

Definition at line 169 of file univalue.cpp.

Here is the caller graph for this function:

const UniValue & UniValue::get_array ( ) const

Definition at line 141 of file univalue_get.cpp.

Here is the caller graph for this function:

bool UniValue::get_bool ( ) const

Definition at line 90 of file univalue_get.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int UniValue::get_int ( ) const

Definition at line 104 of file univalue_get.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int64_t UniValue::get_int64 ( ) const

Definition at line 114 of file univalue_get.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

const UniValue & UniValue::get_obj ( ) const

Definition at line 134 of file univalue_get.cpp.

Here is the caller graph for this function:

double UniValue::get_real ( ) const

Definition at line 124 of file univalue_get.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

const std::string & UniValue::get_str ( ) const

Definition at line 97 of file univalue_get.cpp.

Here is the call graph for this function:

bool UniValue::getBool ( ) const
inline

Definition at line 72 of file univalue.h.

Here is the call graph for this function:

Here is the caller graph for this function:

const std::vector< std::string > & UniValue::getKeys ( ) const

Definition at line 76 of file univalue_get.cpp.

Here is the caller graph for this function:

void UniValue::getObjMap ( std::map< std::string, UniValue > &  kv) const

Definition at line 159 of file univalue.cpp.

Here is the caller graph for this function:

enum VType UniValue::getType ( ) const
inline

Definition at line 66 of file univalue.h.

Here is the caller graph for this function:

const std::string& UniValue::getValStr ( ) const
inline

Definition at line 67 of file univalue.h.

Here is the caller graph for this function:

const std::vector< UniValue > & UniValue::getValues ( ) const

Definition at line 83 of file univalue_get.cpp.

Here is the caller graph for this function:

bool UniValue::isArray ( ) const
inline

Definition at line 85 of file univalue.h.

Here is the caller graph for this function:

bool UniValue::isBool ( ) const
inline

Definition at line 82 of file univalue.h.

Here is the caller graph for this function:

bool UniValue::isFalse ( ) const
inline

Definition at line 81 of file univalue.h.

Here is the caller graph for this function:

bool UniValue::isNull ( ) const
inline

Definition at line 79 of file univalue.h.

bool UniValue::isNum ( ) const
inline

Definition at line 84 of file univalue.h.

Here is the caller graph for this function:

bool UniValue::isObject ( ) const
inline

Definition at line 86 of file univalue.h.

Here is the call graph for this function:

Here is the caller graph for this function:

bool UniValue::isStr ( ) const
inline

Definition at line 83 of file univalue.h.

Here is the caller graph for this function:

bool UniValue::isTrue ( ) const
inline

Definition at line 80 of file univalue.h.

Here is the caller graph for this function:

const UniValue & UniValue::operator[] ( const std::string &  key) const

Definition at line 199 of file univalue.cpp.

Here is the caller graph for this function:

const UniValue & UniValue::operator[] ( size_t  index) const

Definition at line 211 of file univalue.cpp.

bool UniValue::push_back ( const UniValue val)

Definition at line 110 of file univalue.cpp.

bool UniValue::push_back ( const std::string &  val_)
inline

Definition at line 89 of file univalue.h.

Here is the call graph for this function:

bool UniValue::push_back ( const char *  val_)
inline

Definition at line 93 of file univalue.h.

Here is the call graph for this function:

bool UniValue::push_back ( uint64_t  val_)
inline

Definition at line 97 of file univalue.h.

Here is the call graph for this function:

bool UniValue::push_back ( int64_t  val_)
inline

Definition at line 101 of file univalue.h.

Here is the call graph for this function:

bool UniValue::push_back ( int  val_)
inline

Definition at line 105 of file univalue.h.

Here is the call graph for this function:

bool UniValue::push_back ( double  val_)
inline

Definition at line 109 of file univalue.h.

Here is the call graph for this function:

bool UniValue::push_back ( std::pair< std::string, UniValue pear)
inline

Definition at line 176 of file univalue.h.

Here is the call graph for this function:

bool UniValue::push_backV ( const std::vector< UniValue > &  vec)

Definition at line 119 of file univalue.cpp.

Here is the caller graph for this function:

bool UniValue::pushKV ( const std::string &  key,
const UniValue val 
)

Definition at line 135 of file univalue.cpp.

Here is the caller graph for this function:

bool UniValue::pushKV ( const std::string &  key,
const std::string &  val_ 
)
inline

Definition at line 117 of file univalue.h.

Here is the call graph for this function:

bool UniValue::pushKV ( const std::string &  key,
const char *  val_ 
)
inline

Definition at line 121 of file univalue.h.

Here is the call graph for this function:

bool UniValue::pushKV ( const std::string &  key,
int64_t  val_ 
)
inline

Definition at line 125 of file univalue.h.

Here is the call graph for this function:

bool UniValue::pushKV ( const std::string &  key,
uint64_t  val_ 
)
inline

Definition at line 129 of file univalue.h.

Here is the call graph for this function:

bool UniValue::pushKV ( const std::string &  key,
int  val_ 
)
inline

Definition at line 133 of file univalue.h.

Here is the call graph for this function:

bool UniValue::pushKV ( const std::string &  key,
double  val_ 
)
inline

Definition at line 137 of file univalue.h.

Here is the call graph for this function:

bool UniValue::pushKVs ( const UniValue obj)

Definition at line 148 of file univalue.cpp.

Here is the caller graph for this function:

bool UniValue::read ( const char *  raw,
size_t  len 
)

Definition at line 253 of file univalue_read.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool UniValue::read ( const char *  raw)
inline

Definition at line 147 of file univalue.h.

Here is the call graph for this function:

Here is the caller graph for this function:

bool UniValue::read ( const std::string &  rawStr)
inline

Definition at line 148 of file univalue.h.

Here is the call graph for this function:

bool UniValue::setArray ( )

Definition at line 96 of file univalue.cpp.

Here is the caller graph for this function:

bool UniValue::setBool ( bool  val)

Definition at line 31 of file univalue.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool UniValue::setFloat ( double  val)

Definition at line 77 of file univalue.cpp.

Here is the caller graph for this function:

bool UniValue::setInt ( uint64_t  val)

Definition at line 59 of file univalue.cpp.

Here is the caller graph for this function:

bool UniValue::setInt ( int64_t  val)

Definition at line 68 of file univalue.cpp.

bool UniValue::setInt ( int  val_)
inline

Definition at line 60 of file univalue.h.

Here is the call graph for this function:

Here is the caller graph for this function:

bool UniValue::setNull ( )

Definition at line 25 of file univalue.cpp.

Here is the caller graph for this function:

bool UniValue::setNumStr ( const std::string &  val)

Definition at line 48 of file univalue.cpp.

Here is the caller graph for this function:

bool UniValue::setObject ( )

Definition at line 103 of file univalue.cpp.

Here is the caller graph for this function:

bool UniValue::setStr ( const std::string &  val)

Definition at line 88 of file univalue.cpp.

Here is the caller graph for this function:

size_t UniValue::size ( void  ) const
inline

Definition at line 70 of file univalue.h.

enum VType UniValue::type ( ) const
inline

Definition at line 175 of file univalue.h.

Here is the call graph for this function:

Here is the caller graph for this function:

string UniValue::write ( unsigned int  prettyIndent = 0,
unsigned int  indentLevel = 0 
) const

Definition at line 31 of file univalue_write.cpp.

Here is the caller graph for this function:

void UniValue::writeArray ( unsigned int  prettyIndent,
unsigned int  indentLevel,
std::string &  s 
) const
private

Definition at line 70 of file univalue_write.cpp.

void UniValue::writeObject ( unsigned int  prettyIndent,
unsigned int  indentLevel,
std::string &  s 
) const
private

Definition at line 92 of file univalue_write.cpp.

Friends And Related Function Documentation

const UniValue& find_value ( const UniValue obj,
const std::string &  name 
)
friend

Definition at line 236 of file univalue.cpp.

Member Data Documentation

std::vector<std::string> UniValue::keys
private

Definition at line 155 of file univalue.h.

UniValue::VType UniValue::typ
private

Definition at line 153 of file univalue.h.

std::string UniValue::val
private

Definition at line 154 of file univalue.h.

std::vector<UniValue> UniValue::values
private

Definition at line 156 of file univalue.h.


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