![]() |
Bitcoin Core 31.1.0
P2P Digital Currency
|
#include <univalue.h>
Classes | |
| class | type_error |
Public Types | |
| enum | VType { VNULL , VOBJ , VARR , VSTR , VNUM , VBOOL } |
Public Member Functions | |
| UniValue () | |
| UniValue (UniValue::VType type, std::string str={}) | |
| template<typename Ref, typename T = std::remove_cv_t<std::remove_reference_t<Ref>>, std::enable_if_t< std::is_floating_point_v< T >||std::is_same_v< bool, T >||std::is_signed_v< T >||std::is_unsigned_v< T >||std::is_constructible_v< std::string, T >, bool > = true> | |
| UniValue (Ref &&val) | |
| void | clear () |
| void | setNull () |
| void | setBool (bool val) |
| void | setNumStr (std::string str) |
| void | setInt (uint64_t val) |
| void | setInt (int64_t val) |
| void | setInt (int val_) |
| void | setFloat (double val) |
| void | setStr (std::string str) |
| void | setArray () |
| void | setObject () |
| enum VType | getType () const |
| const std::string & | getValStr () const |
| bool | empty () const |
| size_t | size () const |
| void | reserve (size_t new_cap) |
| void | getObjMap (std::map< std::string, UniValue > &kv) const |
| bool | checkObject (const std::map< std::string, UniValue::VType > &memberTypes) const |
| const UniValue & | operator[] (const std::string &key) const |
| const UniValue & | operator[] (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 |
| void | push_back (UniValue val) |
| void | push_backV (const std::vector< UniValue > &vec) |
| template<class It> | |
| void | push_backV (It first, It last) |
| void | pushKVEnd (std::string key, UniValue val) |
| void | pushKV (std::string key, UniValue val) |
| void | pushKVs (UniValue obj) |
| std::string | write (unsigned int prettyIndent=0, unsigned int indentLevel=0) const |
| bool | read (std::string_view raw) |
| const std::vector< std::string > & | getKeys () const |
| const std::vector< UniValue > & | getValues () const |
| template<typename Int> | |
| Int | getInt () const |
| bool | get_bool () const |
| const std::string & | get_str () const |
| double | get_real () const |
| const UniValue & | get_obj () const |
| const UniValue & | get_array () const |
| enum VType | type () const |
| const UniValue & | find_value (std::string_view key) const |
Private Member Functions | |
| void | checkType (const VType &expected) const |
| 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< UniValue > | values |
Definition at line 22 of file univalue.h.
| enum UniValue::VType |
| Enumerator | |
|---|---|
| VNULL | |
| VOBJ | |
| VARR | |
| VSTR | |
| VNUM | |
| VBOOL | |
Definition at line 24 of file univalue.h.
|
inline |
|
inline |
|
inline |
| bool UniValue::checkObject | ( | const std::map< std::string, UniValue::VType > & | memberTypes | ) | const |
Definition at line 167 of file univalue.cpp.
|
private |
Definition at line 209 of file univalue.cpp.
| void UniValue::clear | ( | ) |
|
inline |
|
inline |
Definition at line 79 of file univalue.h.
| const UniValue & UniValue::find_value | ( | std::string_view | key | ) | const |
Definition at line 232 of file univalue.cpp.
|
private |
| const UniValue & UniValue::get_array | ( | ) | const |
Definition at line 83 of file univalue_get.cpp.
| bool UniValue::get_bool | ( | ) | const |
Definition at line 56 of file univalue_get.cpp.
| const UniValue & UniValue::get_obj | ( | ) | const |
Definition at line 77 of file univalue_get.cpp.
| double UniValue::get_real | ( | ) | const |
Definition at line 68 of file univalue_get.cpp.
| const std::string & UniValue::get_str | ( | ) | const |
Definition at line 62 of file univalue_get.cpp.
| Int UniValue::getInt | ( | ) | const |
Definition at line 140 of file univalue.h.
| const std::vector< std::string > & UniValue::getKeys | ( | ) | const |
Definition at line 43 of file univalue_get.cpp.
| void UniValue::getObjMap | ( | std::map< std::string, UniValue > & | kv | ) | const |
|
inline |
|
inline |
| const std::vector< UniValue > & UniValue::getValues | ( | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| const UniValue & UniValue::operator[] | ( | const std::string & | key | ) | const |
| const UniValue & UniValue::operator[] | ( | size_t | index | ) | const |
| void UniValue::push_back | ( | UniValue | val | ) |
| void UniValue::push_backV | ( | const std::vector< UniValue > & | vec | ) |
Definition at line 110 of file univalue.cpp.
| void UniValue::push_backV | ( | It | first, |
| It | last ) |
| void UniValue::pushKV | ( | std::string | key, |
| UniValue | val ) |
| void UniValue::pushKVEnd | ( | std::string | key, |
| UniValue | val ) |
Definition at line 117 of file univalue.cpp.
| void UniValue::pushKVs | ( | UniValue | obj | ) |
Definition at line 136 of file univalue.cpp.
| bool UniValue::read | ( | std::string_view | raw | ) |
Definition at line 262 of file univalue_read.cpp.
| void UniValue::reserve | ( | size_t | new_cap | ) |
| void UniValue::setArray | ( | ) |
Definition at line 91 of file univalue.cpp.
| void UniValue::setBool | ( | bool | val | ) |
Definition at line 30 of file univalue.cpp.
| void UniValue::setFloat | ( | double | val | ) |
Definition at line 75 of file univalue.cpp.
|
inline |
Definition at line 61 of file univalue.h.
| void UniValue::setInt | ( | int64_t | val | ) |
| void UniValue::setInt | ( | uint64_t | val | ) |
Definition at line 57 of file univalue.cpp.
| void UniValue::setNull | ( | ) |
Definition at line 25 of file univalue.cpp.
| void UniValue::setNumStr | ( | std::string | str | ) |
Definition at line 46 of file univalue.cpp.
| void UniValue::setObject | ( | ) |
Definition at line 97 of file univalue.cpp.
| void UniValue::setStr | ( | std::string | str | ) |
Definition at line 84 of file univalue.cpp.
|
inline |
|
inline |
Definition at line 128 of file univalue.h.
| std::string UniValue::write | ( | unsigned int | prettyIndent = 0, |
| unsigned int | indentLevel = 0 ) const |
Definition at line 30 of file univalue_write.cpp.
|
private |
Definition at line 70 of file univalue_write.cpp.
|
private |
Definition at line 93 of file univalue_write.cpp.
|
private |
Definition at line 107 of file univalue.h.
|
private |
Definition at line 105 of file univalue.h.
|
private |
Definition at line 106 of file univalue.h.
|
private |
Definition at line 108 of file univalue.h.