rapidyaml 0.15.2
parse and emit YAML, and do it fast
Loading...
Searching...
No Matches
tree.hpp File Reference
#include "c4/error.hpp"
#include "c4/language.hpp"
#include "c4/yml/fwd.hpp"
#include "c4/yml/common.hpp"
#include "c4/yml/node_type.hpp"
#include "c4/yml/tag.hpp"
#include "c4/yml/error.hpp"
#include "c4/yml/scalar_charconv.hpp"
#include <math.h>
#include <limits.h>

Go to the source code of this file.

Classes

struct  c4::yml::NodeScalar
 a node scalar is a csubstr, which may be tagged and anchored. More...
struct  c4::yml::NodeData
 contains the data for each YAML node. More...
class  c4::yml::Tree
struct  c4::yml::Tree::lookup_result

Namespaces

namespace  c4
namespace  c4::yml

Functions

template<class T>
csubstr c4::yml::serialize_to_arena_scalar (Tree *tree, T const &scalar)
 Serialize a scalar to the tree's arena.
csubstr c4::yml::serialize_to_arena_str (Tree *tree, csubstr scalar)
 Serialize a string type (as specified by c4::is_string) to a tree's arena, ensuring that there is an entry for the string in the arena even if the string is empty.
template<class T>
csubstr c4::yml::serialize_to_arena (Tree *tree, T const &scalar)
 Serialize a scalar to a tree's arena, dispatching to either serialize_to_arena_scalar() or serialize_to_arena_str() when the type is a string according to c4::is_string.
csubstr c4::yml::serialize_to_arena (Tree *, std::nullptr_t) noexcept
 implementation for null values
template<class T>
type_bits c4::yml::scalar_flags_val (T const &) noexcept
 Return extra style flags to use when setting a scalar as val.
template<class T>
type_bits c4::yml::scalar_flags_key (T const &) noexcept
 Return extra style flags to use when setting a scalar as key.
template<class T>
void c4::yml::write (Tree *tree, id_type id, T const &v)
 Serialize a variable to the tree's arena, and set it as the node's val.
template<class T>
void c4::yml::write_key (Tree *tree, id_type id, T const &v)
 Serialize a variable to the tree's arena, and set it as the node's key.
template<class T>
ReadResult c4::yml::read (Tree const *tree, id_type id, T *v)
 Deserialize a scalar node's val from a tree object, returning false if the conversion failed.
template<class Wrapper>
ReadResult c4::yml::read (Tree const *tree, id_type id, Wrapper const &w)
 overload to enable use of wrapper tag-types like eg c4::fmt::base64()
template<class T>
ReadResult c4::yml::read_key (Tree const *tree, id_type id, T *v)
 Deserialize a node's key from a tree object, returning false if the conversion failed.
template<class Wrapper>
ReadResult c4::yml::read_key (Tree const *tree, id_type id, Wrapper const &w)
 overload to enable use of wrapper tag-types like eg c4::fmt::base64()