|
rapidyaml 0.16.0
parse and emit YAML, and do it fast
|
The event handler to create a ryml Tree. More...
#include <event_handler_tree.hpp>
Public Types | |
types | |
| enum | { requires_strings_on_buffers = false } |
| using | state = EventHandlerTreeState |
Public Member Functions | |
construction and resetting | |
| EventHandlerTree () noexcept | |
| EventHandlerTree (Callbacks const &cb) noexcept | |
| EventHandlerTree (Tree *tree, id_type id) | |
| void | reset (Tree *tree, id_type id) |
| Callbacks const & | callbacks () const |
| TagDirectives & | tag_directives () |
| TagCache & | tag_cache () |
parse events | |
| void | start_parse (const char *filename, substr ymlsrc) |
| void | finish_parse () |
| void | cancel_parse () |
YAML stream events | |
| void | begin_stream () const noexcept |
| void | end_stream () const noexcept |
YAML document events | |
| void | begin_doc () |
| implicit doc start (without —) | |
| void | end_doc () |
| implicit doc end (without ...) | |
| void | begin_doc_expl () |
| explicit doc start, with — | |
| void | end_doc_expl () |
| explicit doc end, with ... | |
YAML map events | |
| void | begin_map_key_flow () |
| void | begin_map_key_block () |
| void | begin_map_val_flow () |
| void | begin_map_val_block () |
| void | end_map_block () |
| void | end_map_flow (bool multiline, type_bits multiline_style=FLOW_ML1) |
YAML seq events | |
| void | begin_seq_key_flow () |
| void | begin_seq_key_block () |
| void | begin_seq_val_flow () |
| void | begin_seq_val_block () |
| void | end_seq_block () |
| void | end_seq_flow (bool multiline, type_bits multiline_style=FLOW_ML1) |
YAML structure events | |
| void | add_sibling () |
| void | actually_val_is_first_key_of_new_map_flow () |
| reset the previous val as the first key of a new map, with flow style. | |
| void | actually_val_is_first_key_of_new_map_block () |
| like its flow counterpart, but this function can only be called after the end of a flow-val at root or doc level. | |
YAML scalar events | |
| void | set_key_scalar_plain_empty () noexcept |
| void | set_val_scalar_plain_empty () noexcept |
| void | set_key_scalar_plain (csubstr scalar) noexcept |
| void | set_val_scalar_plain (csubstr scalar) noexcept |
| void | set_key_scalar_dquoted (csubstr scalar) noexcept |
| void | set_val_scalar_dquoted (csubstr scalar) noexcept |
| void | set_key_scalar_squoted (csubstr scalar) noexcept |
| void | set_val_scalar_squoted (csubstr scalar) noexcept |
| void | set_key_scalar_literal (csubstr scalar) noexcept |
| void | set_val_scalar_literal (csubstr scalar) noexcept |
| void | set_key_scalar_folded (csubstr scalar) noexcept |
| void | set_val_scalar_folded (csubstr scalar) noexcept |
| void | mark_key_scalar_unfiltered () noexcept |
| void | mark_val_scalar_unfiltered () noexcept |
YAML anchor/reference events | |
| void | set_key_anchor (csubstr anchor) |
| void | set_val_anchor (csubstr anchor) |
| void | set_key_ref (csubstr ref) |
| void | set_val_ref (csubstr ref) |
YAML tag events | |
| void | set_key_tag (csubstr tag) |
| void | set_val_tag (csubstr tag) |
YAML directive events | |
| void | add_directive_yaml (csubstr yaml_version) |
| void | add_directive_tag (csubstr handle, csubstr prefix) |
arena functions | |
| substr | arena () |
| substr | arena_rem () |
| substr | alloc_arena (size_t len) |
Public Attributes | |
| detail::stack< state > | m_stack |
| state * | m_curr |
| current stack level: top of the stack. cached here for easier access. | |
| state * | m_parent |
| parent of the current stack level. | |
| substr | m_src |
Protected Member Functions | |
| void | _stack_start_parse (const char *filename, substr ymlsrc) |
| void | _stack_finish_parse () |
| void | _stack_reset_root () |
| void | _stack_reset_non_root () |
| void | _stack_push () |
| void | _stack_pop () |
| bool | _stack_should_push_on_begin_doc () const |
| bool | _stack_should_pop_on_end_doc () const |
The event handler to create a ryml Tree.
See the documentation for Event Handlers, which has important notes about the event model used by rapidyaml.
Definition at line 43 of file event_handler_tree.hpp.
| using c4::yml::EventHandlerTree::state = EventHandlerTreeState |
Definition at line 49 of file event_handler_tree.hpp.
| anonymous enum |
| Enumerator | |
|---|---|
| requires_strings_on_buffers | |
Definition at line 50 of file event_handler_tree.hpp.
|
inlinenoexcept |
Definition at line 76 of file event_handler_tree.hpp.
|
inlinenoexcept |
Definition at line 77 of file event_handler_tree.hpp.
Definition at line 78 of file event_handler_tree.hpp.
Definition at line 83 of file event_handler_tree.hpp.
Referenced by EventHandlerTree().
|
inline |
Definition at line 109 of file event_handler_tree.hpp.
Referenced by EventHandlerTree(), and sample_error_visit_location().
|
inline |
Definition at line 111 of file event_handler_tree.hpp.
|
inline |
Definition at line 112 of file event_handler_tree.hpp.
|
inline |
Definition at line 121 of file event_handler_tree.hpp.
|
inline |
Definition at line 127 of file event_handler_tree.hpp.
|
inline |
Definition at line 146 of file event_handler_tree.hpp.
|
inlinenoexcept |
Definition at line 158 of file event_handler_tree.hpp.
|
inlinenoexcept |
Definition at line 160 of file event_handler_tree.hpp.
|
inline |
implicit doc start (without —)
Definition at line 170 of file event_handler_tree.hpp.
|
inline |
implicit doc end (without ...)
Definition at line 183 of file event_handler_tree.hpp.
|
inline |
explicit doc start, with —
Definition at line 196 of file event_handler_tree.hpp.
|
inline |
explicit doc end, with ...
Definition at line 235 of file event_handler_tree.hpp.
|
inline |
Definition at line 254 of file event_handler_tree.hpp.
|
inline |
Definition at line 258 of file event_handler_tree.hpp.
|
inline |
Definition at line 263 of file event_handler_tree.hpp.
Referenced by actually_val_is_first_key_of_new_map_flow().
|
inline |
Definition at line 271 of file event_handler_tree.hpp.
|
inline |
Definition at line 280 of file event_handler_tree.hpp.
|
inline |
Definition at line 286 of file event_handler_tree.hpp.
|
inline |
Definition at line 304 of file event_handler_tree.hpp.
|
inline |
Definition at line 308 of file event_handler_tree.hpp.
|
inline |
Definition at line 313 of file event_handler_tree.hpp.
|
inline |
|
inline |
Definition at line 330 of file event_handler_tree.hpp.
|
inline |
Definition at line 336 of file event_handler_tree.hpp.
|
inline |
Definition at line 354 of file event_handler_tree.hpp.
|
inline |
reset the previous val as the first key of a new map, with flow style.
See the documentation for Event Handlers, which has important notes about this event.
Definition at line 377 of file event_handler_tree.hpp.
|
inline |
like its flow counterpart, but this function can only be called after the end of a flow-val at root or doc level.
See the documentation for Event Handlers, which has important notes about this event.
Definition at line 399 of file event_handler_tree.hpp.
|
inlinenoexcept |
Definition at line 412 of file event_handler_tree.hpp.
|
inlinenoexcept |
Definition at line 418 of file event_handler_tree.hpp.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Definition at line 439 of file event_handler_tree.hpp.
|
inlinenoexcept |
Definition at line 445 of file event_handler_tree.hpp.
|
inlinenoexcept |
Definition at line 453 of file event_handler_tree.hpp.
|
inlinenoexcept |
Definition at line 459 of file event_handler_tree.hpp.
|
inlinenoexcept |
Definition at line 467 of file event_handler_tree.hpp.
|
inlinenoexcept |
Definition at line 473 of file event_handler_tree.hpp.
|
inlinenoexcept |
Definition at line 481 of file event_handler_tree.hpp.
|
inlinenoexcept |
Definition at line 487 of file event_handler_tree.hpp.
|
inlinenoexcept |
Definition at line 495 of file event_handler_tree.hpp.
|
inlinenoexcept |
Definition at line 499 of file event_handler_tree.hpp.
|
inline |
Definition at line 511 of file event_handler_tree.hpp.
|
inline |
Definition at line 520 of file event_handler_tree.hpp.
|
inline |
Definition at line 530 of file event_handler_tree.hpp.
|
inline |
Definition at line 539 of file event_handler_tree.hpp.
|
inline |
Definition at line 556 of file event_handler_tree.hpp.
|
inline |
Definition at line 562 of file event_handler_tree.hpp.
|
inline |
Definition at line 576 of file event_handler_tree.hpp.
Definition at line 582 of file event_handler_tree.hpp.
|
inline |
Definition at line 596 of file event_handler_tree.hpp.
|
inline |
Definition at line 601 of file event_handler_tree.hpp.
|
inline |
Definition at line 606 of file event_handler_tree.hpp.
|
inlineprotectedinherited |
Definition at line 58 of file event_handler_stack.hpp.
Referenced by c4::yml::EventHandlerTree::start_parse().
|
inlineprotectedinherited |
Definition at line 65 of file event_handler_stack.hpp.
Referenced by c4::yml::EventHandlerTree::finish_parse().
|
inlineprotectedinherited |
Definition at line 71 of file event_handler_stack.hpp.
Referenced by c4::yml::EventHandlerTree::reset().
|
inlineprotectedinherited |
Definition at line 79 of file event_handler_stack.hpp.
Referenced by c4::yml::EventHandlerTree::reset().
|
inlineprotectedinherited |
|
inlineprotectedinherited |
Definition at line 96 of file event_handler_stack.hpp.
|
inlineprotectedinherited |
Definition at line 121 of file event_handler_stack.hpp.
Referenced by c4::yml::EventHandlerTree::begin_doc().
|
inlineprotectedinherited |
Definition at line 127 of file event_handler_stack.hpp.
Referenced by c4::yml::EventHandlerTree::end_doc(), and c4::yml::EventHandlerTree::end_doc_expl().
|
inherited |
Definition at line 46 of file event_handler_stack.hpp.
Referenced by c4::yml::EventHandlerTree::actually_val_is_first_key_of_new_map_block(), c4::yml::EventHandlerTree::actually_val_is_first_key_of_new_map_flow(), c4::yml::EventHandlerTree::add_directive_tag(), c4::yml::EventHandlerTree::add_sibling(), c4::yml::EventHandlerTree::arena(), c4::yml::EventHandlerTree::arena_rem(), c4::yml::EventHandlerTree::begin_doc_expl(), c4::yml::EventHandlerTree::begin_map_key_block(), c4::yml::EventHandlerTree::begin_map_key_flow(), c4::yml::EventHandlerTree::begin_map_val_block(), c4::yml::EventHandlerTree::begin_map_val_flow(), c4::yml::EventHandlerTree::begin_seq_key_block(), c4::yml::EventHandlerTree::begin_seq_key_flow(), c4::yml::EventHandlerTree::begin_seq_val_block(), c4::yml::EventHandlerTree::begin_seq_val_flow(), c4::yml::EventHandlerTree::callbacks(), c4::yml::EventHandlerTree::finish_parse(), c4::yml::EventHandlerTree::reset(), c4::yml::EventHandlerTree::set_key_anchor(), c4::yml::EventHandlerTree::set_key_ref(), c4::yml::EventHandlerTree::set_val_anchor(), c4::yml::EventHandlerTree::set_val_ref(), and c4::yml::EventHandlerTree::start_parse().
|
inherited |
current stack level: top of the stack. cached here for easier access.
Definition at line 47 of file event_handler_stack.hpp.
Referenced by c4::yml::EventHandlerTree::actually_val_is_first_key_of_new_map_block(), c4::yml::EventHandlerTree::actually_val_is_first_key_of_new_map_flow(), c4::yml::EventHandlerTree::add_directive_tag(), c4::yml::EventHandlerTree::add_sibling(), c4::yml::EventHandlerTree::begin_doc(), c4::yml::EventHandlerTree::begin_doc_expl(), c4::yml::EventHandlerTree::begin_map_key_block(), c4::yml::EventHandlerTree::begin_map_key_flow(), c4::yml::EventHandlerTree::begin_map_val_block(), c4::yml::EventHandlerTree::begin_map_val_flow(), c4::yml::EventHandlerTree::begin_seq_key_block(), c4::yml::EventHandlerTree::begin_seq_key_flow(), c4::yml::EventHandlerTree::begin_seq_val_block(), c4::yml::EventHandlerTree::begin_seq_val_flow(), c4::yml::EventHandlerTree::end_map_block(), c4::yml::EventHandlerTree::end_map_flow(), c4::yml::EventHandlerTree::end_seq_block(), c4::yml::EventHandlerTree::end_seq_flow(), c4::yml::EventHandlerTree::reset(), c4::yml::EventHandlerTree::set_key_anchor(), c4::yml::EventHandlerTree::set_key_ref(), c4::yml::EventHandlerTree::set_key_scalar_dquoted(), c4::yml::EventHandlerTree::set_key_scalar_folded(), c4::yml::EventHandlerTree::set_key_scalar_literal(), c4::yml::EventHandlerTree::set_key_scalar_plain(), c4::yml::EventHandlerTree::set_key_scalar_plain_empty(), c4::yml::EventHandlerTree::set_key_scalar_squoted(), c4::yml::EventHandlerTree::set_key_tag(), c4::yml::EventHandlerTree::set_val_anchor(), c4::yml::EventHandlerTree::set_val_ref(), c4::yml::EventHandlerTree::set_val_scalar_dquoted(), c4::yml::EventHandlerTree::set_val_scalar_folded(), c4::yml::EventHandlerTree::set_val_scalar_literal(), c4::yml::EventHandlerTree::set_val_scalar_plain(), c4::yml::EventHandlerTree::set_val_scalar_plain_empty(), c4::yml::EventHandlerTree::set_val_scalar_squoted(), and c4::yml::EventHandlerTree::set_val_tag().
|
inherited |
parent of the current stack level.
Definition at line 48 of file event_handler_stack.hpp.
Referenced by c4::yml::EventHandlerTree::actually_val_is_first_key_of_new_map_flow(), c4::yml::EventHandlerTree::add_sibling(), c4::yml::EventHandlerTree::end_map_block(), c4::yml::EventHandlerTree::end_map_flow(), c4::yml::EventHandlerTree::end_seq_block(), c4::yml::EventHandlerTree::end_seq_flow(), and c4::yml::EventHandlerTree::reset().
|
inherited |
Definition at line 49 of file event_handler_stack.hpp.