xgboost
公共类型 | 公共成员函数 | 公共静态成员函数 | 所有成员列表
xgboost::JsonTypedArray< T, kind > 类模板参考

用于 Universal Binary JSON 的类型化数组。 更多...

#include <json.h>

xgboost::JsonTypedArray< T, kind > 的继承图
Inheritance graph
xgboost::JsonTypedArray< T, kind > 的协作图
Collaboration graph

公共类型

using Type = T
 
- 继承自 xgboost::Value 的公共类型
enum class  ValueKind {
  kString , kNumber , kInteger , kObject ,
  kArray , kBoolean , kNull , kF32Array ,
  kF64Array , kI8Array , kU8Array , kI16Array ,
  kI32Array , kI64Array
}
 LLVM RTTI 的简化实现。 更多...
 

公共成员函数

 JsonTypedArray ()
 
 JsonTypedArray (std::size_t n)
 
 JsonTypedArray (JsonTypedArray &&that) noexcept
 
bool operator== (Value const &rhs) const override
 
Valueoperator= (Value const &rhs) override=delete
 
void Set (size_t i, T v)
 
size_t Size () const
 
void Save (JsonWriter *writer) const override
 
std::vector< T > const & GetArray () &&
 
std::vector< T > const & GetArray () const &
 
std::vector< T > & GetArray () &
 
- 继承自 xgboost::Value 的公共成员函数
 Value (ValueKind _kind)
 
ValueKind Type () const
 
virtual ~Value ()=default
 
virtual Jsonoperator[] (std::string const &key)
 
virtual Jsonoperator[] (int ind)
 
std::string TypeStr () const
 

公共静态成员函数

static bool IsClassOf (Value const *value)
 

详细描述

template<typename T, Value::ValueKind kind>
class xgboost::JsonTypedArray< T, kind >

用于 Universal Binary JSON 的类型化数组。

模板参数
T底层基本类型。
kind由 JSON 类型定义的 Value 类型。

成员类型定义文档

◆ Type

template<typename T , Value::ValueKind kind>
using xgboost::JsonTypedArray< T, kind >::Type = T

构造函数与析构函数文档

◆ JsonTypedArray() [1/3]

template<typename T , Value::ValueKind kind>
xgboost::JsonTypedArray< T, kind >::JsonTypedArray ( )
inline

◆ JsonTypedArray() [2/3]

template<typename T , Value::ValueKind kind>
xgboost::JsonTypedArray< T, kind >::JsonTypedArray ( std::size_t  n)
inlineexplicit

◆ JsonTypedArray() [3/3]

template<typename T , Value::ValueKind kind>
xgboost::JsonTypedArray< T, kind >::JsonTypedArray ( JsonTypedArray< T, kind > &&  that)
inlinenoexcept

成员函数文档

◆ GetArray() [1/3]

template<typename T , Value::ValueKind kind>
std::vector<T>& xgboost::JsonTypedArray< T, kind >::GetArray ( ) &
inline

◆ GetArray() [2/3]

template<typename T , Value::ValueKind kind>
std::vector<T> const& xgboost::JsonTypedArray< T, kind >::GetArray ( ) &&
inline

◆ GetArray() [3/3]

template<typename T , Value::ValueKind kind>
std::vector<T> const& xgboost::JsonTypedArray< T, kind >::GetArray ( ) const &
inline

◆ IsClassOf()

template<typename T , Value::ValueKind kind>
static bool xgboost::JsonTypedArray< T, kind >::IsClassOf ( Value const *  value)
inlinestatic

◆ operator=()

template<typename T , Value::ValueKind kind>
Value& xgboost::JsonTypedArray< T, kind >::operator= ( Value const &  rhs)
overridevirtualdelete

重写自 xgboost::Value

◆ operator==()

template<typename T , Value::ValueKind kind>
bool xgboost::JsonTypedArray< T, kind >::operator== ( Value const &  rhs) const
overridevirtual

实现自 xgboost::Value

◆ Save()

template<typename T , Value::ValueKind kind>
void xgboost::JsonTypedArray< T, kind >::Save ( JsonWriter writer) const
overridevirtual

实现自 xgboost::Value

◆ Set()

template<typename T , Value::ValueKind kind>
void xgboost::JsonTypedArray< T, kind >::Set ( size_t  i,
v 
)
inline

◆ Size()

template<typename T , Value::ValueKind kind>
size_t xgboost::JsonTypedArray< T, kind >::Size ( ) const
inline

本类的文档由以下文件生成