|
rapidyaml 0.15.2
parse and emit YAML, and do it fast
|
Holds a pointer to an existing tree, and a node id. More...
#include <node.hpp>
Public Types | |
| using | tree_type = Tree const |
Public Attributes | |
| Tree const * | m_tree |
| id_type | m_id |
| friend | NodeRef |
Friends | |
| struct | detail::RoNodeMethods< ConstNodeRef, ConstNodeRef > |
iteration | |
| using | iterator = detail::child_iterator<ConstNodeRef> |
| using | const_iterator = detail::child_iterator<ConstNodeRef> |
| using | children_view = detail::children_view<ConstNodeRef> |
| using | const_children_view = detail::children_view<ConstNodeRef> |
| const_iterator | begin () const RYML_NOEXCEPT |
| get an iterator to the first child | |
| const_iterator | cbegin () const RYML_NOEXCEPT |
| get an iterator to the first child | |
| const_iterator | end () const RYML_NOEXCEPT |
| get an iterator to after the last child | |
| const_iterator | cend () const RYML_NOEXCEPT |
| get an iterator to after the last child | |
| const_children_view | children () const RYML_NOEXCEPT |
| get an iterable view over children | |
| const_children_view | cchildren () const RYML_NOEXCEPT |
| get an iterable view over children | |
| const_children_view | siblings () const RYML_NOEXCEPT |
| const_children_view | csiblings () const RYML_NOEXCEPT |
| get an iterable view over all siblings (including the calling node) | |
state queries | |
see NodeRef for an explanation on what these states mean | |
| bool | invalid () const noexcept |
| bool | readable () const noexcept |
| because a ConstNodeRef cannot be used to write to the tree, readable() has the same meaning as !invalid() | |
| static constexpr bool | is_seed () noexcept |
| because a ConstNodeRef cannot be used to write to the tree, it can never be a seed. | |
Holds a pointer to an existing tree, and a node id.
It can be used only to read from the tree.
| using c4::yml::ConstNodeRef::tree_type = Tree const |
| using c4::yml::ConstNodeRef::iterator = detail::child_iterator<ConstNodeRef> |
| using c4::yml::ConstNodeRef::const_iterator = detail::child_iterator<ConstNodeRef> |
| using c4::yml::ConstNodeRef::children_view = detail::children_view<ConstNodeRef> |
| using c4::yml::ConstNodeRef::const_children_view = detail::children_view<ConstNodeRef> |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
defaultnoexcept |
|
defaultnoexcept |
|
inlinenoexcept |
|
defaultnoexcept |
|
defaultnoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
because a ConstNodeRef cannot be used to write to the tree, readable() has the same meaning as !invalid()
|
inlinestaticconstexprnoexcept |
because a ConstNodeRef cannot be used to write to the tree, it can never be a seed.
This method is provided for API equivalence between ConstNodeRef and NodeRef.
Definition at line 538 of file node.hpp.
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
|
inline |
Definition at line 574 of file node.hpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Forward to Tree::doc().
Node must be readable. succeeds even when the node may have invalid or seed id
|
inline |
Find a child by key; complexity is O(num_children).
Behaves similar to the non-const overload, but further asserts that the returned node is readable (because it can never be in a seed state). The assertion is performed only if RYML_USE_ASSERT is set to true. As with the non-const overload, it is UB to use the return value if it is not valid.
Definition at line 626 of file node.hpp.
|
inline |
Find a child by position; complexity is O(pos).
Behaves similar to the non-const overload, but further asserts that the returned node is readable (because it can never be in a seed state). This assertion is performed only if RYML_USE_ASSERT is set to true. As with the non-const overload, it is UB to use the return value if it is not valid.
|
inline |
Get a child by name, with error checking; complexity is O(num_children).
Behaves as operator[](csubstr) const, but always raises an error (even when RYML_USE_ASSERT is set to false) when the returned node does not exist, or when this node is not readable, or when it is not a map. This behaviour is similar to std::vector::at(), but the error consists in calling the error callback instead of directly raising an exception.
|
inline |
Get a child by position, with error checking; complexity is O(pos).
Behaves as operator[](id_type) const, but always raises an error (even when RYML_USE_ASSERT is set to false) when the returned node does not exist, or when this node is not readable, or when it is not a container. This behaviour is similar to std::vector::at(), but the error consists in calling the error callback instead of directly raising an exception.
Definition at line 692 of file node.hpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlinenoexceptinherited |
Forward to Tree::is_key_unfiltered().
Node must be readable.
|
inlinenoexceptinherited |
Forward to Tree::is_val_unfiltered().
Node must be readable.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlinenoexceptinherited |
Definition at line 244 of file node.hpp.
|
inlinenoexceptinherited |
Definition at line 245 of file node.hpp.
|
inlinenoexceptinherited |
Definition at line 246 of file node.hpp.
|
inlinenoexceptinherited |
Definition at line 247 of file node.hpp.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Forward to Tree::is_container_styled().
Node must be readable.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Forward to Tree::has_parent() Node must be readable.
|
inlineinherited |
Forward to Tree::is_ancestor() Node must be readable.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Forward to Tree::has_other_siblings().
Node must be readable.
|
inlineinherited |
Definition at line 315 of file node.hpp.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Definition at line 332 of file node.hpp.
|
inlineinherited |
O(log(num_nodes)).
Forward to Tree::depth_asc(). Node must be readable.
Definition at line 333 of file node.hpp.
|
inlineinherited |
Definition at line 342 of file node.hpp.
|
inlineinherited |
deserialize the node's val to the given variable, forwarding to the user-overrideable read() function.
|
inlineinherited |
look for a child by name, if it exists assign to var.
return true if the child existed.
|
friend |