1#include <xrpl/beast/core/List.h>
2#include <xrpl/beast/utility/PropertyStream.h>
3#include <xrpl/beast/utility/instrumentation.h>
113 return Proxy(*
this, key);
179 source.
parent_ ==
nullptr,
"beast::PropertyStream::Source::add : null source parent");
190 child.parent_ ==
this,
"beast::PropertyStream::Source::remove : child parent match");
192 child.parent_ =
nullptr;
224 child.source().write(stream);
232 if (result.
first ==
nullptr)
237 result.
first->write(stream);
241 result.
first->writeOne(stream);
257 if (source ==
nullptr)
282 if (path->
back() ==
'*')
287 if (!path->
empty() && path->
back() ==
'/')
298 std::string::const_iterator
const first = (*path).
begin();
299 std::string::const_iterator
const last = (*path).end();
300 std::string::const_iterator
const pos =
std::find(first, last,
'/');
320 if (found !=
nullptr)
327 if (found !=
nullptr)
345 }
while (source !=
nullptr);
357 if (s.source().name_ ==
name)
Source & operator*() const
Source * operator->() const
Map(PropertyStream &stream)
Proxy operator[](std::string const &key)
PropertyStream & stream()
Proxy(Map const &map, std::string key)
std::ostringstream ostream_
std::ostream & operator<<(std::ostream &manip(std::ostream &)) const
PropertyStream & stream()
Set(std::string const &key, Map &map)
Subclasses can be called to write to a stream and have children.
void removeAll()
Remove all child sources from this Source.
static bool peelTrailingSlashstar(std::string *path)
static std::string peelName(std::string *path)
std::recursive_mutex lock_
std::pair< Source *, bool > find(std::string path)
Parse the dot-delimited Source path and return the result.
PropertyStream::Source * findOne(std::string const &name)
PropertyStream::Source * findPath(std::string path)
void remove(Source &child)
Remove a child source from this Source.
std::string const & name() const
Returns the name of this source.
Source * findOneDeep(std::string const &name)
void add(Source &source)
Add a child source.
static bool peelLeadingSlash(std::string *path)
void writeOne(PropertyStream &stream)
Write only this Source to the stream.
void write(PropertyStream &stream)
write this source and all its children recursively to the stream.
virtual void onWrite(Map &)
Subclass override.
virtual void add(std::string const &key, std::string const &value)=0
void lexicalAdd(std::string const &key, Value value)