xgboost

Public Types | Public Member Functions | Static Public Member Functions | List of all members
xgboost::JsonTypedArray< T, kind > Class Template Reference

Typed array for Universal Binary JSON. More...

`#include <json.h>`

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

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

## Public Member Functions
| JsonTypedArray ()
| 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 | ~Value ()=default
virtual Json & | operator[] (std::string const &key)
virtual Json & | operator[] (int ind)
virtual Value & | operator= (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

  T | The underlying primitive type.
  kind | Value kind defined by JSON type.

## Member Typedef Documentation

## ◆ Type

template<typename T , Value::ValueKind kind>

using xgboost::JsonTypedArray< T, kind >::Type = T

## Constructor & Destructor Documentation

## ◆ 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 | ( | size_t | n | ) |
| inline explicit

## ◆ JsonTypedArray() [3/3]

template<typename T , Value::ValueKind kind>

xgboost::JsonTypedArray< T, kind >::JsonTypedArray | ( | JsonTypedArray< T, kind > && | that | ) |
| inline noexcept

## Member Function Documentation

## ◆ 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 | ) |
| inline static

## ◆ operator==()

template<typename T , Value::ValueKind kind>

bool xgboost::JsonTypedArray< T, kind >::operator== | ( | Value const & | rhs | ) | const
| override virtual

Implements xgboost::Value.

## ◆ Save()

template<typename T , Value::ValueKind kind>

void xgboost::JsonTypedArray< T, kind >::Save | ( | JsonWriter * | writer | ) | const
| override virtual

Implements xgboost::Value.

## ◆ Set()

template<typename T , Value::ValueKind kind>

void xgboost::JsonTypedArray< T, kind >::Set | ( | size_t | i,
|  | T | v
| ) |  |
| inline

## ◆ Size()

template<typename T , Value::ValueKind kind>

size_t xgboost::JsonTypedArray< T, kind >::Size | ( |  | ) | const
| inline

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

- /home/runner/work/xgboost/xgboost/include/xgboost/json.h