20 #ifndef BEAST_UTILITY_PROPERTYSTREAM_H_INCLUDED
21 #define BEAST_UTILITY_PROPERTYSTREAM_H_INCLUDED
23 #include <ripple/beast/core/List.h>
58 template <
typename Value>
82 virtual void add (
std::string const& key,
unsigned long long value);
93 void add (
char const* value)
98 template <
typename Value>
106 virtual void add (
bool value);
107 virtual void add (
char value);
108 virtual void add (
signed char value);
109 virtual void add (
unsigned char value);
110 virtual void add (
wchar_t value);
112 virtual void add (char16_t value);
113 virtual void add (char32_t value);
115 virtual void add (
short value);
116 virtual void add (
unsigned short value);
117 virtual void add (
int value);
118 virtual void add (
unsigned int value);
119 virtual void add (
long value);
120 virtual void add (
unsigned long value);
121 virtual void add (
long long value);
122 virtual void add (
unsigned long long value);
123 virtual void add (
float value);
124 virtual void add (
double value);
125 virtual void add (
long double value);
167 template <
typename Value>
172 template <
typename T>
192 explicit Map (
Set& parent);
203 template <
typename Value>
209 template <
typename Key,
typename Value>
210 void add (Key key, Value value)
const
220 {
return Proxy (*
this, key); }
222 template <
typename Key>
233 template <
typename Value>
256 Set (
Set const&) =
delete;
257 Set& operator= (
Set const&) =
delete;
262 template <
typename Value>
263 void add (Value value)
const
264 { m_stream.
add (value); }
299 template <
class Derived>
300 Derived*
add (Derived* child)
307 void remove (
Source& child);
345 static bool peel_leading_slash (
std::string* path);
346 static bool peel_trailing_slashstar (
std::string* path);
355 virtual void onWrite (
Map&);
PropertyStream & stream()
Derived * add(Derived *child)
Add a child source by pointer.
Subclasses can be called to write to a stream and have children.
virtual void map_begin()=0
Source & operator*() const
void add(std::string const &key, char const *value)
void add(Key key, Value value) const
PropertyStream & m_stream
Source * operator->() const
std::ostream & operator<<(std::ostream &manip(std::ostream &)) const
virtual void add(std::string const &key, std::string const &value)=0
std::recursive_mutex lock_
void add(std::string const &key, Value value) const
void add(Value value) const
virtual void array_begin()=0
virtual ~PropertyStream()=default
virtual void array_end()=0
Proxy operator[](std::string const &key)
Map(PropertyStream &stream)
Map & operator=(Map const &)=delete
Proxy & operator=(Value value)
void lexical_add(Value value)
std::ostringstream m_ostream
void add(char const *value)
Abstract stream with RAII containers that produce a property tree.
PropertyStream & m_stream
Proxy(Map const &map, std::string const &key)
void lexical_add(std::string const &key, Value value)
Intrusive doubly linked list.