xrpld
Toggle main menu visibility
Loading...
Searching...
No Matches
include
xrpl
json
JsonPropertyStream.h
1
#pragma once
2
3
#include <xrpl/beast/utility/PropertyStream.h>
4
#include <xrpl/json/json_value.h>
5
6
#include <
string
>
7
#include <
vector
>
8
9
namespace
xrpl
{
10
14
class
JsonPropertyStream
:
public
beast::PropertyStream
15
{
16
public
:
17
json::Value
topValue
;
// TODO: rename: clashes with top() method
18
std::vector<json::Value*>
stack
;
19
20
public
:
21
JsonPropertyStream
();
22
[[nodiscard]]
json::Value
const
&
23
top
()
const
;
24
25
protected
:
26
void
27
mapBegin
()
override
;
28
void
29
mapBegin
(
std::string
const
& key)
override
;
30
void
31
mapEnd
()
override
;
32
void
33
add
(
std::string
const
& key,
short
value)
override
;
34
void
35
add
(
std::string
const
& key,
unsigned
short
value)
override
;
36
void
37
add
(
std::string
const
& key,
int
value)
override
;
38
void
39
add
(
std::string
const
& key,
unsigned
int
value)
override
;
40
void
41
add
(
std::string
const
& key,
long
value)
override
;
42
void
43
add
(
std::string
const
& key,
float
v)
override
;
44
void
45
add
(
std::string
const
& key,
double
v)
override
;
46
void
47
add
(
std::string
const
& key,
std::string
const
& v)
override
;
48
void
49
arrayBegin
()
override
;
50
void
51
arrayBegin
(
std::string
const
& key)
override
;
52
void
53
arrayEnd
()
override
;
54
55
void
56
add
(
short
value)
override
;
57
void
58
add
(
unsigned
short
value)
override
;
59
void
60
add
(
int
value)
override
;
61
void
62
add
(
unsigned
int
value)
override
;
63
void
64
add
(
long
value)
override
;
65
void
66
add
(
float
v)
override
;
67
void
68
add
(
double
v)
override
;
69
void
70
add
(
std::string
const
& v)
override
;
71
};
72
73
}
// namespace xrpl
std::string
beast::PropertyStream
Abstract stream with RAII containers that produce a property tree.
Definition
PropertyStream.h:19
json::Value
Represents a JSON value.
Definition
json_value.h:117
xrpl::JsonPropertyStream::JsonPropertyStream
JsonPropertyStream()
Definition
JsonPropertyStream.cpp:9
xrpl::JsonPropertyStream::top
json::Value const & top() const
Definition
JsonPropertyStream.cpp:16
xrpl::JsonPropertyStream::add
void add(std::string const &key, short value) override
Definition
JsonPropertyStream.cpp:46
xrpl::JsonPropertyStream::arrayEnd
void arrayEnd() override
Definition
JsonPropertyStream.cpp:112
xrpl::JsonPropertyStream::topValue
json::Value topValue
Definition
JsonPropertyStream.h:17
xrpl::JsonPropertyStream::mapBegin
void mapBegin() override
Definition
JsonPropertyStream.cpp:22
xrpl::JsonPropertyStream::stack
std::vector< json::Value * > stack
Definition
JsonPropertyStream.h:18
xrpl::JsonPropertyStream::arrayBegin
void arrayBegin() override
Definition
JsonPropertyStream.cpp:94
xrpl::JsonPropertyStream::mapEnd
void mapEnd() override
Definition
JsonPropertyStream.cpp:40
xrpl
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition
algorithm.h:5
string
vector
Generated by
1.17.0