xrpld
Loading...
Searching...
No Matches
xrpl::JsonPropertyStream Class Reference

A PropertyStream::Sink which produces a json::Value of type ValueType::Object. More...

#include <JsonPropertyStream.h>

Inheritance diagram for xrpl::JsonPropertyStream:
Collaboration diagram for xrpl::JsonPropertyStream:

Public Member Functions

 JsonPropertyStream ()
json::Value const & top () const

Public Attributes

json::Value topValue
std::vector< json::Value * > stack

Protected Member Functions

void mapBegin () override
void mapBegin (std::string const &key) override
void mapEnd () override
void add (std::string const &key, short value) override
void add (std::string const &key, unsigned short value) override
void add (std::string const &key, int value) override
void add (std::string const &key, unsigned int value) override
void add (std::string const &key, long value) override
void add (std::string const &key, float v) override
void add (std::string const &key, double v) override
void add (std::string const &key, std::string const &v) override
void arrayBegin () override
void arrayBegin (std::string const &key) override
void arrayEnd () override
void add (short value) override
void add (unsigned short value) override
void add (int value) override
void add (unsigned int value) override
void add (long value) override
void add (float v) override
void add (double v) override
void add (std::string const &v) override
void add (std::string const &key, char const *value)
virtual void add (std::string const &key, bool value)
virtual void add (std::string const &key, char value)
virtual void add (std::string const &key, signed char value)
virtual void add (std::string const &key, unsigned char value)
virtual void add (std::string const &key, unsigned long value)
virtual void add (std::string const &key, long long value)
virtual void add (std::string const &key, unsigned long long value)
virtual void add (std::string const &key, long double value)
void add (char const *value)
virtual void add (bool value)
virtual void add (char value)
virtual void add (signed char value)
virtual void add (unsigned char value)
virtual void add (unsigned long value)
virtual void add (long long value)
virtual void add (unsigned long long value)
virtual void add (long double value)
template<typename Value>
void lexicalAdd (std::string const &key, Value value)
template<typename Value>
void lexicalAdd (Value value)

Detailed Description

A PropertyStream::Sink which produces a json::Value of type ValueType::Object.

Definition at line 9 of file JsonPropertyStream.h.

Constructor & Destructor Documentation

◆ JsonPropertyStream()

xrpl::JsonPropertyStream::JsonPropertyStream ( )

Definition at line 9 of file JsonPropertyStream.cpp.

Member Function Documentation

◆ top()

json::Value const & xrpl::JsonPropertyStream::top ( ) const
nodiscard

Definition at line 16 of file JsonPropertyStream.cpp.

◆ mapBegin() [1/2]

void xrpl::JsonPropertyStream::mapBegin ( )
overrideprotectedvirtual

Implements beast::PropertyStream.

Definition at line 22 of file JsonPropertyStream.cpp.

◆ mapBegin() [2/2]

void xrpl::JsonPropertyStream::mapBegin ( std::string const & key)
overrideprotectedvirtual

Implements beast::PropertyStream.

Definition at line 31 of file JsonPropertyStream.cpp.

◆ mapEnd()

void xrpl::JsonPropertyStream::mapEnd ( )
overrideprotectedvirtual

Implements beast::PropertyStream.

Definition at line 40 of file JsonPropertyStream.cpp.

◆ add() [1/34]

void xrpl::JsonPropertyStream::add ( std::string const & key,
short value )
overrideprotectedvirtual

Reimplemented from beast::PropertyStream.

Definition at line 46 of file JsonPropertyStream.cpp.

◆ add() [2/34]

void xrpl::JsonPropertyStream::add ( std::string const & key,
unsigned short value )
overrideprotectedvirtual

Reimplemented from beast::PropertyStream.

Definition at line 52 of file JsonPropertyStream.cpp.

◆ add() [3/34]

void xrpl::JsonPropertyStream::add ( std::string const & key,
int value )
overrideprotectedvirtual

Reimplemented from beast::PropertyStream.

Definition at line 58 of file JsonPropertyStream.cpp.

◆ add() [4/34]

void xrpl::JsonPropertyStream::add ( std::string const & key,
unsigned int value )
overrideprotectedvirtual

Reimplemented from beast::PropertyStream.

Definition at line 64 of file JsonPropertyStream.cpp.

◆ add() [5/34]

void xrpl::JsonPropertyStream::add ( std::string const & key,
long value )
overrideprotectedvirtual

Reimplemented from beast::PropertyStream.

Definition at line 70 of file JsonPropertyStream.cpp.

◆ add() [6/34]

void xrpl::JsonPropertyStream::add ( std::string const & key,
float v )
overrideprotectedvirtual

Reimplemented from beast::PropertyStream.

Definition at line 76 of file JsonPropertyStream.cpp.

◆ add() [7/34]

void xrpl::JsonPropertyStream::add ( std::string const & key,
double v )
overrideprotectedvirtual

Reimplemented from beast::PropertyStream.

Definition at line 82 of file JsonPropertyStream.cpp.

◆ add() [8/34]

void xrpl::JsonPropertyStream::add ( std::string const & key,
std::string const & v )
overrideprotectedvirtual

Implements beast::PropertyStream.

Definition at line 88 of file JsonPropertyStream.cpp.

◆ arrayBegin() [1/2]

void xrpl::JsonPropertyStream::arrayBegin ( )
overrideprotectedvirtual

Implements beast::PropertyStream.

Definition at line 94 of file JsonPropertyStream.cpp.

◆ arrayBegin() [2/2]

void xrpl::JsonPropertyStream::arrayBegin ( std::string const & key)
overrideprotectedvirtual

Implements beast::PropertyStream.

Definition at line 103 of file JsonPropertyStream.cpp.

◆ arrayEnd()

void xrpl::JsonPropertyStream::arrayEnd ( )
overrideprotectedvirtual

Implements beast::PropertyStream.

Definition at line 112 of file JsonPropertyStream.cpp.

◆ add() [9/34]

void xrpl::JsonPropertyStream::add ( short value)
overrideprotectedvirtual

Reimplemented from beast::PropertyStream.

Definition at line 118 of file JsonPropertyStream.cpp.

◆ add() [10/34]

void xrpl::JsonPropertyStream::add ( unsigned short value)
overrideprotectedvirtual

Reimplemented from beast::PropertyStream.

Definition at line 124 of file JsonPropertyStream.cpp.

◆ add() [11/34]

void xrpl::JsonPropertyStream::add ( int value)
overrideprotectedvirtual

Reimplemented from beast::PropertyStream.

Definition at line 130 of file JsonPropertyStream.cpp.

◆ add() [12/34]

void xrpl::JsonPropertyStream::add ( unsigned int value)
overrideprotectedvirtual

Reimplemented from beast::PropertyStream.

Definition at line 136 of file JsonPropertyStream.cpp.

◆ add() [13/34]

void xrpl::JsonPropertyStream::add ( long value)
overrideprotectedvirtual

Reimplemented from beast::PropertyStream.

Definition at line 142 of file JsonPropertyStream.cpp.

◆ add() [14/34]

void xrpl::JsonPropertyStream::add ( float v)
overrideprotectedvirtual

Reimplemented from beast::PropertyStream.

Definition at line 148 of file JsonPropertyStream.cpp.

◆ add() [15/34]

void xrpl::JsonPropertyStream::add ( double v)
overrideprotectedvirtual

Reimplemented from beast::PropertyStream.

Definition at line 154 of file JsonPropertyStream.cpp.

◆ add() [16/34]

void xrpl::JsonPropertyStream::add ( std::string const & v)
overrideprotectedvirtual

Implements beast::PropertyStream.

Definition at line 160 of file JsonPropertyStream.cpp.

◆ add() [17/34]

void beast::PropertyStream::add ( std::string const & key,
char const * value )
protectedinherited

Definition at line 36 of file PropertyStream.h.

◆ add() [18/34]

void beast::PropertyStream::add ( std::string const & key,
bool value )
protectedvirtualinherited

Definition at line 375 of file beast_PropertyStream.cpp.

◆ add() [19/34]

void beast::PropertyStream::add ( std::string const & key,
char value )
protectedvirtualinherited

Definition at line 388 of file beast_PropertyStream.cpp.

◆ add() [20/34]

void beast::PropertyStream::add ( std::string const & key,
signed char value )
protectedvirtualinherited

Definition at line 394 of file beast_PropertyStream.cpp.

◆ add() [21/34]

void beast::PropertyStream::add ( std::string const & key,
unsigned char value )
protectedvirtualinherited

Definition at line 400 of file beast_PropertyStream.cpp.

◆ add() [22/34]

void beast::PropertyStream::add ( std::string const & key,
unsigned long value )
protectedvirtualinherited

Definition at line 436 of file beast_PropertyStream.cpp.

◆ add() [23/34]

void beast::PropertyStream::add ( std::string const & key,
long long value )
protectedvirtualinherited

Definition at line 442 of file beast_PropertyStream.cpp.

◆ add() [24/34]

void beast::PropertyStream::add ( std::string const & key,
unsigned long long value )
protectedvirtualinherited

Definition at line 448 of file beast_PropertyStream.cpp.

◆ add() [25/34]

void beast::PropertyStream::add ( std::string const & key,
long double value )
protectedvirtualinherited

Definition at line 466 of file beast_PropertyStream.cpp.

◆ add() [26/34]

void beast::PropertyStream::add ( char const * value)
protectedinherited

Definition at line 92 of file PropertyStream.h.

◆ add() [27/34]

void beast::PropertyStream::add ( bool value)
protectedvirtualinherited

Definition at line 472 of file beast_PropertyStream.cpp.

◆ add() [28/34]

void beast::PropertyStream::add ( char value)
protectedvirtualinherited

Definition at line 485 of file beast_PropertyStream.cpp.

◆ add() [29/34]

void beast::PropertyStream::add ( signed char value)
protectedvirtualinherited

Definition at line 491 of file beast_PropertyStream.cpp.

◆ add() [30/34]

void beast::PropertyStream::add ( unsigned char value)
protectedvirtualinherited

Definition at line 497 of file beast_PropertyStream.cpp.

◆ add() [31/34]

void beast::PropertyStream::add ( unsigned long value)
protectedvirtualinherited

Definition at line 533 of file beast_PropertyStream.cpp.

◆ add() [32/34]

void beast::PropertyStream::add ( long long value)
protectedvirtualinherited

Definition at line 539 of file beast_PropertyStream.cpp.

◆ add() [33/34]

void beast::PropertyStream::add ( unsigned long long value)
protectedvirtualinherited

Definition at line 545 of file beast_PropertyStream.cpp.

◆ add() [34/34]

void beast::PropertyStream::add ( long double value)
protectedvirtualinherited

Definition at line 563 of file beast_PropertyStream.cpp.

◆ lexicalAdd() [1/2]

template<typename Value>
void beast::PropertyStream::lexicalAdd ( std::string const & key,
Value value )
protectedinherited

Definition at line 43 of file PropertyStream.h.

◆ lexicalAdd() [2/2]

template<typename Value>
void beast::PropertyStream::lexicalAdd ( Value value)
protectedinherited

Definition at line 99 of file PropertyStream.h.

Member Data Documentation

◆ topValue

json::Value xrpl::JsonPropertyStream::topValue

Definition at line 12 of file JsonPropertyStream.h.

◆ stack

std::vector<json::Value*> xrpl::JsonPropertyStream::stack

Definition at line 13 of file JsonPropertyStream.h.