rapidyaml  0.16.0
parseandemitYAML,anddoitfast

freestanding write() and write_key() implementing ryml's built-in serialization of fundamental types. More...

Functions

template<class T >
void c4::yml::write (NodeRef *n, T const &v)
 
template<class T >
void c4::yml::write_key (NodeRef *n, T const &v)
 
template<class T >
void c4::yml::write (NodeRef &n, T const &v)
 
template<class T >
void c4::yml::write_key (NodeRef &n, T const &v)
 

Detailed Description

freestanding write() and write_key() implementing ryml's built-in serialization of fundamental types.

Function Documentation

template<class T >
void c4::yml::write ( NodeRef *  n,
T const &  v 
)
inline

Definition at line 2114 of file node.hpp.

Referenced by c4::yml::write().

2115 {
2116  n->tree()->set_serialized(n->id(), v); // defer to the tree implementation
2117 }
template<class T >
void c4::yml::write_key ( NodeRef *  n,
T const &  v 
)
inline

Definition at line 2119 of file node.hpp.

2120 {
2121  n->tree()->set_key_serialized(n->id(), v); // defer to the tree implementation
2122 }
template<class T >
void c4::yml::write ( NodeRef &  n,
T const &  v 
)
inline

Definition at line 2125 of file node.hpp.

Referenced by c4::yml::NodeRef::save(), and c4::yml::NodeRef::set_serialized().

2126 {
2127  // forward to the pointer call, to ensure the user's function is
2128  // called regardless if it is write(NodeRef*,T), write(NodeRef&,T)
2129  // or write(NodeRef,T)
2130  write(&n, v);
2131 }
void write(NodeRef &n, T const &v)
Definition: node.hpp:2125
template<class T >
void c4::yml::write_key ( NodeRef &  n,
T const &  v 
)
inline

Definition at line 2133 of file node.hpp.

Referenced by c4::yml::NodeRef::save_key(), and c4::yml::NodeRef::set_key_serialized().

2134 {
2135  // forward to the pointer call, to ensure the user's function is
2136  // called regardless if it is write(NodeRef*,T), write(NodeRef&,T)
2137  // or write(NodeRef,T)
2138  write_key(&n, v);
2139 }
void write_key(NodeRef &n, T const &v)
Definition: node.hpp:2133