载入中...
搜索中...
未找到
eve::json::Value类 参考

#include <Json.h>

Public 成员函数

 Value ()=default
 
 operator bool () const
 
bool isNull () const
 
bool isBool () const
 
bool isNumber () const
 
bool isString () const
 
bool isObject () const
 
bool isArray () const
 
bool has (const char *key) const
 
Value get (const char *key) const
 
std::vector< std::string > keys () const
 
size_t size () const
 
Value at (size_t index) const
 
bool asBool (bool fallback=false) const
 
int asInt (int fallback=0) const
 
float asFloat (float fallback=0.f) const
 
double asDouble (double fallback=0.0) const
 
std::string asString (const std::string &fallback={}) const
 
bool getBool (const char *key, bool fallback=false) const
 
int getInt (const char *key, int fallback=0) const
 
float getFloat (const char *key, float fallback=0.f) const
 
double getDouble (const char *key, double fallback=0.0) const
 
std::string getString (const char *key, const std::string &fallback={}) const
 
std::vector< std::string > getStringArray (const char *key) const
 
std::vector< int > getIntArray (const char *key) const
 
std::vector< float > getFloatArray (const char *key) const
 
std::unordered_map< std::string, std::string > getStringMap (const char *key) const
 
std::unordered_map< std::string, int > getIntMap (const char *key) const
 
std::vector< std::string > toStringArray () const
 

友元

class Document
 

详细描述

Handle to one node of a parsed Document. Cheap to copy, but only valid while the owning Document is alive.

在文件 Json.h32 行定义.

构造及析构函数说明

◆ Value()

eve::json::Value::Value ( )
default

被这些函数引用 at() , 以及 get().

成员函数说明

◆ asBool()

bool eve::json::Value::asBool ( bool  fallback = false) const

◆ asDouble()

double eve::json::Value::asDouble ( double  fallback = 0.0) const

◆ asFloat()

float eve::json::Value::asFloat ( float  fallback = 0.f) const

在文件 Json.cpp370 行定义.

引用了 asDouble().

被这些函数引用 getFloat() , 以及 getFloatArray().

◆ asInt()

int eve::json::Value::asInt ( int  fallback = 0) const

在文件 Json.cpp355 行定义.

引用了 asDouble(), d, eve::json::Node::integral, eve::json::Node::intVal, eve::json::Node::kind , 以及 eve::json::Node::Number.

被这些函数引用 getInt() , 以及 getIntArray().

◆ asString()

std::string eve::json::Value::asString ( const std::string &  fallback = {}) const

◆ at()

Value eve::json::Value::at ( size_t  index) const

◆ get()

Value eve::json::Value::get ( const char *  key) const

Member value, or a null Value when absent / not an object.

在文件 Json.cpp301 行定义.

引用了 eve::json::Node::kind, m, eve::json::Node::members, eve::json::Node::Object , 以及 Value().

被这些函数引用 getBool(), getDouble(), getFloat(), getFloatArray(), getInt(), getIntArray(), getIntMap(), getString(), getStringArray(), getStringMap() , 以及 has().

◆ getBool()

bool eve::json::Value::getBool ( const char *  key,
bool  fallback = false 
) const

在文件 Json.cpp384 行定义.

引用了 asBool() , 以及 get().

◆ getDouble()

double eve::json::Value::getDouble ( const char *  key,
double  fallback = 0.0 
) const

在文件 Json.cpp387 行定义.

引用了 asDouble() , 以及 get().

◆ getFloat()

float eve::json::Value::getFloat ( const char *  key,
float  fallback = 0.f 
) const

在文件 Json.cpp386 行定义.

引用了 asFloat() , 以及 get().

◆ getFloatArray()

std::vector< float > eve::json::Value::getFloatArray ( const char *  key) const

在文件 Json.cpp415 行定义.

引用了 asFloat(), at(), get(), isArray(), n , 以及 size().

◆ getInt()

int eve::json::Value::getInt ( const char *  key,
int  fallback = 0 
) const

在文件 Json.cpp385 行定义.

引用了 asInt() , 以及 get().

被这些函数引用 getIntMap().

◆ getIntArray()

std::vector< int > eve::json::Value::getIntArray ( const char *  key) const

在文件 Json.cpp406 行定义.

引用了 asInt(), at(), get(), isArray(), n , 以及 size().

◆ getIntMap()

std::unordered_map< std::string, int > eve::json::Value::getIntMap ( const char *  key) const

在文件 Json.cpp432 行定义.

引用了 get(), getInt(), isObject(), keys() , 以及 name.

◆ getString()

std::string eve::json::Value::getString ( const char *  key,
const std::string &  fallback = {} 
) const

在文件 Json.cpp390 行定义.

引用了 asString() , 以及 get().

被这些函数引用 getStringMap().

◆ getStringArray()

std::vector< std::string > eve::json::Value::getStringArray ( const char *  key) const

在文件 Json.cpp402 行定义.

引用了 get() , 以及 toStringArray().

◆ getStringMap()

std::unordered_map< std::string, std::string > eve::json::Value::getStringMap ( const char *  key) const

在文件 Json.cpp424 行定义.

引用了 get(), getString(), isObject(), keys() , 以及 name.

◆ has()

bool eve::json::Value::has ( const char *  key) const

在文件 Json.cpp299 行定义.

引用了 get().

◆ isArray()

◆ isBool()

bool eve::json::Value::isBool ( ) const

在文件 Json.cpp293 行定义.

引用了 eve::json::Node::Bool , 以及 eve::json::Node::kind.

◆ isNull()

bool eve::json::Value::isNull ( ) const

在文件 Json.cpp292 行定义.

引用了 eve::json::Node::kind , 以及 eve::json::Node::Null.

◆ isNumber()

bool eve::json::Value::isNumber ( ) const

在文件 Json.cpp294 行定义.

引用了 eve::json::Node::kind , 以及 eve::json::Node::Number.

◆ isObject()

◆ isString()

bool eve::json::Value::isString ( ) const

在文件 Json.cpp295 行定义.

引用了 eve::json::Node::kind , 以及 eve::json::Node::String.

◆ keys()

std::vector< std::string > eve::json::Value::keys ( ) const

Member names in document order; empty when not an object.

在文件 Json.cpp308 行定义.

引用了 eve::json::Node::kind, m, eve::json::Node::members , 以及 eve::json::Node::Object.

被这些函数引用 getIntMap() , 以及 getStringMap().

◆ operator bool()

eve::json::Value::operator bool ( ) const
inlineexplicit

True when this handle refers to an actual node.

在文件 Json.h37 行定义.

◆ size()

◆ toStringArray()

std::vector< std::string > eve::json::Value::toStringArray ( ) const

This node read as an array of strings (for a Value already in hand).

在文件 Json.cpp394 行定义.

引用了 eve::json::Node::Array, asString(), eve::json::Node::elements , 以及 eve::json::Node::kind.

被这些函数引用 getStringArray().

友元及相关函数文档

◆ Document

friend class Document
friend

在文件 Json.h88 行定义.


该类的文档由以下文件生成: