|
rapidyaml
0.11.1
parse and emit YAML, and do it fast
|
To serialize/deserialize container types to a tree, implement the appropriate functions: More...
Classes | |
| struct | my_seq_type< T > |
| example user container type: seq-like More... | |
| struct | my_map_type< K, V > |
| example user container type: map-like More... | |
| struct | my_type |
| example user container type with nested container members. More... | |
Functions | |
| template<class T > | |
| void | write (ryml::NodeRef *n, my_seq_type< T > const &seq) |
| template<class K , class V > | |
| void | write (ryml::NodeRef *n, my_map_type< K, V > const &map) |
| void | write (ryml::NodeRef *n, my_type const &val) |
| template<class T > | |
| bool | read (ryml::ConstNodeRef const &n, my_seq_type< T > *seq) |
| template<class K , class V > | |
| bool | read (ryml::ConstNodeRef const &n, my_map_type< K, V > *map) |
| bool | read (ryml::ConstNodeRef const &n, my_type *val) |
To serialize/deserialize container types to a tree, implement the appropriate functions:
write() or read() implementation before any other headers that use functions from it. See the include order at the top of this source file. This constraint also applies to the conversion functions for your types; just like with the STL's headers, they should be included prior to ryml's headers. Lately, some effort was directed to provide forward declarations to alleviate this problem, but it may still occur.| void write | ( | ryml::NodeRef * | n, |
| my_seq_type< T > const & | seq | ||
| ) |
Definition at line 3707 of file quickstart.cpp.
References c4::yml::NodeRef::append_child(), c4::yml::SEQ, and my_seq_type< T >::seq_member.
| void write | ( | ryml::NodeRef * | n, |
| my_map_type< K, V > const & | map | ||
| ) |
Definition at line 3714 of file quickstart.cpp.
References c4::yml::NodeRef::append_child(), c4::yml::key(), c4::yml::MAP, and my_map_type< K, V >::map_member.
| void write | ( | ryml::NodeRef * | n, |
| my_type const & | val | ||
| ) |
Definition at line 3720 of file quickstart.cpp.
References c4::yml::NodeRef::append_child(), c4::yml::key(), my_type::map, c4::yml::MAP, my_type::seq, my_type::v2, my_type::v3, and my_type::v4.
| bool read | ( | ryml::ConstNodeRef const & | n, |
| my_seq_type< T > * | seq | ||
| ) |
Definition at line 3733 of file quickstart.cpp.
References c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::children(), c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::num_children(), and my_seq_type< T >::seq_member.
| bool read | ( | ryml::ConstNodeRef const & | n, |
| my_map_type< K, V > * | map | ||
| ) |
Definition at line 3742 of file quickstart.cpp.
References c4::yml::key(), and my_map_type< K, V >::map_member.
| bool read | ( | ryml::ConstNodeRef const & | n, |
| my_type * | val | ||
| ) |
Definition at line 3753 of file quickstart.cpp.
References my_type::map, my_type::seq, my_type::v2, my_type::v3, and my_type::v4.