Treelite
Public Member Functions | Static Public Member Functions | List of all members
DelegatedHandler Class Reference

handler which delegates JSON parsing to stack of delegates More...

#include <xgboost_json.h>

Inheritance diagram for DelegatedHandler:
Inheritance graph
[legend]
Collaboration diagram for DelegatedHandler:
Collaboration graph
[legend]

Public Member Functions

void push_delegate (std::shared_ptr< BaseHandler > new_delegate) override
 push new handler onto stack, delegating ongoing parsing to it More...
 
void pop_delegate () override
 pop handler off of stack, returning parsing responsibility to previous handler on stack
 
std::unique_ptr< treelite::Modelget_result ()
 
bool Null ()
 
bool Bool (bool b)
 
bool Int (int i)
 
bool Uint (unsigned u)
 
bool Int64 (int64_t i)
 
bool Uint64 (uint64_t u)
 
bool Double (double d)
 
bool String (const char *str, std::size_t length, bool copy)
 
bool StartObject ()
 
bool Key (const char *str, std::size_t length, bool copy)
 
bool EndObject (std::size_t memberCount)
 
bool StartArray ()
 
bool EndArray (std::size_t elementCount)
 

Static Public Member Functions

static std::shared_ptr< DelegatedHandlercreate_empty ()
 create DelegatedHandler with empty stack
 
static std::shared_ptr< DelegatedHandlercreate ()
 create DelegatedHandler with initial RootHandler on stack
 

Detailed Description

handler which delegates JSON parsing to stack of delegates

Definition at line 349 of file xgboost_json.h.

Member Function Documentation

◆ push_delegate()

void push_delegate ( std::shared_ptr< BaseHandler new_delegate)
inlineoverridevirtual

push new handler onto stack, delegating ongoing parsing to it

Parameters
new_delegatethe delegate to push onto stack

Implements Delegator.

Definition at line 373 of file xgboost_json.h.


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