|
rapidyaml
0.10.0
parse and emit YAML, and do it fast
|
To serialize/deserialize container types to a tree, implement the appropriate functions: More...
Classes | |
| struct | sample::my_seq_type< T > |
| example user container type: seq-like More... | |
| struct | sample::my_map_type< K, V > |
| example user container type: map-like More... | |
| struct | sample::my_type |
| example user container type with nested container members. More... | |
Functions | |
| template<class T > | |
| void | sample::write (ryml::NodeRef *n, my_seq_type< T > const &seq) |
| template<class K , class V > | |
| void | sample::write (ryml::NodeRef *n, my_map_type< K, V > const &map) |
| void | sample::write (ryml::NodeRef *n, my_type const &val) |
| template<class T > | |
| bool | sample::read (ryml::ConstNodeRef const &n, my_seq_type< T > *seq) |
| template<class K , class V > | |
| bool | sample::read (ryml::ConstNodeRef const &n, my_map_type< K, V > *map) |
| bool | sample::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 sample::write | ( | ryml::NodeRef * | n, |
| my_seq_type< T > const & | seq | ||
| ) |
Definition at line 3641 of file quickstart.cpp.
References c4::yml::NodeRef::append_child(), c4::yml::SEQ, and sample::my_seq_type< T >::seq_member.
| void sample::write | ( | ryml::NodeRef * | n, |
| my_map_type< K, V > const & | map | ||
| ) |
Definition at line 3648 of file quickstart.cpp.
References c4::yml::NodeRef::append_child(), c4::yml::key(), c4::yml::MAP, and sample::my_map_type< K, V >::map_member.
| void sample::write | ( | ryml::NodeRef * | n, |
| my_type const & | val | ||
| ) |
Definition at line 3654 of file quickstart.cpp.
References c4::yml::NodeRef::append_child(), c4::yml::key(), sample::my_type::map, c4::yml::MAP, sample::my_type::seq, sample::my_type::v2, sample::my_type::v3, and sample::my_type::v4.
| bool sample::read | ( | ryml::ConstNodeRef const & | n, |
| my_seq_type< T > * | seq | ||
| ) |
Definition at line 3667 of file quickstart.cpp.
References c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::children(), c4::yml::detail::RoNodeMethods< Impl, ConstImpl >::num_children(), and sample::my_seq_type< T >::seq_member.
| bool sample::read | ( | ryml::ConstNodeRef const & | n, |
| my_map_type< K, V > * | map | ||
| ) |
Definition at line 3676 of file quickstart.cpp.
References c4::yml::key(), and sample::my_map_type< K, V >::map_member.
| bool sample::read | ( | ryml::ConstNodeRef const & | n, |
| my_type * | val | ||
| ) |
Definition at line 3687 of file quickstart.cpp.
References sample::my_type::map, sample::my_type::seq, sample::my_type::v2, sample::my_type::v3, and sample::my_type::v4.