|
rapidyaml
0.8.0
parse and emit YAML, and do it fast
|
Functions called by ryml to allocate/free memory and to report errors. More...
Classes | |
| struct | c4::yml::Callbacks |
| a c-style callbacks class. More... | |
Typedefs | |
| using | c4::yml::pfn_error = void(*)(const char *msg, size_t msg_len, Location location, void *user_data) |
| the type of the function used to report errors More... | |
| using | c4::yml::pfn_allocate = void *(*)(size_t len, void *hint, void *user_data) |
| the type of the function used to allocate memory; ryml will only allocate memory through this callback. More... | |
| using | c4::yml::pfn_free = void(*)(void *mem, size_t size, void *user_data) |
| the type of the function used to free memory; ryml will only free memory through this callback. More... | |
Functions | |
| void | c4::yml::set_callbacks (Callbacks const &c) |
| set the global callbacks for the library; after a call to this function, these callbacks will be used by newly created objects (unless they are copying older objects with different callbacks). More... | |
| Callbacks const & | c4::yml::get_callbacks () |
| get the global callbacks More... | |
| void | c4::yml::reset_callbacks () |
| set the global callbacks back to their defaults () More... | |
Functions called by ryml to allocate/free memory and to report errors.
| using c4::yml::pfn_error = typedef void (*) (const char* msg, size_t msg_len, Location location, void *user_data) |
the type of the function used to report errors
std::longjmp() (see documentation) or by calling std::abort(). If the function returned, the parser would enter into an infinite loop, or the program may crash. Definition at line 360 of file common.hpp.
| using c4::yml::pfn_allocate = typedef void* (*)(size_t len, void* hint, void *user_data) |
the type of the function used to allocate memory; ryml will only allocate memory through this callback.
Definition at line 365 of file common.hpp.
| using c4::yml::pfn_free = typedef void (*)(void* mem, size_t size, void *user_data) |
the type of the function used to free memory; ryml will only free memory through this callback.
Definition at line 370 of file common.hpp.
| void c4::yml::set_callbacks | ( | Callbacks const & | c | ) |
set the global callbacks for the library; after a call to this function, these callbacks will be used by newly created objects (unless they are copying older objects with different callbacks).
If RYML_NO_DEFAULT_CALLBACKS is defined, it is mandatory to call this function prior to using any other library facility.
Definition at line 113 of file common.cpp.
Referenced by sample::ScopedErrorHandlerExample::ScopedErrorHandlerExample(), sample::ScopedErrorHandlerExample::~ScopedErrorHandlerExample(), c4::yml::reset_callbacks(), sample::sample_error_handler(), and sample::sample_global_allocator().
| Callbacks const & c4::yml::get_callbacks | ( | ) |
get the global callbacks
Definition at line 118 of file common.cpp.
Referenced by sample::ErrorHandlerExample::check_effect(), and sample::sample_global_allocator().
| void c4::yml::reset_callbacks | ( | ) |
set the global callbacks back to their defaults ()
Definition at line 123 of file common.cpp.
References c4::yml::set_callbacks().