|
rapidyaml
0.7.2
parse and emit YAML, and do it fast
|
Functions and classes used in the examples of this sample. More...
Modules | |
| Serialize/deserialize scalar types | |
| Serialize/deserialize container types | |
| To serialize/deserialize container types to a tree, implement the appropriate functions: | |
Classes | |
| struct | sample::ErrorHandlerExample |
| this is an example error handler, required for some of the quickstart examples. More... | |
| struct | sample::ScopedErrorHandlerExample |
| Shows how to easily create a scoped error handler. More... | |
| struct | sample::GlobalAllocatorExample |
| struct | sample::PerTreeMemoryExample |
| an example for a per-tree memory allocator More... | |
Macros | |
| #define | CHECK(predicate) assert(predicate) |
Functions | |
| bool | sample::report_check (int line, const char *predicate, bool result) |
| template<class CharContainer > | |
| CharContainer | sample::file_get_contents (const char *filename) |
| load a file from disk and return a newly created CharContainer More... | |
| template<class CharContainer > | |
| size_t | sample::file_get_contents (const char *filename, CharContainer *v) |
| load a file from disk into an existing CharContainer More... | |
| template<class CharContainer > | |
| void | sample::file_put_contents (const char *filename, CharContainer const &v, const char *access) |
| save a buffer into a file More... | |
| void | sample::file_put_contents (const char *filename, const char *buf, size_t sz, const char *access) |
| save a buffer into a file More... | |
| int | sample::report_checks () |
| sample::C4_IF_EXCEPTIONS_ (, static std::jmp_buf s_jmp_env;static std::string s_jmp_msg;) template< class Fn > bool ErrorHandlerExample | |
| this C-style callback is the one stored and used by ryml. More... | |
| void | sample::ErrorHandlerExample::on_error (const char *msg, size_t len, ryml::Location loc) |
| this is the where the callback implementation goes. More... | |
Functions and classes used in the examples of this sample.
| #define CHECK | ( | predicate | ) | assert(predicate) |
Definition at line 229 of file quickstart.cpp.
| bool sample::report_check | ( | int | line, |
| const char * | predicate, | ||
| bool | result | ||
| ) |
Definition at line 5198 of file quickstart.cpp.
| CharContainer sample::file_get_contents | ( | const char * | filename | ) |
load a file from disk and return a newly created CharContainer
Definition at line 5326 of file quickstart.cpp.
| size_t sample::file_get_contents | ( | const char * | filename, |
| CharContainer * | v | ||
| ) |
load a file from disk into an existing CharContainer
Definition at line 5307 of file quickstart.cpp.
| void sample::file_put_contents | ( | const char * | filename, |
| CharContainer const & | v, | ||
| const char * | access = "wb" |
||
| ) |
save a buffer into a file
Definition at line 5335 of file quickstart.cpp.
| void sample::file_put_contents | ( | const char * | filename, |
| const char * | buf, | ||
| size_t | sz, | ||
| const char * | access | ||
| ) |
save a buffer into a file
Definition at line 5341 of file quickstart.cpp.
Referenced by sample::sample_parse_file().
| int sample::report_checks | ( | ) |
Definition at line 5212 of file quickstart.cpp.
| sample::C4_IF_EXCEPTIONS_ | ( | static std::jmp_buf s_jmp_env;static std::string s_jmp_msg; | ) |
this C-style callback is the one stored and used by ryml.
It is a trampoline function calling on_error()
Definition at line 5225 of file quickstart.cpp.
| void sample::ErrorHandlerExample::on_error | ( | const char * | msg, |
| size_t | len, | ||
| ryml::Location | loc | ||
| ) |
this is the where the callback implementation goes.
Remember that it must not return.
Definition at line 5264 of file quickstart.cpp.
References c4::yml::Location::col, c4::yml::Location::line, c4::yml::Location::name, and c4::yml::Location::offset.