xgboost

Public Types | Public Member Functions | Friends | List of all members
xgboost::Value Class Referenceabstract

`#include <json.h>`

Inheritance diagram for xgboost::Value:
Collaboration diagram for xgboost::Value:

## Public Types
enum | ValueKind { ValueKind::kString, ValueKind::kNumber, ValueKind::kInteger, ValueKind::kObject, ValueKind::kArray, ValueKind::kBoolean, ValueKind::kNull }
| Simplified implementation of LLVM RTTI. More...

## Public Member Functions
| Value (ValueKind _kind)
ValueKind | Type () const
virtual | ~Value ()=default
virtual void | Save (JsonWriter *writer)=0
virtual Json & | operator[] (std::string const &key)=0
virtual Json & | operator[] (int ind)=0
virtual bool | operator== (Value const &rhs) const =0
virtual Value & | operator= (Value const &rhs)=0
std::string | TypeStr () const

## Friends
IntrusivePtrCell & | IntrusivePtrRefCount (xgboost::Value const *t) noexcept

## Member Enumeration Documentation

## ◆ ValueKind

enum xgboost::Value::ValueKind
| strong

Simplified implementation of LLVM RTTI.

Enumerator
kString |
kNumber |
kInteger |
kObject |
kArray |
kBoolean |
kNull |

## Constructor & Destructor Documentation

## ◆ Value()

xgboost::Value::Value | ( | ValueKind | _kind | ) |
| inline explicit

## ◆ ~Value()

virtual xgboost::Value::~Value | ( |  | ) |
| virtual default

## Member Function Documentation

## ◆ operator=()

virtual Value& xgboost::Value::operator= | ( | Value const & | rhs | ) |
| pure virtual

Implemented in xgboost::JsonBoolean, xgboost::JsonNull, xgboost::JsonInteger, xgboost::JsonNumber, xgboost::JsonObject, xgboost::JsonArray, and xgboost::JsonString.

## ◆ operator==()

virtual bool xgboost::Value::operator== | ( | Value const & | rhs | ) | const
| pure virtual

Implemented in xgboost::JsonBoolean, xgboost::JsonNull, xgboost::JsonInteger, xgboost::JsonNumber, xgboost::JsonObject, xgboost::JsonArray, and xgboost::JsonString.

## ◆ operator[]() [1/2]

virtual Json& xgboost::Value::operator[] | ( | int | ind | ) |
| pure virtual

Implemented in xgboost::JsonBoolean, xgboost::JsonNull, xgboost::JsonInteger, xgboost::JsonNumber, xgboost::JsonObject, xgboost::JsonArray, and xgboost::JsonString.

## ◆ operator[]() [2/2]

virtual Json& xgboost::Value::operator[] | ( | std::string const & | key | ) |
| pure virtual

Implemented in xgboost::JsonBoolean, xgboost::JsonNull, xgboost::JsonInteger, xgboost::JsonNumber, xgboost::JsonObject, xgboost::JsonArray, and xgboost::JsonString.

## ◆ Save()

virtual void xgboost::Value::Save | ( | JsonWriter * | writer | ) |
| pure virtual

Implemented in xgboost::JsonBoolean, xgboost::JsonNull, xgboost::JsonInteger, xgboost::JsonNumber, xgboost::JsonObject, xgboost::JsonArray, and xgboost::JsonString.

## ◆ Type()

ValueKind xgboost::Value::Type | ( |  | ) | const
| inline

## ◆ TypeStr()

std::string xgboost::Value::TypeStr | ( |  | ) | const

## Friends And Related Function Documentation

## ◆ IntrusivePtrRefCount

IntrusivePtrCell& IntrusivePtrRefCount | ( | xgboost::Value const * | t | ) |
| friend

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

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