Medial Code Documentation
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions
xgboost::JsonTypedArray< T, kind > Class Template Reference

Typed array for Universal Binary JSON. More...

#include <json.h>

Inheritance diagram for xgboost::JsonTypedArray< T, kind >:
xgboost::Value

Public Types

using Type = T
 
- Public Types inherited from xgboost::Value
enum class  ValueKind {
  kString , kNumber , kInteger , kObject ,
  kArray , kBoolean , kNull , kNumberArray ,
  kU8Array , kI32Array , kI64Array
}
 Simplified implementation of LLVM RTTI.
 

Public Member Functions

 JsonTypedArray (size_t n)
 
 JsonTypedArray (JsonTypedArray &&that) noexcept
 
bool operator== (Value const &rhs) const override
 
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 () &
 
- Public Member Functions inherited from xgboost::Value
 Value (ValueKind _kind)
 
ValueKind Type () const
 
virtual Jsonoperator[] (std::string const &key)
 
virtual Jsonoperator[] (int ind)
 
virtual Valueoperator= (Value const &rhs)=delete
 
std::string TypeStr () const
 

Static Public Member Functions

static bool IsClassOf (Value const *value)
 

Detailed Description

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

Typed array for Universal Binary JSON.

Template Parameters
TThe underlying primitive type.
kindValue kind defined by JSON type.

Member Function Documentation

◆ operator==()

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

Implements xgboost::Value.

◆ Save()

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

Implements xgboost::Value.


The documentation for this class was generated from the following files: