rapidyaml 0.15.2
parse and emit YAML, and do it fast
Loading...
Searching...
No Matches
c4::yml::detail::RoNodeMethods< Impl, ConstImpl > Struct Template Reference

a CRTP base providing read-only methods for ConstNodeRef and NodeRef More...

#include <node.hpp>

Public Member Functions

node property getters
NodeType type () const RYML_NOEXCEPT
 Forward to Tree::type().
const char * type_str () const RYML_NOEXCEPT
 Forward to Tree::type_str().
csubstr key () const RYML_NOEXCEPT
 Forward to Tree::key().
csubstr key_tag () const RYML_NOEXCEPT
 Forward to Tree::key_tag().
csubstr key_ref () const RYML_NOEXCEPT
 Forward to Tree::key_ref().
csubstr key_anchor () const RYML_NOEXCEPT
 Forward to Tree::key_anchor().
csubstr val () const RYML_NOEXCEPT
 Forward to Tree::val().
csubstr val_tag () const RYML_NOEXCEPT
 Forward to Tree::val_tag().
csubstr val_ref () const RYML_NOEXCEPT
 Forward to Tree::val_ref().
csubstr val_anchor () const RYML_NOEXCEPT
 Forward to Tree::val_anchor().
NodeScalar const & keysc () const RYML_NOEXCEPT
 Forward to Tree::keysc().
NodeScalar const & valsc () const RYML_NOEXCEPT
 Forward to Tree::valsc().
bool key_is_null () const RYML_NOEXCEPT
 Forward to Tree::key_is_null().
bool val_is_null () const RYML_NOEXCEPT
 Forward to Tree::val_is_null().
bool is_key_unfiltered () const noexcept
 Forward to Tree::is_key_unfiltered().
bool is_val_unfiltered () const noexcept
 Forward to Tree::is_val_unfiltered().
node type predicates
bool empty () const RYML_NOEXCEPT
 Forward to Tree::empty().
bool is_stream () const RYML_NOEXCEPT
 Forward to Tree::is_stream().
bool is_doc () const RYML_NOEXCEPT
 Forward to Tree::is_doc().
bool is_container () const RYML_NOEXCEPT
 Forward to Tree::is_container().
bool is_map () const RYML_NOEXCEPT
 Forward to Tree::is_map().
bool is_seq () const RYML_NOEXCEPT
 Forward to Tree::is_seq().
bool has_val () const RYML_NOEXCEPT
 Forward to Tree::has_val().
bool has_key () const RYML_NOEXCEPT
 Forward to Tree::has_key().
bool is_val () const RYML_NOEXCEPT
 Forward to Tree::is_val().
bool is_keyval () const RYML_NOEXCEPT
 Forward to Tree::is_keyval().
bool has_key_tag () const RYML_NOEXCEPT
 Forward to Tree::has_key_tag().
bool has_val_tag () const RYML_NOEXCEPT
 Forward to Tree::has_val_tag().
bool has_key_anchor () const RYML_NOEXCEPT
 Forward to Tree::has_key_anchor().
bool has_val_anchor () const RYML_NOEXCEPT
 Forward to Tree::has_val_anchor().
bool has_anchor () const RYML_NOEXCEPT
 Forward to Tree::has_anchor().
bool is_key_ref () const RYML_NOEXCEPT
 Forward to Tree::is_key_ref().
bool is_val_ref () const RYML_NOEXCEPT
 Forward to Tree::is_val_ref().
bool is_ref () const RYML_NOEXCEPT
 Forward to Tree::is_ref().
bool parent_is_seq () const RYML_NOEXCEPT
 Forward to Tree::parent_is_seq().
bool parent_is_map () const RYML_NOEXCEPT
 Forward to Tree::parent_is_map().
bool is_key_anchor () const noexcept
bool is_val_hanchor () const noexcept
bool is_anchor () const noexcept
bool is_anchor_or_ref () const noexcept
style predicates
bool type_has_any (NodeType_e bits) const RYML_NOEXCEPT
 Forward to Tree::type_has_any().
bool type_has_all (NodeType_e bits) const RYML_NOEXCEPT
 Forward to Tree::type_has_all().
bool type_has_none (NodeType_e bits) const RYML_NOEXCEPT
 Forward to Tree::type_has_none().
NodeType key_style () const RYML_NOEXCEPT
 Forward to Tree::key_style().
NodeType val_style () const RYML_NOEXCEPT
 Forward to Tree::val_style().
bool is_container_styled () const RYML_NOEXCEPT
 Forward to Tree::is_container_styled().
bool is_block () const RYML_NOEXCEPT
 Forward to Tree::is_block().
bool is_flow () const RYML_NOEXCEPT
 Forward to Tree::is_flow().
bool is_flow_sl () const RYML_NOEXCEPT
 Forward to Tree::is_flow_sl().
bool is_flow_ml () const RYML_NOEXCEPT
 Forward to Tree::is_flow_ml1().
bool is_flow_ml1 () const RYML_NOEXCEPT
 Forward to Tree::is_flow_ml1().
bool is_flow_mln () const RYML_NOEXCEPT
 Forward to Tree::is_flow_mln().
bool is_flow_mlx () const RYML_NOEXCEPT
 Forward to Tree::is_flow_mlx().
bool has_flow_space () const RYML_NOEXCEPT
 Forward to Tree::has_flow_space().
bool is_key_styled () const RYML_NOEXCEPT
 Forward to Tree::is_key_styled().
bool is_val_styled () const RYML_NOEXCEPT
 Forward to Tree::is_val_styled().
bool is_key_literal () const RYML_NOEXCEPT
 Forward to Tree::is_key_literal().
bool is_val_literal () const RYML_NOEXCEPT
 Forward to Tree::is_val_literal().
bool is_key_folded () const RYML_NOEXCEPT
 Forward to Tree::is_key_folded().
bool is_val_folded () const RYML_NOEXCEPT
 Forward to Tree::is_val_folded().
bool is_key_squo () const RYML_NOEXCEPT
 Forward to Tree::is_key_squo().
bool is_val_squo () const RYML_NOEXCEPT
 Forward to Tree::is_val_squo().
bool is_key_dquo () const RYML_NOEXCEPT
 Forward to Tree::is_key_dquo().
bool is_val_dquo () const RYML_NOEXCEPT
 Forward to Tree::is_val_dquo().
bool is_key_plain () const RYML_NOEXCEPT
 Forward to Tree::is_key_plain().
bool is_val_plain () const RYML_NOEXCEPT
 Forward to Tree::is_val_plain().
bool is_key_quoted () const RYML_NOEXCEPT
 Forward to Tree::is_key_quoted().
bool is_val_quoted () const RYML_NOEXCEPT
 Forward to Tree::is_val_quoted().
bool is_quoted () const RYML_NOEXCEPT
 Forward to Tree::is_quoted().
hierarchy predicates
bool is_root () const RYML_NOEXCEPT
 Forward to Tree::is_root().
bool has_parent () const RYML_NOEXCEPT
 Forward to Tree::has_parent() Node must be readable.
bool is_ancestor (ConstImpl const &ancestor) const RYML_NOEXCEPT
 Forward to Tree::is_ancestor() Node must be readable.
bool has_child (ConstImpl const &n) const RYML_NOEXCEPT
 Forward to Tree::has_child().
bool has_child (id_type node) const RYML_NOEXCEPT
 Forward to Tree::has_child().
bool has_child (csubstr name) const RYML_NOEXCEPT
 Forward to Tree::has_child().
bool has_children () const RYML_NOEXCEPT
 Forward to Tree::has_children().
bool has_sibling (ConstImpl const &n) const RYML_NOEXCEPT
 Forward to Tree::has_sibling().
bool has_sibling (id_type node) const RYML_NOEXCEPT
 Forward to Tree::has_sibling().
bool has_sibling (csubstr name) const RYML_NOEXCEPT
 Forward to Tree::has_sibling().
bool has_other_siblings () const RYML_NOEXCEPT
 Forward to Tree::has_other_siblings().
bool has_siblings () const RYML_NOEXCEPT
hierarchy getters
id_type num_children () const RYML_NOEXCEPT
 O(num_children).
id_type num_siblings () const RYML_NOEXCEPT
 O(num_children).
id_type num_other_siblings () const RYML_NOEXCEPT
 O(num_siblings).
id_type child_pos (ConstImpl const &n) const RYML_NOEXCEPT
 O(num_children).
id_type sibling_pos (ConstImpl const &n) const RYML_NOEXCEPT
 O(num_siblings).
id_type depth_asc () const RYML_NOEXCEPT
id_type depth_desc () const RYML_NOEXCEPT
 O(log(num_nodes)).
locations

O(num_nodes).

Forward to Tree::depth_desc(). Node must be readable.

Location location (Parser const &parser) const
deserialization
template<class T>
ConstImpl const & operator>> (T &v) const
 deserialize the node's val to the given variable, forwarding to the user-overrideable read() function.
template<class T>
ConstImpl const & operator>> (T const &wrapper) const
template<class T>
ConstImpl const & operator>> (Key< T > v) const
 deserialize the node's key to the given variable, forwarding to the user-overrideable read() function; use key() to disambiguate; for example: node >> ryml::key(var)
template<class T>
bool get_if (csubstr name, T *var) const
 look for a child by name, if it exists assign to var.
template<class T>
bool get_if (csubstr name, T *var, T const &fallback) const
 look for a child by name, if it exists assign to var, otherwise default to fallback.

Detailed Description

template<class Impl, class ConstImpl>
struct c4::yml::detail::RoNodeMethods< Impl, ConstImpl >

a CRTP base providing read-only methods for ConstNodeRef and NodeRef

Definition at line 177 of file node.hpp.

Member Function Documentation

◆ type()

template<class Impl, class ConstImpl>
NodeType c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::type ( ) const
inline

Forward to Tree::type().

Node must be readable.

Definition at line 194 of file node.hpp.

◆ type_str()

template<class Impl, class ConstImpl>
const char * c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::type_str ( ) const
inline

Forward to Tree::type_str().

Node must be readable.

Definition at line 195 of file node.hpp.

◆ key()

template<class Impl, class ConstImpl>
csubstr c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::key ( ) const
inline

Forward to Tree::key().

Node must be readable.

Definition at line 197 of file node.hpp.

◆ key_tag()

template<class Impl, class ConstImpl>
csubstr c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::key_tag ( ) const
inline

Forward to Tree::key_tag().

Node must be readable.

Definition at line 198 of file node.hpp.

◆ key_ref()

template<class Impl, class ConstImpl>
csubstr c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::key_ref ( ) const
inline

Forward to Tree::key_ref().

Node must be readable.

Definition at line 199 of file node.hpp.

◆ key_anchor()

template<class Impl, class ConstImpl>
csubstr c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::key_anchor ( ) const
inline

Forward to Tree::key_anchor().

Node must be readable.

Definition at line 200 of file node.hpp.

◆ val()

template<class Impl, class ConstImpl>
csubstr c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::val ( ) const
inline

Forward to Tree::val().

Node must be readable.

Definition at line 202 of file node.hpp.

◆ val_tag()

template<class Impl, class ConstImpl>
csubstr c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::val_tag ( ) const
inline

Forward to Tree::val_tag().

Node must be readable.

Definition at line 203 of file node.hpp.

◆ val_ref()

template<class Impl, class ConstImpl>
csubstr c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::val_ref ( ) const
inline

Forward to Tree::val_ref().

Node must be readable.

Definition at line 204 of file node.hpp.

◆ val_anchor()

template<class Impl, class ConstImpl>
csubstr c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::val_anchor ( ) const
inline

Forward to Tree::val_anchor().

Node must be readable.

Definition at line 205 of file node.hpp.

◆ keysc()

template<class Impl, class ConstImpl>
NodeScalar const & c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::keysc ( ) const
inline

Forward to Tree::keysc().

Node must be readable.

Definition at line 207 of file node.hpp.

◆ valsc()

template<class Impl, class ConstImpl>
NodeScalar const & c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::valsc ( ) const
inline

Forward to Tree::valsc().

Node must be readable.

Definition at line 208 of file node.hpp.

◆ key_is_null()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::key_is_null ( ) const
inline

Forward to Tree::key_is_null().

Node must be readable.

Definition at line 210 of file node.hpp.

◆ val_is_null()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::val_is_null ( ) const
inline

Forward to Tree::val_is_null().

Node must be readable.

Definition at line 211 of file node.hpp.

◆ is_key_unfiltered()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::is_key_unfiltered ( ) const
inlinenoexcept

Forward to Tree::is_key_unfiltered().

Node must be readable.

Definition at line 213 of file node.hpp.

◆ is_val_unfiltered()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::is_val_unfiltered ( ) const
inlinenoexcept

Forward to Tree::is_val_unfiltered().

Node must be readable.

Definition at line 214 of file node.hpp.

◆ empty()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::empty ( ) const
inline

Forward to Tree::empty().

Node must be readable.

Definition at line 223 of file node.hpp.

◆ is_stream()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::is_stream ( ) const
inline

Forward to Tree::is_stream().

Node must be readable.

Definition at line 224 of file node.hpp.

◆ is_doc()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::is_doc ( ) const
inline

Forward to Tree::is_doc().

Node must be readable.

Definition at line 225 of file node.hpp.

◆ is_container()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::is_container ( ) const
inline

Forward to Tree::is_container().

Node must be readable.

Definition at line 226 of file node.hpp.

◆ is_map()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::is_map ( ) const
inline

Forward to Tree::is_map().

Node must be readable.

Definition at line 227 of file node.hpp.

◆ is_seq()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::is_seq ( ) const
inline

Forward to Tree::is_seq().

Node must be readable.

Definition at line 228 of file node.hpp.

◆ has_val()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::has_val ( ) const
inline

Forward to Tree::has_val().

Node must be readable.

Definition at line 229 of file node.hpp.

◆ has_key()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::has_key ( ) const
inline

Forward to Tree::has_key().

Node must be readable.

Definition at line 230 of file node.hpp.

◆ is_val()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::is_val ( ) const
inline

Forward to Tree::is_val().

Node must be readable.

Definition at line 231 of file node.hpp.

◆ is_keyval()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::is_keyval ( ) const
inline

Forward to Tree::is_keyval().

Node must be readable.

Definition at line 232 of file node.hpp.

◆ has_key_tag()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::has_key_tag ( ) const
inline

Forward to Tree::has_key_tag().

Node must be readable.

Definition at line 233 of file node.hpp.

◆ has_val_tag()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::has_val_tag ( ) const
inline

Forward to Tree::has_val_tag().

Node must be readable.

Definition at line 234 of file node.hpp.

◆ has_key_anchor()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::has_key_anchor ( ) const
inline

Forward to Tree::has_key_anchor().

Node must be readable.

Definition at line 235 of file node.hpp.

◆ has_val_anchor()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::has_val_anchor ( ) const
inline

Forward to Tree::has_val_anchor().

Node must be readable.

Definition at line 236 of file node.hpp.

◆ has_anchor()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::has_anchor ( ) const
inline

Forward to Tree::has_anchor().

Node must be readable.

Definition at line 237 of file node.hpp.

◆ is_key_ref()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::is_key_ref ( ) const
inline

Forward to Tree::is_key_ref().

Node must be readable.

Definition at line 238 of file node.hpp.

◆ is_val_ref()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::is_val_ref ( ) const
inline

Forward to Tree::is_val_ref().

Node must be readable.

Definition at line 239 of file node.hpp.

◆ is_ref()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::is_ref ( ) const
inline

Forward to Tree::is_ref().

Node must be readable.

Definition at line 240 of file node.hpp.

◆ parent_is_seq()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::parent_is_seq ( ) const
inline

Forward to Tree::parent_is_seq().

Node must be readable.

Definition at line 241 of file node.hpp.

◆ parent_is_map()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::parent_is_map ( ) const
inline

Forward to Tree::parent_is_map().

Node must be readable.

Definition at line 242 of file node.hpp.

◆ is_key_anchor()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::is_key_anchor ( ) const
inlinenoexcept

Definition at line 244 of file node.hpp.

a CRTP base providing read-only methods for ConstNodeRef and NodeRef
Definition node.hpp:178
bool has_key_anchor() const RYML_NOEXCEPT
Forward to Tree::has_key_anchor().
Definition node.hpp:235

◆ is_val_hanchor()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::is_val_hanchor ( ) const
inlinenoexcept

Definition at line 245 of file node.hpp.

bool has_val_anchor() const RYML_NOEXCEPT
Forward to Tree::has_val_anchor().
Definition node.hpp:236

◆ is_anchor()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::is_anchor ( ) const
inlinenoexcept

Definition at line 246 of file node.hpp.

246{ assert_readable__(); return tree_->has_anchor(id_); }
bool has_anchor() const RYML_NOEXCEPT
Forward to Tree::has_anchor().
Definition node.hpp:237

◆ is_anchor_or_ref()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::is_anchor_or_ref ( ) const
inlinenoexcept

Definition at line 247 of file node.hpp.

bool is_anchor_or_ref() const noexcept
Definition node.hpp:247

◆ type_has_any()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::type_has_any ( NodeType_e bits) const
inline

Forward to Tree::type_has_any().

Node must be readable.

Definition at line 258 of file node.hpp.

◆ type_has_all()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::type_has_all ( NodeType_e bits) const
inline

Forward to Tree::type_has_all().

Node must be readable.

Definition at line 259 of file node.hpp.

◆ type_has_none()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::type_has_none ( NodeType_e bits) const
inline

Forward to Tree::type_has_none().

Node must be readable.

Definition at line 260 of file node.hpp.

◆ key_style()

template<class Impl, class ConstImpl>
NodeType c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::key_style ( ) const
inline

Forward to Tree::key_style().

Node must be readable.

Definition at line 262 of file node.hpp.

◆ val_style()

template<class Impl, class ConstImpl>
NodeType c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::val_style ( ) const
inline

Forward to Tree::val_style().

Node must be readable.

Definition at line 263 of file node.hpp.

◆ is_container_styled()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::is_container_styled ( ) const
inline

Forward to Tree::is_container_styled().

Node must be readable.

Definition at line 265 of file node.hpp.

◆ is_block()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::is_block ( ) const
inline

Forward to Tree::is_block().

Node must be readable.

Definition at line 266 of file node.hpp.

◆ is_flow()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::is_flow ( ) const
inline

Forward to Tree::is_flow().

Node must be readable.

Definition at line 267 of file node.hpp.

◆ is_flow_sl()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::is_flow_sl ( ) const
inline

Forward to Tree::is_flow_sl().

Node must be readable.

Definition at line 268 of file node.hpp.

◆ is_flow_ml()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::is_flow_ml ( ) const
inline

Forward to Tree::is_flow_ml1().

Node must be readable.

Definition at line 270 of file node.hpp.

◆ is_flow_ml1()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::is_flow_ml1 ( ) const
inline

Forward to Tree::is_flow_ml1().

Node must be readable.

Definition at line 271 of file node.hpp.

◆ is_flow_mln()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::is_flow_mln ( ) const
inline

Forward to Tree::is_flow_mln().

Node must be readable.

Definition at line 272 of file node.hpp.

◆ is_flow_mlx()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::is_flow_mlx ( ) const
inline

Forward to Tree::is_flow_mlx().

Node must be readable.

Definition at line 273 of file node.hpp.

◆ has_flow_space()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::has_flow_space ( ) const
inline

Forward to Tree::has_flow_space().

Node must be readable.

Definition at line 274 of file node.hpp.

◆ is_key_styled()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::is_key_styled ( ) const
inline

Forward to Tree::is_key_styled().

Node must be readable.

Definition at line 276 of file node.hpp.

◆ is_val_styled()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::is_val_styled ( ) const
inline

Forward to Tree::is_val_styled().

Node must be readable.

Definition at line 277 of file node.hpp.

◆ is_key_literal()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::is_key_literal ( ) const
inline

Forward to Tree::is_key_literal().

Node must be readable.

Definition at line 278 of file node.hpp.

◆ is_val_literal()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::is_val_literal ( ) const
inline

Forward to Tree::is_val_literal().

Node must be readable.

Definition at line 279 of file node.hpp.

◆ is_key_folded()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::is_key_folded ( ) const
inline

Forward to Tree::is_key_folded().

Node must be readable.

Definition at line 280 of file node.hpp.

◆ is_val_folded()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::is_val_folded ( ) const
inline

Forward to Tree::is_val_folded().

Node must be readable.

Definition at line 281 of file node.hpp.

◆ is_key_squo()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::is_key_squo ( ) const
inline

Forward to Tree::is_key_squo().

Node must be readable.

Definition at line 282 of file node.hpp.

◆ is_val_squo()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::is_val_squo ( ) const
inline

Forward to Tree::is_val_squo().

Node must be readable.

Definition at line 283 of file node.hpp.

◆ is_key_dquo()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::is_key_dquo ( ) const
inline

Forward to Tree::is_key_dquo().

Node must be readable.

Definition at line 284 of file node.hpp.

◆ is_val_dquo()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::is_val_dquo ( ) const
inline

Forward to Tree::is_val_dquo().

Node must be readable.

Definition at line 285 of file node.hpp.

◆ is_key_plain()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::is_key_plain ( ) const
inline

Forward to Tree::is_key_plain().

Node must be readable.

Definition at line 286 of file node.hpp.

◆ is_val_plain()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::is_val_plain ( ) const
inline

Forward to Tree::is_val_plain().

Node must be readable.

Definition at line 287 of file node.hpp.

◆ is_key_quoted()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::is_key_quoted ( ) const
inline

Forward to Tree::is_key_quoted().

Node must be readable.

Definition at line 288 of file node.hpp.

◆ is_val_quoted()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::is_val_quoted ( ) const
inline

Forward to Tree::is_val_quoted().

Node must be readable.

Definition at line 289 of file node.hpp.

◆ is_quoted()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::is_quoted ( ) const
inline

Forward to Tree::is_quoted().

Node must be readable.

Definition at line 290 of file node.hpp.

◆ is_root()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::is_root ( ) const
inline

Forward to Tree::is_root().

Node must be readable.

Definition at line 301 of file node.hpp.

◆ has_parent()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::has_parent ( ) const
inline

Forward to Tree::has_parent() Node must be readable.

Definition at line 302 of file node.hpp.

◆ is_ancestor()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::is_ancestor ( ConstImpl const & ancestor) const
inline

Forward to Tree::is_ancestor() Node must be readable.

Definition at line 303 of file node.hpp.

◆ has_child() [1/3]

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::has_child ( ConstImpl const & n) const
inline

Forward to Tree::has_child().

Node must be readable.

Definition at line 305 of file node.hpp.

◆ has_child() [2/3]

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::has_child ( id_type node) const
inline

Forward to Tree::has_child().

Node must be readable.

Definition at line 306 of file node.hpp.

◆ has_child() [3/3]

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::has_child ( csubstr name) const
inline

Forward to Tree::has_child().

Node must be readable.

Definition at line 307 of file node.hpp.

◆ has_children()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::has_children ( ) const
inline

Forward to Tree::has_children().

Node must be readable.

Definition at line 308 of file node.hpp.

◆ has_sibling() [1/3]

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::has_sibling ( ConstImpl const & n) const
inline

Forward to Tree::has_sibling().

Node must be readable.

Definition at line 310 of file node.hpp.

◆ has_sibling() [2/3]

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::has_sibling ( id_type node) const
inline

Forward to Tree::has_sibling().

Node must be readable.

Definition at line 311 of file node.hpp.

◆ has_sibling() [3/3]

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::has_sibling ( csubstr name) const
inline

Forward to Tree::has_sibling().

Node must be readable.

Definition at line 312 of file node.hpp.

◆ has_other_siblings()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::has_other_siblings ( ) const
inline

Forward to Tree::has_other_siblings().

Node must be readable.

Definition at line 313 of file node.hpp.

◆ has_siblings()

template<class Impl, class ConstImpl>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::has_siblings ( ) const
inline

Definition at line 315 of file node.hpp.

bool has_siblings() const RYML_NOEXCEPT
Definition node.hpp:315

◆ num_children()

template<class Impl, class ConstImpl>
id_type c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::num_children ( ) const
inline

O(num_children).

Forward to Tree::num_children().

Definition at line 326 of file node.hpp.

◆ num_siblings()

template<class Impl, class ConstImpl>
id_type c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::num_siblings ( ) const
inline

O(num_children).

Forward to Tree::num_siblings().

Definition at line 327 of file node.hpp.

◆ num_other_siblings()

template<class Impl, class ConstImpl>
id_type c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::num_other_siblings ( ) const
inline

O(num_siblings).

Forward to Tree::num_other_siblings().

Definition at line 328 of file node.hpp.

◆ child_pos()

template<class Impl, class ConstImpl>
id_type c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::child_pos ( ConstImpl const & n) const
inline

O(num_children).

Forward to Tree::child_pos().

Definition at line 329 of file node.hpp.

◆ sibling_pos()

template<class Impl, class ConstImpl>
id_type c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::sibling_pos ( ConstImpl const & n) const
inline

O(num_siblings).

Forward to Tree::sibling_pos().

Definition at line 330 of file node.hpp.

◆ depth_asc()

template<class Impl, class ConstImpl>
id_type c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::depth_asc ( ) const
inline

Definition at line 332 of file node.hpp.

332{ assert_readable__(); return tree_->depth_asc(id_); } /** O(log(num_nodes)). Forward to Tree::depth_asc(). Node must be readable. */
id_type depth_asc() const RYML_NOEXCEPT
Definition node.hpp:332

◆ depth_desc()

template<class Impl, class ConstImpl>
id_type c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::depth_desc ( ) const
inline

O(log(num_nodes)).

Forward to Tree::depth_asc(). Node must be readable.

Definition at line 333 of file node.hpp.

333{ assert_readable__(); return tree_->depth_desc(id_); } /** O(num_nodes). Forward to Tree::depth_desc(). Node must be readable. */
id_type depth_desc() const RYML_NOEXCEPT
O(log(num_nodes)).
Definition node.hpp:333

◆ location()

template<class Impl, class ConstImpl>
Location c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::location ( Parser const & parser) const
inline

Definition at line 342 of file node.hpp.

343 {
345 return tree_->location(parser, id_);
346 }
Location location(Parser const &parser) const
Definition node.hpp:342

◆ operator>>() [1/3]

template<class Impl, class ConstImpl>
template<class T>
ConstImpl const & c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::operator>> ( T & v) const
inline

deserialize the node's val to the given variable, forwarding to the user-overrideable read() function.

Definition at line 358 of file node.hpp.

359 {
361 if( ! read((ConstImpl const&)*this, &v))
362 _RYML_ERR_VISIT_(tree_->m_callbacks, tree_, id_, "could not deserialize value");
363 return *((ConstImpl const*)this);
364 }
bool read(ConstNodeRef const &n, T *v)
Definition node.hpp:1739

◆ operator>>() [2/3]

template<class Impl, class ConstImpl>
template<class T>
ConstImpl const & c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::operator>> ( T const & wrapper) const
inline

Definition at line 366 of file node.hpp.

367 {
369 if( ! read((ConstImpl const&)*this, wrapper))
370 _RYML_ERR_VISIT_(tree_->m_callbacks, tree_, id_, "could not deserialize value");
371 return *((ConstImpl const*)this);
372 }

◆ operator>>() [3/3]

template<class Impl, class ConstImpl>
template<class T>
ConstImpl const & c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::operator>> ( Key< T > v) const
inline

deserialize the node's key to the given variable, forwarding to the user-overrideable read() function; use key() to disambiguate; for example: node >> ryml::key(var)

Definition at line 378 of file node.hpp.

379 {
381 if( ! readkey((ConstImpl const&)*this, &v.k))
382 _RYML_ERR_VISIT_(tree_->m_callbacks, tree_, id_, "could not deserialize key");
383 return *((ConstImpl const*)this);
384 }
bool readkey(ConstNodeRef const &n, T *v)
Definition node.hpp:1761

◆ get_if() [1/2]

template<class Impl, class ConstImpl>
template<class T>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::get_if ( csubstr name,
T * var ) const
inline

look for a child by name, if it exists assign to var.

return true if the child existed.

Definition at line 389 of file node.hpp.

390 {
392 ConstImpl ch = ((ConstImpl const*)this)->find_child(name);
393 if(!ch.readable())
394 return false;
395 ch >> *var;
396 return true;
397 }

◆ get_if() [2/2]

template<class Impl, class ConstImpl>
template<class T>
bool c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::get_if ( csubstr name,
T * var,
T const & fallback ) const
inline

look for a child by name, if it exists assign to var, otherwise default to fallback.

return true if the child existed.

Definition at line 403 of file node.hpp.

404 {
406 ConstImpl ch = ((ConstImpl const*)this)->find_child(name);
407 if(ch.readable())
408 {
409 ch >> *var;
410 return true;
411 }
412 else
413 {
414 *var = fallback;
415 return false;
416 }
417 }

The documentation for this struct was generated from the following file:
  • /home/docs/checkouts/readthedocs.org/user_builds/rapidyaml/checkouts/latest/src/c4/yml/node.hpp