1#ifndef C4_YML_STD_MAP_HPP_
2#define C4_YML_STD_MAP_HPP_
17template<
class K,
class V,
class Less,
class Alloc>
21 for(
auto const& C4_RESTRICT p : m)
30template<
class K,
class V,
class Less,
class Alloc>
34 for(
auto const& C4_RESTRICT p : m)
47template<
class K,
class V,
class Less,
class Alloc>
50 if C4_UNLIKELY(!tree->
is_map(
id))
56 if C4_UNLIKELY(!result)
58 result = tree->
deserialize(child, &(*m)[std::move(k)]);
59 if C4_UNLIKELY(!result)
69template<
class K,
class V,
class Less,
class Alloc>
72 if C4_UNLIKELY(!n.
is_map())
78 if C4_UNLIKELY(!result)
80 result = ch.deserialize(&(*m)[std::move(k)]);
81 if C4_UNLIKELY(!result)
Holds a pointer to an existing tree, and a node id.
id_type id() const noexcept
A reference to a node in an existing yaml tree, offering a more convenient API than the index-based A...
void set_serialized(T const &v)
serialize a variable to this node.
void set_key_serialized(T const &k)
serialize a variable, then assign the result to the node's key
id_type first_child(id_type node) const
bool is_map(id_type node) const
void set_serialized(id_type node, T const &val) RYML_NOEXCEPT
void set_key_serialized(id_type node, T const &key) RYML_NOEXCEPT
id_type append_child(id_type parent)
create and insert a node as the last child of parent
ReadResult deserialize(id_type node, T *v) const
(1) deserialize a node's contents to a variable
id_type next_sibling(id_type node) const
void set_map(id_type node) RYML_NOEXCEPT
ReadResult deserialize_key(id_type node, T *v) const
(1) deserialize a node's key to a variable
ReadResult read(ConstNodeRef const &n, T *v)
void write(NodeRef *n, T const &v)
RYML_ID_TYPE id_type
The type of a node id in the YAML tree; to override the default type, define the macro RYML_ID_TYPE t...
A lightweight truthy type, used to enable reporting the offending node when a deserializing error hap...
bool is_map() const RYML_NOEXCEPT
Forward to Tree::is_map().