NIM 跨平台 C++ SDK
载入中...
搜索中...
未找到
nim_cpp_wrapper_util::Json::ValueIteratorBase类 参考

base class for Value iterators. 更多...

#include <value.h>

类 nim_cpp_wrapper_util::Json::ValueIteratorBase 继承关系图:
nim_cpp_wrapper_util::Json::ValueConstIterator nim_cpp_wrapper_util::Json::ValueIterator

Public 类型

using iterator_category = std::bidirectional_iterator_tag
 
using size_t = unsigned int
 
using difference_type = int
 
using SelfType = ValueIteratorBase
 

Public 成员函数

bool operator== (const SelfType &other) const
 
bool operator!= (const SelfType &other) const
 
difference_type operator- (const SelfType &other) const
 
Value key () const
 
UInt index () const
 
String name () const
 
char const * memberName () const
 
char const * memberName (char const **end) const
 
 ValueIteratorBase ()
 
 ValueIteratorBase (const Value::ObjectValues::iterator &current)
 

Protected 成员函数

const Valuederef () const
 
Valuederef ()
 
void increment ()
 
void decrement ()
 
difference_type computeDistance (const SelfType &other) const
 
bool isEqual (const SelfType &other) const
 
void copy (const SelfType &other)
 

Private 属性

Value::ObjectValues::iterator current_
 
bool isNull_ {true}
 

详细描述

base class for Value iterators.

成员类型定义说明

◆ difference_type

◆ iterator_category

◆ SelfType

◆ size_t

构造及析构函数说明

◆ ValueIteratorBase() [1/2]

nim_cpp_wrapper_util::Json::ValueIteratorBase::ValueIteratorBase ( )

◆ ValueIteratorBase() [2/2]

nim_cpp_wrapper_util::Json::ValueIteratorBase::ValueIteratorBase ( const Value::ObjectValues::iterator &  current)
explicit

成员函数说明

◆ computeDistance()

ValueIteratorBase::difference_type nim_cpp_wrapper_util::Json::ValueIteratorBase::computeDistance ( const SelfType other) const
protected

◆ copy()

void nim_cpp_wrapper_util::Json::ValueIteratorBase::copy ( const SelfType other)
protected

◆ decrement()

void nim_cpp_wrapper_util::Json::ValueIteratorBase::decrement ( )
protected

◆ deref() [1/2]

Value & nim_cpp_wrapper_util::Json::ValueIteratorBase::deref ( )
protected

◆ deref() [2/2]

const Value & nim_cpp_wrapper_util::Json::ValueIteratorBase::deref ( ) const
protected

Internal utility functions to assist with implementing other iterator functions. The const and non-const versions of the "deref" protected methods expose the protected current_ member variable in a way that can often be optimized away by the compiler.

◆ increment()

void nim_cpp_wrapper_util::Json::ValueIteratorBase::increment ( )
protected

◆ index()

UInt nim_cpp_wrapper_util::Json::ValueIteratorBase::index ( ) const

Return the index of the referenced Value, or -1 if it is not an arrayValue.

◆ isEqual()

bool nim_cpp_wrapper_util::Json::ValueIteratorBase::isEqual ( const SelfType other) const
protected

◆ key()

Value nim_cpp_wrapper_util::Json::ValueIteratorBase::key ( ) const

Return either the index or the member name of the referenced value as a Value.

◆ memberName() [1/2]

char const * nim_cpp_wrapper_util::Json::ValueIteratorBase::memberName ( ) const

Return the member name of the referenced Value. "" if it is not an objectValue.

弃用:
This cannot be used for UTF-8 strings, since there can be embedded nulls.

◆ memberName() [2/2]

char const * nim_cpp_wrapper_util::Json::ValueIteratorBase::memberName ( char const **  end) const

Return the member name of the referenced Value, or NULL if it is not an objectValue.

注解
Better version than memberName(). Allows embedded nulls.

◆ name()

String nim_cpp_wrapper_util::Json::ValueIteratorBase::name ( ) const

Return the member name of the referenced Value, or "" if it is not an objectValue.

注解
Avoid c_str() on result, as embedded zeroes are possible.

◆ operator!=()

bool nim_cpp_wrapper_util::Json::ValueIteratorBase::operator!= ( const SelfType other) const
inline

◆ operator-()

difference_type nim_cpp_wrapper_util::Json::ValueIteratorBase::operator- ( const SelfType other) const
inline

◆ operator==()

bool nim_cpp_wrapper_util::Json::ValueIteratorBase::operator== ( const SelfType other) const
inline

类成员变量说明

◆ current_

Value::ObjectValues::iterator nim_cpp_wrapper_util::Json::ValueIteratorBase::current_
private

◆ isNull_

bool nim_cpp_wrapper_util::Json::ValueIteratorBase::isNull_ {true}
private

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