![]() |
Dash Core
0.12.2.1
P2P Digital Currency
|
#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 |
bool | checkObject (const std::map< std::string, UniValue::VType > &memberTypes) |
const UniValue & | operator[] (const std::string &key) const |
const UniValue & | operator[] (unsigned int 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_backV (const std::vector< UniValue > &vec) |
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) |
bool | read (const std::string &rawStr) |
std::vector< std::string > | getKeys () const |
std::vector< UniValue > | getValues () const |
bool | get_bool () const |
std::string | get_str () const |
int | get_int () const |
int64_t | get_int64 () const |
double | get_real () const |
const UniValue & | get_obj () const |
const UniValue & | get_array () const |
enum VType | type () const |
bool | push_back (std::pair< std::string, UniValue > pear) |
Private Member Functions | |
int | findKey (const std::string &key) 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< UniValue > | values |
Friends | |
const UniValue & | find_value (const UniValue &obj, const std::string &name) |
Definition at line 19 of file univalue.h.
enum UniValue::VType |
Enumerator | |
---|---|
VNULL | |
VOBJ | |
VARR | |
VSTR | |
VNUM | |
VBOOL |
Definition at line 21 of file univalue.h.
|
inline |
Definition at line 23 of file univalue.h.
|
inline |
Definition at line 24 of file univalue.h.
|
inline |
Definition at line 28 of file univalue.h.
|
inline |
Definition at line 31 of file univalue.h.
|
inline |
Definition at line 34 of file univalue.h.
|
inline |
Definition at line 37 of file univalue.h.
|
inline |
Definition at line 40 of file univalue.h.
|
inline |
Definition at line 43 of file univalue.h.
|
inline |
Definition at line 46 of file univalue.h.
|
inline |
Definition at line 50 of file univalue.h.
bool UniValue::checkObject | ( | const std::map< std::string, UniValue::VType > & | memberTypes | ) |
Definition at line 228 of file univalue.cpp.
Referenced by MutateTxSign().
void UniValue::clear | ( | ) |
Definition at line 80 of file univalue.cpp.
Referenced by listtransactions().
|
inline |
Definition at line 67 of file univalue.h.
Referenced by CallRPC(), CKeePassIntegrator::doHTTPPost(), and signrawtransaction().
|
inline |
Definition at line 75 of file univalue.h.
Referenced by MutateTxSign().
|
private |
Definition at line 218 of file univalue.cpp.
Referenced by exists().
const UniValue & UniValue::get_array | ( | ) | const |
Definition at line 354 of file univalue.cpp.
Referenced by _createmultisig_redeemScript(), createrawtransaction(), CKeePassIntegrator::CKeePassResponse::getEntries(), gettxoutproof(), HTTPReq_JSONRPC(), listunspent(), lockunspent(), JSONRequest::parse(), and signrawtransaction().
bool UniValue::get_bool | ( | ) | const |
Definition at line 303 of file univalue.cpp.
Referenced by getbalance(), getreceivedbyaccount(), getreceivedbyaddress(), listaccounts(), ListReceived(), lockunspent(), CKeePassIntegrator::CKeePassResponse::parseResponse(), sendfrom(), and sendmany().
int UniValue::get_int | ( | ) | const |
Definition at line 317 of file univalue.cpp.
Referenced by _createmultisig_redeemScript(), createrawtransaction(), CSuperblock::CSuperblock(), estimatefee(), estimatepriority(), estimatesmartfee(), estimatesmartpriority(), generate(), getaddressdeltas(), getaddresstxids(), getblockhash(), getblockhashes(), getnetworkhashps(), getspentinfo(), getsuperblockbudget(), gettxout(), JSONErrorReply(), listsinceblock(), lockunspent(), movecmd(), RPCExecutor::request(), setgenerate(), signrawtransaction(), and voteraw().
int64_t UniValue::get_int64 | ( | ) | const |
Definition at line 327 of file univalue.cpp.
Referenced by createrawtransaction(), getblocktemplate(), CProposalValidator::GetDataValue(), prioritisetransaction(), spork(), voteraw(), and walletpassphrase().
const UniValue & UniValue::get_obj | ( | ) | const |
Definition at line 347 of file univalue.cpp.
Referenced by CallRPC(), createrawtransaction(), CKeePassIntegrator::doHTTPPost(), getblocktemplate(), lockunspent(), JSONRequest::parse(), and sendmany().
double UniValue::get_real | ( | ) | const |
Definition at line 337 of file univalue.cpp.
Referenced by CProposalValidator::GetDataValue().
std::string UniValue::get_str | ( | ) | const |
Definition at line 310 of file univalue.cpp.
Referenced by _createmultisig_redeemScript(), AccountFromValue(), addnode(), backupwallet(), CDashNetwork::CDashNetwork(), CommandLineRPC(), CSuperblock::CSuperblock(), debug(), decodescript(), CKeePassIntegrator::doHTTPPost(), dumpprivkey(), encryptwallet(), getaddednodeinfo(), getblock(), getblockheader(), getblockheaders(), getblocktemplate(), CProposalValidator::GetDataValue(), gettxout(), gettxoutproof(), gobject(), importelectrumwallet(), importprivkey(), instantsendtoaddress(), invalidateblock(), listunspent(), lockunspent(), masternode(), masternodebroadcast(), mnsync(), JSONRequest::parse(), ParseHashV(), ParseHexV(), reconsiderblock(), RPCExecutor::request(), sendfrom(), sendmany(), sendtoaddress(), signmessage(), signrawtransaction(), spork(), verifymessage(), voteraw(), walletpassphrase(), and walletpassphrasechange().
|
inline |
Definition at line 71 of file univalue.h.
std::vector< std::string > UniValue::getKeys | ( | ) | const |
Definition at line 289 of file univalue.cpp.
Referenced by createrawtransaction(), and sendmany().
|
inline |
Definition at line 65 of file univalue.h.
Referenced by CProposalValidator::GetDataValue(), read(), and type().
|
inline |
Definition at line 66 of file univalue.h.
Referenced by AmountFromValue(), CommandLineRPC(), ParseHashUV(), and ParseHexUV().
std::vector< UniValue > UniValue::getValues | ( | ) | const |
Definition at line 296 of file univalue.cpp.
Referenced by getAddressesFromParams(), CGovernanceObject::GetJSONObject(), listtransactions(), and CProposalValidator::ParseJSONData().
|
inline |
Definition at line 83 of file univalue.h.
Referenced by getAddressesFromParams(), getblocktemplate(), HTTPReq_JSONRPC(), JSONRequest::parse(), and ParseNonRFCJSONValue().
|
inline |
Definition at line 80 of file univalue.h.
|
inline |
Definition at line 79 of file univalue.h.
|
inline |
Definition at line 77 of file univalue.h.
Referenced by CommandLineRPC(), createrawtransaction(), getblocktemplate(), instantsendtoaddress(), JSONRequest::parse(), RPCTypeCheck(), RPCTypeCheckObj(), sendfrom(), sendmany(), sendtoaddress(), setban(), and signrawtransaction().
|
inline |
Definition at line 82 of file univalue.h.
Referenced by AmountFromValue(), createrawtransaction(), getaddressdeltas(), getaddresstxids(), getblocktemplate(), and getspentinfo().
|
inline |
Definition at line 84 of file univalue.h.
Referenced by getaddressdeltas(), getspentinfo(), HTTPReq_JSONRPC(), lockunspent(), MutateTxSign(), and JSONRequest::parse().
|
inline |
Definition at line 81 of file univalue.h.
Referenced by AmountFromValue(), CommandLineRPC(), decodescript(), getblocktemplate(), getspentinfo(), JSONRequest::parse(), ParseHashUV(), ParseHashV(), ParseHexUV(), and ParseHexV().
|
inline |
Definition at line 78 of file univalue.h.
const UniValue & UniValue::operator[] | ( | const std::string & | key | ) | const |
Definition at line 243 of file univalue.cpp.
const UniValue & UniValue::operator[] | ( | unsigned int | index | ) | const |
Definition at line 255 of file univalue.cpp.
bool UniValue::push_back | ( | const UniValue & | val | ) |
Definition at line 176 of file univalue.cpp.
Referenced by AcentryToJSON(), CKeePassIntegrator::CKeePassRequest::addStrParameter(), BIP9SoftForkDesc(), blockToJSON(), decodescript(), dumphdinfo(), generate(), getaddednodeinfo(), getaddressdeltas(), getaddressesbyaccount(), getaddressmempool(), getaddressutxos(), getblockchaininfo(), getblockheaders(), getblocktemplate(), getchaintips(), getgovernanceinfo(), getinfo(), getmininginfo(), getnettotals(), getnetworkinfo(), GetNetworksInfo(), getpeerinfo(), getpoolinfo(), getspentinfo(), gettransaction(), gettxout(), gettxoutsetinfo(), getwalletinfo(), gobject(), JSONRPCExecBatch(), JSONRPCReplyObj(), JSONRPCRequest(), listaccounts(), listaddressgroupings(), listbanned(), listlockunspent(), ListReceived(), listsinceblock(), ListTransactions(), listunspent(), masternode(), masternodebroadcast(), masternodelist(), MaybePushAddress(), mempoolInfoToJSON(), mempoolToJSON(), mnsync(), push_back(), read(), rest_getutxos(), rest_headers(), RPCConvertValues(), ScriptPubKeyToJSON(), ScriptPubKeyToUniv(), SoftForkDesc(), SoftForkMajorityDesc(), spork(), TxInErrorToJSON(), TxToJSON(), TxToUniv(), validateaddress(), verifytxoutproof(), and WalletTxToJSON().
|
inline |
Definition at line 87 of file univalue.h.
|
inline |
Definition at line 91 of file univalue.h.
|
inline |
Definition at line 156 of file univalue.h.
bool UniValue::push_backV | ( | const std::vector< UniValue > & | vec | ) |
Definition at line 185 of file univalue.cpp.
Referenced by listtransactions().
bool UniValue::pushKV | ( | const std::string & | key, |
const UniValue & | val | ||
) |
Definition at line 195 of file univalue.cpp.
Referenced by push_back(), pushKV(), and TxToUniv().
|
inline |
Definition at line 98 of file univalue.h.
|
inline |
Definition at line 102 of file univalue.h.
|
inline |
Definition at line 106 of file univalue.h.
|
inline |
Definition at line 110 of file univalue.h.
|
inline |
Definition at line 114 of file univalue.h.
|
inline |
Definition at line 118 of file univalue.h.
bool UniValue::pushKVs | ( | const UniValue & | obj | ) |
Definition at line 205 of file univalue.cpp.
Referenced by validateaddress().
bool UniValue::read | ( | const char * | raw | ) |
Definition at line 249 of file univalue_read.cpp.
Referenced by CallRPC(), CKeePassIntegrator::doHTTPPost(), CGovernanceObject::GetData(), HTTPReq_JSONRPC(), CProposalValidator::ParseJSONData(), ParseNonRFCJSONValue(), CKeePassIntegrator::CKeePassResponse::parseResponse(), read(), RegisterSetJson(), runtest(), and unescape_unicode_test().
|
inline |
Definition at line 128 of file univalue.h.
bool UniValue::setArray | ( | ) |
Definition at line 162 of file univalue.cpp.
Referenced by listtransactions().
bool UniValue::setBool | ( | bool | val | ) |
Definition at line 94 of file univalue.cpp.
Referenced by read(), and UniValue().
bool UniValue::setFloat | ( | double | val | ) |
Definition at line 142 of file univalue.cpp.
Referenced by UniValue().
bool UniValue::setInt | ( | uint64_t | val | ) |
Definition at line 122 of file univalue.cpp.
Referenced by UniValue().
bool UniValue::setInt | ( | int64_t | val | ) |
Definition at line 132 of file univalue.cpp.
|
inline |
Definition at line 59 of file univalue.h.
Referenced by setInt().
bool UniValue::setNull | ( | ) |
Definition at line 88 of file univalue.cpp.
bool UniValue::setNumStr | ( | const std::string & | val | ) |
Definition at line 111 of file univalue.cpp.
bool UniValue::setObject | ( | ) |
Definition at line 169 of file univalue.cpp.
bool UniValue::setStr | ( | const std::string & | val | ) |
Definition at line 154 of file univalue.cpp.
Referenced by UniValue().
|
inline |
Definition at line 69 of file univalue.h.
Referenced by _createmultisig_redeemScript(), abandontransaction(), addmultisigaddress(), addnode(), backupwallet(), clearbanned(), createmultisig(), createrawtransaction(), debug(), decoderawtransaction(), decodescript(), disconnectnode(), dumphdinfo(), dumpprivkey(), dumpwallet(), encryptwallet(), estimatefee(), estimatepriority(), estimatesmartfee(), estimatesmartpriority(), fundrawtransaction(), generate(), getaccount(), getaccountaddress(), getaddednodeinfo(), getaddressbalance(), getaddressdeltas(), getaddressesbyaccount(), getaddressmempool(), getaddresstxids(), getaddressutxos(), getbalance(), getbestblockhash(), getblock(), getblockchaininfo(), getblockcount(), getblockhash(), getblockhashes(), getblockheader(), getblockheaders(), getblocktemplate(), getchaintips(), getconnectioncount(), getdifficulty(), CKeePassIntegrator::CKeePassResponse::getEntries(), getgenerate(), getgovernanceinfo(), getinfo(), getmempoolinfo(), getmininginfo(), getnettotals(), getnetworkhashps(), getnetworkinfo(), getnewaddress(), getpeerinfo(), getpoolinfo(), getrawchangeaddress(), getrawmempool(), getrawtransaction(), getreceivedbyaccount(), getreceivedbyaddress(), getspentinfo(), getsuperblockbudget(), gettransaction(), gettxout(), gettxoutproof(), gettxoutsetinfo(), getunconfirmedbalance(), getwalletinfo(), gobject(), help(), importaddress(), importelectrumwallet(), importprivkey(), importpubkey(), importwallet(), instantsendtoaddress(), invalidateblock(), JSONRPCExecBatch(), keepass(), keypoolrefill(), listaccounts(), listbanned(), listlockunspent(), ListReceived(), listreceivedbyaccount(), listreceivedbyaddress(), listsinceblock(), listtransactions(), listunspent(), lockunspent(), masternode(), masternodebroadcast(), masternodelist(), mnsync(), movecmd(), MutateTxSign(), ParseNonRFCJSONValue(), ping(), prioritisetransaction(), privatesend(), reconsiderblock(), resendwallettransactions(), RPCTypeCheck(), sendfrom(), sendmany(), sendrawtransaction(), sendtoaddress(), sentinelping(), setaccount(), setban(), setgenerate(), setmocktime(), setnetworkactive(), settxfee(), signmessage(), signrawtransaction(), spork(), stop(), submitblock(), validateaddress(), verifychain(), verifymessage(), verifytxoutproof(), voteraw(), walletlock(), walletpassphrase(), and walletpassphrasechange().
|
inline |
Definition at line 155 of file univalue.h.
Referenced by RPCTypeCheck(), RPCTypeCheckObj(), and ScriptPubKeyToUniv().
string UniValue::write | ( | unsigned int | prettyIndent = 0 , |
unsigned int | indentLevel = 0 |
||
) | const |
Definition at line 31 of file univalue_write.cpp.
Referenced by JSONRPCExecBatch(), JSONRPCReply(), JSONRPCRequest(), OutputTxJSON(), RPCExecutor::request(), rest_block(), rest_chaininfo(), rest_getutxos(), rest_headers(), rest_mempool_contents(), rest_mempool_info(), rest_tx(), and runtest().
|
private |
Definition at line 70 of file univalue_write.cpp.
|
private |
Definition at line 94 of file univalue_write.cpp.
Definition at line 280 of file univalue.cpp.
|
private |
Definition at line 135 of file univalue.h.
Referenced by find_value(), pushKVs(), and read().
|
private |
Definition at line 133 of file univalue.h.
Referenced by getType(), isArray(), isBool(), isFalse(), isNull(), isNum(), isObject(), isStr(), isTrue(), pushKVs(), and UniValue().
|
private |
Definition at line 134 of file univalue.h.
Referenced by getValStr(), isFalse(), isTrue(), pushKV(), setInt(), and UniValue().
|
private |
Definition at line 136 of file univalue.h.
Referenced by empty(), find_value(), pushKVs(), read(), and size().