rapidyaml 0.14.0
parse and emit YAML, and do it fast
Loading...
Searching...
No Matches
tree.hpp File Reference
#include "c4/error.hpp"
#include "c4/types.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/charconv.hpp>
#include <cmath>
#include <limits>

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::NodeInit
 convenience class to initialize nodes 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
 (Undefined by default) Use shorter error message from checks/asserts: do not show the check condition in the error message.
namespace  c4::yml

Functions

template<class T>
size_t c4::yml::to_chars_float (substr buf, T val)
 encode a floating point value to a string.
template<class T>
bool c4::yml::from_chars_float (csubstr buf, T *val)
 decode a floating point from string.
template<class T>
auto c4::yml::serialize_scalar (substr buf, T const &a) -> typename std::enable_if< std::is_floating_point< T >::value, size_t >::type
template<class T>
auto c4::yml::serialize_scalar (substr buf, T const &a) -> typename std::enable_if< ! std::is_floating_point< T >::value, size_t >::type
template<class T>
csubstr c4::yml::serialize_to_arena (Tree *tree, T const &a)
csubstr c4::yml::serialize_to_arena (Tree *tree, csubstr a)
csubstr c4::yml::serialize_to_arena (Tree *tree, substr a)
csubstr c4::yml::serialize_to_arena (Tree *tree, const char *a)
csubstr c4::yml::serialize_to_arena (Tree *, std::nullptr_t)
template<class T>
bool c4::yml::read (Tree const *tree, id_type id, T const &wrapper)
template<class T>
bool c4::yml::readkey (Tree const *tree, id_type id, T const &wrapper)
template<class T>
auto c4::yml::read (Tree const *tree, id_type id, T *v) -> typename std::enable_if<!std::is_arithmetic< T >::value, bool >::type
 convert the val of a scalar node to a particular non-arithmetic non-float type, by forwarding its val to from_chars<T>().
template<class T>
auto c4::yml::readkey (Tree const *tree, id_type id, T *v) -> typename std::enable_if<!std::is_arithmetic< T >::value, bool >::type
 convert the key of a node to a particular non-arithmetic non-float type, by forwarding its key to from_chars<T>().
template<class T>
auto c4::yml::read (Tree const *tree, id_type id, T *v) -> typename std::enable_if< std::is_arithmetic< T >::value &&!std::is_floating_point< T >::value, bool >::type
 convert the val of a scalar node to a particular arithmetic integral non-float type, by forwarding its val to from_chars<T>().
template<class T>
auto c4::yml::readkey (Tree const *tree, id_type id, T *v) -> typename std::enable_if< std::is_arithmetic< T >::value &&!std::is_floating_point< T >::value, bool >::type
 convert the key of a node to a particular arithmetic integral non-float type, by forwarding its val to from_chars<T>().
template<class T>
std::enable_if< std::is_floating_point< T >::value, bool >::type c4::yml::read (Tree const *tree, id_type id, T *v)
 convert the val of a scalar node to a floating point type, by forwarding its val to from_chars_float<T>().
template<class T>
std::enable_if< std::is_floating_point< T >::value, bool >::type c4::yml::readkey (Tree const *tree, id_type id, T *v)
 convert the key of a scalar node to a floating point type, by forwarding its key to from_chars_float<T>().