CUBRID Engine  latest
JSON_SERIALIZER Class Reference
Inheritance diagram for JSON_SERIALIZER:
Inheritance graph
Collaboration diagram for JSON_SERIALIZER:
Collaboration graph

Public Member Functions

 JSON_SERIALIZER (OR_BUF &buffer)
 
 ~JSON_SERIALIZER () override=default
 
bool Null () override
 
bool Bool (bool b) override
 
bool Int (int i) override
 
bool Uint (unsigned i) override
 
bool Int64 (std::int64_t i) override
 
bool Uint64 (std::uint64_t i) override
 
bool Double (double d) override
 
bool String (const Ch *str, SizeType length, bool copy) override
 
bool StartObject () override
 
bool Key (const Ch *str, SizeType length, bool copy) override
 
bool StartArray () override
 
bool EndObject (SizeType memberCount) override
 
bool EndArray (SizeType elementCount) override
 
- Public Member Functions inherited from JSON_BASE_HANDLER
 JSON_BASE_HANDLER ()=default
 
virtual ~JSON_BASE_HANDLER ()=default
 
virtual bool RawNumber (const Ch *str, SizeType length, bool copy)
 

Private Member Functions

bool SaveSizePointers (char *ptr)
 
void SetSizePointers (SizeType size)
 
bool PackType (const DB_JSON_TYPE &type)
 
bool PackString (const char *str)
 
bool HasError ()
 

Private Attributes

int m_error
 
OR_BUFm_buffer
 
std::stack< char * > m_size_pointers
 

Additional Inherited Members

- Public Types inherited from JSON_BASE_HANDLER
typedef JSON_DOC::Ch Ch
 
typedef unsigned SizeType
 

Detailed Description

Definition at line 514 of file db_json.cpp.

Constructor & Destructor Documentation

JSON_SERIALIZER::JSON_SERIALIZER ( OR_BUF buffer)
inlineexplicit

Definition at line 517 of file db_json.cpp.

References i.

JSON_SERIALIZER::~JSON_SERIALIZER ( )
overridedefault

Member Function Documentation

bool JSON_SERIALIZER::Bool ( bool  b)
overridevirtual

Reimplemented from JSON_BASE_HANDLER.

Definition at line 3493 of file db_json.cpp.

References or_put_int().

bool JSON_SERIALIZER::Double ( double  d)
overridevirtual

Reimplemented from JSON_BASE_HANDLER.

Definition at line 3605 of file db_json.cpp.

References or_put_double().

bool JSON_SERIALIZER::EndArray ( SizeType  elementCount)
overridevirtual

Reimplemented from JSON_BASE_HANDLER.

Definition at line 3706 of file db_json.cpp.

bool JSON_SERIALIZER::EndObject ( SizeType  memberCount)
overridevirtual

Reimplemented from JSON_BASE_HANDLER.

Definition at line 3692 of file db_json.cpp.

bool JSON_SERIALIZER::HasError ( )
inlineprivate

Definition at line 548 of file db_json.cpp.

References NO_ERROR.

bool JSON_SERIALIZER::Int ( int  i)
overridevirtual

Reimplemented from JSON_BASE_HANDLER.

Definition at line 3513 of file db_json.cpp.

References or_put_int().

bool JSON_SERIALIZER::Int64 ( std::int64_t  i)
overridevirtual

Reimplemented from JSON_BASE_HANDLER.

Definition at line 3559 of file db_json.cpp.

References or_put_bigint(), and or_put_int().

bool JSON_SERIALIZER::Key ( const Ch str,
SizeType  length,
bool  copy 
)
overridevirtual

Reimplemented from JSON_BASE_HANDLER.

Definition at line 3638 of file db_json.cpp.

bool JSON_SERIALIZER::Null ( )
overridevirtual

Reimplemented from JSON_BASE_HANDLER.

Definition at line 3479 of file db_json.cpp.

bool JSON_SERIALIZER::PackString ( const char *  str)
private

Definition at line 3465 of file db_json.cpp.

References or_put_string_aligned_with_length().

bool JSON_SERIALIZER::PackType ( const DB_JSON_TYPE &  type)
private

Definition at line 3458 of file db_json.cpp.

References or_put_int().

bool JSON_SERIALIZER::SaveSizePointers ( char *  ptr)
private

Definition at line 3434 of file db_json.cpp.

References or_put_int().

void JSON_SERIALIZER::SetSizePointers ( SizeType  size)
private

Definition at line 3446 of file db_json.cpp.

References assert, and or_pack_int().

bool JSON_SERIALIZER::StartArray ( )
overridevirtual

Reimplemented from JSON_BASE_HANDLER.

Definition at line 3673 of file db_json.cpp.

bool JSON_SERIALIZER::StartObject ( )
overridevirtual

Reimplemented from JSON_BASE_HANDLER.

Definition at line 3652 of file db_json.cpp.

bool JSON_SERIALIZER::String ( const Ch str,
SizeType  length,
bool  copy 
)
overridevirtual

Reimplemented from JSON_BASE_HANDLER.

Definition at line 3624 of file db_json.cpp.

bool JSON_SERIALIZER::Uint ( unsigned  i)
overridevirtual

Reimplemented from JSON_BASE_HANDLER.

Definition at line 3536 of file db_json.cpp.

References or_put_int().

bool JSON_SERIALIZER::Uint64 ( std::uint64_t  i)
overridevirtual

Reimplemented from JSON_BASE_HANDLER.

Definition at line 3582 of file db_json.cpp.

References or_put_bigint(), and or_put_int().

Member Data Documentation

OR_BUF* JSON_SERIALIZER::m_buffer
private

Definition at line 554 of file db_json.cpp.

int JSON_SERIALIZER::m_error
private

Definition at line 553 of file db_json.cpp.

std::stack<char *> JSON_SERIALIZER::m_size_pointers
private

Definition at line 555 of file db_json.cpp.


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