|
rapidyaml 0.14.0
parse and emit YAML, and do it fast
|
To deserialize user scalar types, implement the function bool from_chars(csubstr buf, T *val); see from_chars: generalized chars to value. More...
Functions | |
| 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) |
To deserialize user scalar types, implement the function bool from_chars(csubstr buf, T *val); see from_chars: generalized chars to value.
The implementation of from_chars must never read beyond the limit of the given buffer, and must return true/false to indicate success/failure in the deserialization. On failure, it is up to you whether the value is left unchanged; ryml itself does not care about the value when the deserialization failed.
In your implementation, you may be interested in using the reading facilities in Format utilities and Charconv utilities; refer to their documentation for further details. But this is not mandatory, and anything can be used, provided that the implemented from_chars fulfills its contract, described above.
| bool from_chars | ( | ryml::csubstr | buf, |
| vec2< T > * | v ) |
Definition at line 3560 of file quickstart.cpp.
| bool from_chars | ( | ryml::csubstr | buf, |
| vec3< T > * | v ) |
Definition at line 3561 of file quickstart.cpp.
| bool from_chars | ( | ryml::csubstr | buf, |
| vec4< T > * | v ) |
Definition at line 3562 of file quickstart.cpp.
| bool from_chars | ( | ryml::csubstr | buf, |
| parse_only_vec2< T > * | v ) |
Definition at line 3564 of file quickstart.cpp.
| bool from_chars | ( | ryml::csubstr | buf, |
| parse_only_vec3< T > * | v ) |
Definition at line 3565 of file quickstart.cpp.
| bool from_chars | ( | ryml::csubstr | buf, |
| parse_only_vec4< T > * | v ) |
Definition at line 3566 of file quickstart.cpp.