rapidyaml 0.15.2
parse and emit YAML, and do it fast
Loading...
Searching...
No Matches
Serialize/deserialize scalar types

Classes

struct  vec2< T >
 example scalar type, serialized and deserialized More...
struct  vec3< T >
 example scalar type, serialized and deserialized More...
struct  vec4< T >
 example scalar type, serialized and deserialized More...
struct  parse_only_vec2< T >
 example scalar type, deserialized only More...
struct  parse_only_vec3< T >
 example scalar type, deserialized only More...
struct  parse_only_vec4< T >
 example scalar type, deserialized only More...
struct  emit_only_vec2< T >
 example scalar type, serialized only More...
struct  emit_only_vec3< T >
 example scalar type, serialized only More...
struct  emit_only_vec4< T >
 example scalar type, serialized only More...

Functions

template<class T>
size_t to_chars (ryml::substr buf, vec2< T > v)
template<class T>
size_t to_chars (ryml::substr buf, vec3< T > v)
template<class T>
size_t to_chars (ryml::substr buf, vec4< T > v)
template<class T>
size_t to_chars (ryml::substr buf, emit_only_vec2< T > v)
template<class T>
size_t to_chars (ryml::substr buf, emit_only_vec3< T > v)
template<class T>
size_t to_chars (ryml::substr buf, emit_only_vec4< T > v)
template<class T>
bool from_chars (ryml::csubstr buf, vec2< T > *v)
template<class T>
bool from_chars (ryml::csubstr buf, vec3< T > *v)
template<class T>
bool from_chars (ryml::csubstr buf, vec4< T > *v)
template<class T>
bool from_chars (ryml::csubstr buf, parse_only_vec2< T > *v)
template<class T>
bool from_chars (ryml::csubstr buf, parse_only_vec3< T > *v)
template<class T>
bool from_chars (ryml::csubstr buf, parse_only_vec4< T > *v)

Detailed Description

Function Documentation

◆ to_chars() [1/6]

template<class T>
size_t to_chars ( ryml::substr buf,
vec2< T > v )

Definition at line 3981 of file quickstart.cpp.

3981{ return ryml::format(buf, "({},{})", v.x, v.y); }
size_t format(substr buf, csubstr fmt, Arg const &a, Args const &...more)
Using a format string, serialize the arguments into the given fixed-size buffer.
Definition format.hpp:936

Referenced by c4::to_chars(), c4::to_chars(), c4::to_chars(), and c4::to_chars_sub().

◆ to_chars() [2/6]

template<class T>
size_t to_chars ( ryml::substr buf,
vec3< T > v )

Definition at line 3982 of file quickstart.cpp.

3982{ return ryml::format(buf, "({},{},{})", v.x, v.y, v.z); }

◆ to_chars() [3/6]

template<class T>
size_t to_chars ( ryml::substr buf,
vec4< T > v )

Definition at line 3983 of file quickstart.cpp.

3983{ return ryml::format(buf, "({},{},{},{})", v.x, v.y, v.z, v.w); }

◆ to_chars() [4/6]

template<class T>
size_t to_chars ( ryml::substr buf,
emit_only_vec2< T > v )

Definition at line 3985 of file quickstart.cpp.

3985{ return ryml::format(buf, "({},{})", v.x, v.y); }

◆ to_chars() [5/6]

template<class T>
size_t to_chars ( ryml::substr buf,
emit_only_vec3< T > v )

Definition at line 3986 of file quickstart.cpp.

3986{ return ryml::format(buf, "({},{},{})", v.x, v.y, v.z); }

◆ to_chars() [6/6]

template<class T>
size_t to_chars ( ryml::substr buf,
emit_only_vec4< T > v )

Definition at line 3987 of file quickstart.cpp.

3987{ return ryml::format(buf, "({},{},{},{})", v.x, v.y, v.z, v.w); }

◆ from_chars() [1/6]

template<class T>
bool from_chars ( ryml::csubstr buf,
vec2< T > * v )

Definition at line 3992 of file quickstart.cpp.

3992{ size_t ret = ryml::unformat(buf, "({},{})", v->x, v->y); return ret != ryml::yml::npos; }
size_t unformat(csubstr buf, csubstr fmt, Arg &a, Args &...more)
using a format string, deserialize the arguments from the given buffer.
Definition format.hpp:987

Referenced by c4::from_chars(), c4::from_chars(), c4::yml::read_key(), and sample_serialize_basic().

◆ from_chars() [2/6]

template<class T>
bool from_chars ( ryml::csubstr buf,
vec3< T > * v )

Definition at line 3993 of file quickstart.cpp.

3993{ size_t ret = ryml::unformat(buf, "({},{},{})", v->x, v->y, v->z); return ret != ryml::yml::npos; }

◆ from_chars() [3/6]

template<class T>
bool from_chars ( ryml::csubstr buf,
vec4< T > * v )

Definition at line 3994 of file quickstart.cpp.

3994{ size_t ret = ryml::unformat(buf, "({},{},{},{})", v->x, v->y, v->z, v->w); return ret != ryml::yml::npos; }

◆ from_chars() [4/6]

template<class T>
bool from_chars ( ryml::csubstr buf,
parse_only_vec2< T > * v )

Definition at line 3996 of file quickstart.cpp.

3996{ size_t ret = ryml::unformat(buf, "({},{})", v->x, v->y); return ret != ryml::yml::npos; }

◆ from_chars() [5/6]

template<class T>
bool from_chars ( ryml::csubstr buf,
parse_only_vec3< T > * v )

Definition at line 3997 of file quickstart.cpp.

3997{ size_t ret = ryml::unformat(buf, "({},{},{})", v->x, v->y, v->z); return ret != ryml::yml::npos; }

◆ from_chars() [6/6]

template<class T>
bool from_chars ( ryml::csubstr buf,
parse_only_vec4< T > * v )

Definition at line 3998 of file quickstart.cpp.

3998{ size_t ret = ryml::unformat(buf, "({},{},{},{})", v->x, v->y, v->z, v->w); return ret != ryml::yml::npos; }