|
| static void * | s_allocate (size_t len, void *, void *this_) |
| |
| static void | s_free (void *mem, size_t len, void *this_) |
| |
Definition at line 5569 of file quickstart.cpp.
◆ ~GlobalAllocatorExample()
| GlobalAllocatorExample::~GlobalAllocatorExample |
( |
| ) |
|
|
inline |
◆ allocate()
| void* GlobalAllocatorExample::allocate |
( |
size_t |
len | ) |
|
|
inline |
Definition at line 5575 of file quickstart.cpp.
5581 tree[
"float"] >> intval;
5590 CHECK(!msg.empty());
void parse_in_arena(Parser *parser, csubstr filename, csubstr yaml, Tree *t, id_type node_id)
(1) parse YAML into an existing tree node. The filename will be used in any error messages arising du...
#define CHECK(predicate)
a quick'n'dirty assertion to verify a predicate
csubstr to_csubstr(substr s) noexcept
neutral version for use in generic code
Location cpploc
location in the C++ source file where the error was detected.
Tree const * tree
tree where the error was detected
id_type node
node where the error was detected
const char * what() const noexcept override
Exception thrown by the default visit error implementation.
ErrorDataVisit errdata_visit
csubstr name
name of the file
References CHECK, c4::yml::ErrorDataVisit::cpploc, c4::yml::ExceptionVisit::errdata_visit, c4::yml::Tree::id(), c4::yml::Location::name, c4::yml::ErrorDataVisit::node, c4::yml::parse_in_arena(), c4::to_csubstr(), c4::yml::ErrorDataVisit::tree, and c4::yml::ExceptionBasic::what().
◆ free()
| void GlobalAllocatorExample::free |
( |
void * |
mem, |
|
|
size_t |
len |
|
) |
| |
|
inline |
Definition at line 5597 of file quickstart.cpp.
5602 tree[
"float"] >> intval;
Exception thrown by the default basic error implementation.
◆ callbacks()
◆ s_allocate()
| static void* GlobalAllocatorExample::s_allocate |
( |
size_t |
len, |
|
|
void * |
, |
|
|
void * |
this_ |
|
) |
| |
|
inlinestatic |
◆ s_free()
| static void GlobalAllocatorExample::s_free |
( |
void * |
mem, |
|
|
size_t |
len, |
|
|
void * |
this_ |
|
) |
| |
|
inlinestatic |
Definition at line 5618 of file quickstart.cpp.
5618 : when the tree is obtained from parsing
YAML, the messages
5619 * may be enriched by
using a parser set to track the locations. See
void sample_location_tracking()
demonstrates how to obtain the (zero-based) location of a node from a recently parsed tree
◆ check_and_reset()
| void GlobalAllocatorExample::check_and_reset |
( |
| ) |
|
|
inline |
Definition at line 5628 of file quickstart.cpp.
5634 ryml::csubstr ymlfile =
"file.yml";
5635 ryml::csubstr ymlsrc = R
"(foo: bar
This is the main driver of parsing logic: it scans the YAML or JSON source for tokens,...
The event handler to create a ryml Tree.
◆ memory_pool
| std::vector<char> GlobalAllocatorExample::memory_pool = std::vector<char>(10u * 1024u) |
◆ num_allocs
| size_t GlobalAllocatorExample::num_allocs = 0 |
◆ alloc_size
| size_t GlobalAllocatorExample::alloc_size = 0 |
◆ corr_size
| size_t GlobalAllocatorExample::corr_size = 0 |
◆ num_deallocs
| size_t GlobalAllocatorExample::num_deallocs = 0 |
◆ dealloc_size
| size_t GlobalAllocatorExample::dealloc_size = 0 |
The documentation for this struct was generated from the following file:
- /home/docs/checkouts/readthedocs.org/user_builds/rapidyaml/checkouts/v0.12.0/samples/quickstart.cpp