|
rapidyaml 0.15.2
parse and emit YAML, and do it fast
|
A lightweight truthy type, used to enable reporting the offending node when a deserializing error happens in nested reads. More...
#include <common.hpp>
Public Types | |
| enum | : id_type { VALID = NONE - 1 } |
Public Member Functions | |
| operator bool () const noexcept | |
| convert to boolean to signify success/error | |
| ReadResult () noexcept | |
| construct as success | |
| ReadResult (id_type node_) noexcept | |
| construct as failure on the given node id | |
| ReadResult (id_type parent_, id_type node_) noexcept | |
| construct as failure on the given parent_, IF node_ is NONE | |
| ReadResult (bool ok, id_type node_) noexcept | |
| adapter: will match legacy user code (read() implementations returning bool). | |
| ReadResult (ReadResult result, id_type) noexcept | |
| adapter: will match up-to-date user code (read() implementations returning ReadResult). | |
Public Attributes | |
| id_type | node |
A lightweight truthy type, used to enable reporting the offending node when a deserializing error happens in nested reads.
It reports the innermost node causing the error, or true (empty-initialized) when there is no error.
Definition at line 161 of file common.hpp.
| anonymous enum : id_type |
| Enumerator | |
|---|---|
| VALID | |
Definition at line 164 of file common.hpp.
|
inlinenoexcept |
|
inlineexplicitnoexcept |
construct as failure on the given node id
Definition at line 177 of file common.hpp.
construct as failure on the given parent_, IF node_ is NONE
Definition at line 181 of file common.hpp.
|
inlineexplicitnoexcept |
adapter: will match legacy user code (read() implementations returning bool).
On error, this will report node_ as the offending node.
This is an adapter ctor used by rapidyaml in the functions calling read(), and enables rapidyaml to work both with legacy and up-to-date user implementations of read(). See for example Tree::deserialize().
Definition at line 200 of file common.hpp.
|
inlineexplicitnoexcept |
adapter: will match up-to-date user code (read() implementations returning ReadResult).
On error, this will report the node in the original ReadResult.
This is an adapter ctor used by rapidyaml in the functions calling read(), and enables rapidyaml to work both with legacy and up-to-date user implementations of read(). See for example Tree::deserialize().
Definition at line 212 of file common.hpp.
|
inlinenoexcept |
convert to boolean to signify success/error
Definition at line 169 of file common.hpp.
| id_type c4::yml::ReadResult::node |
Definition at line 163 of file common.hpp.
Referenced by ReadResult(), ReadResult(), ReadResult(), ReadResult(), ReadResult(), c4::yml::detail::RoNodeMethods< NodeRef, ConstNodeRef >::load(), c4::yml::detail::RoNodeMethods< NodeRef, ConstNodeRef >::load(), c4::yml::Tree::load(), c4::yml::Tree::load(), c4::yml::detail::RoNodeMethods< NodeRef, ConstNodeRef >::load_key(), c4::yml::detail::RoNodeMethods< NodeRef, ConstNodeRef >::load_key(), c4::yml::Tree::load_key(), c4::yml::Tree::load_key(), operator bool(), and sample_deserialize_error().