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

#include <json.h>

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

Public Types

enum class  ValueKind : std::int64_t {
  kString = 0 , kNumber = 1 , kInteger = 2 , kObject = 3 ,
  kArray = 4 , kBoolean = 5 , kNull = 6 , kF32Array = 7 ,
  kF64Array = 8 , kI8Array = 9 , kU8Array = 10 , kI16Array = 11 ,
  kU16Array = 12 , kI32Array = 13 , kU32Array = 14 , kI64Array = 15 ,
  kU64Array = 16
}
 Simplified implementation of LLVM RTTI. More...
 

Public Member Functions

 Value (ValueKind _kind)
 
ValueKind Type () const
 
virtual ~Value ()=default
 
virtual void Save (JsonWriter *writer) const =0
 
virtual Jsonoperator[] (std::string const &key)
 
virtual Jsonoperator[] (int ind)
 
virtual bool operator== (Value const &rhs) const =0
 
virtual Valueoperator= (Value const &rhs)=delete
 
std::string TypeStr () const
 

Friends

IntrusivePtrCellIntrusivePtrRefCount (xgboost::Value const *t) noexcept
 

Member Enumeration Documentation

◆ ValueKind

enum xgboost::Value::ValueKind : std::int64_t
strong

Simplified implementation of LLVM RTTI.

Enumerator
kString 
kNumber 
kInteger 
kObject 
kArray 
kBoolean 
kNull 
kF32Array 
kF64Array 
kI8Array 
kU8Array 
kI16Array 
kU16Array 
kI32Array 
kU32Array 
kI64Array 
kU64Array 

Constructor & Destructor Documentation

◆ Value()

xgboost::Value::Value ( ValueKind  _kind)
inlineexplicit

◆ ~Value()

virtual xgboost::Value::~Value ( )
virtualdefault

Member Function Documentation

◆ operator=()

virtual Value& xgboost::Value::operator= ( Value const &  rhs)
virtualdelete

◆ operator==()

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

◆ operator[]() [1/2]

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

Reimplemented in xgboost::JsonObject, and xgboost::JsonArray.

◆ operator[]() [2/2]

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

Reimplemented in xgboost::JsonObject, and xgboost::JsonArray.

◆ Save()

virtual void xgboost::Value::Save ( JsonWriter writer) const
pure virtual

◆ 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: