|
rapidyaml
0.12.1
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 () | |
| EventHandlerTree (Callbacks const &cb) | |
| 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 —) More... | |
| void | end_doc () |
| implicit doc end (without ...) More... | |
| void | begin_doc_expl () |
| explicit doc start, with — More... | |
| void | end_doc_expl () |
| explicit doc end, with ... More... | |
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) |
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) |
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. More... | |
| 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. More... | |
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. More... | |
| state * | m_parent |
| parent of the current stack level. More... | |
| 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 33 of file event_handler_tree.hpp.
| using c4::yml::EventHandlerTree::state = EventHandlerTreeState |
Definition at line 39 of file event_handler_tree.hpp.
| anonymous enum |
| Enumerator | |
|---|---|
| requires_strings_on_buffers | |
Definition at line 40 of file event_handler_tree.hpp.
|
inline |
Definition at line 66 of file event_handler_tree.hpp.
|
inline |
Definition at line 67 of file event_handler_tree.hpp.
Definition at line 68 of file event_handler_tree.hpp.
Definition at line 73 of file event_handler_tree.hpp.
References c4::yml::Tree::callbacks(), c4::yml::Tree::capacity(), c4::yml::TagCache::clear(), c4::yml::Tree::has_key(), c4::yml::Tree::is_map(), c4::yml::Tree::is_root(), and c4::yml::Tree::parent().
|
inline |
Definition at line 99 of file event_handler_tree.hpp.
|
inline |
Definition at line 101 of file event_handler_tree.hpp.
|
inline |
Definition at line 102 of file event_handler_tree.hpp.
|
inline |
Definition at line 111 of file event_handler_tree.hpp.
|
inline |
Definition at line 117 of file event_handler_tree.hpp.
|
inline |
Definition at line 136 of file event_handler_tree.hpp.
|
inlinenoexcept |
Definition at line 148 of file event_handler_tree.hpp.
|
inlinenoexcept |
Definition at line 150 of file event_handler_tree.hpp.
|
inline |
implicit doc start (without —)
Definition at line 160 of file event_handler_tree.hpp.
References c4::yml::DOC.
|
inline |
implicit doc end (without ...)
Definition at line 173 of file event_handler_tree.hpp.
|
inline |
explicit doc start, with —
Definition at line 186 of file event_handler_tree.hpp.
References c4::yml::DOC, and c4::yml::NONE.
|
inline |
|
inline |
Definition at line 244 of file event_handler_tree.hpp.
|
inline |
Definition at line 248 of file event_handler_tree.hpp.
|
inline |
Definition at line 253 of file event_handler_tree.hpp.
References _has_any_, c4::yml::FLOW_SL, c4::yml::MAP, and c4::yml::VAL.
|
inline |
Definition at line 261 of file event_handler_tree.hpp.
References _has_any_, c4::yml::BLOCK, c4::yml::MAP, and c4::yml::VAL.
|
inline |
Definition at line 270 of file event_handler_tree.hpp.
|
inline |
Definition at line 276 of file event_handler_tree.hpp.
References c4::yml::FLOW_ML, and c4::yml::FLOW_SL.
|
inline |
Definition at line 294 of file event_handler_tree.hpp.
|
inline |
Definition at line 298 of file event_handler_tree.hpp.
|
inline |
Definition at line 303 of file event_handler_tree.hpp.
References _has_any_, c4::yml::FLOW_SL, c4::yml::SEQ, and c4::yml::VAL.
|
inline |
Definition at line 311 of file event_handler_tree.hpp.
References _has_any_, c4::yml::BLOCK, c4::yml::SEQ, and c4::yml::VAL.
|
inline |
Definition at line 320 of file event_handler_tree.hpp.
|
inline |
Definition at line 326 of file event_handler_tree.hpp.
References c4::yml::FLOW_ML, and c4::yml::FLOW_SL.
|
inline |
|
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 361 of file event_handler_tree.hpp.
References c4::yml::_VALMASK, c4::yml::NodeData::m_key, c4::yml::NodeData::m_type, c4::yml::VAL_STYLE, and c4::yml::VALNIL.
|
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 383 of file event_handler_tree.hpp.
|
inlinenoexcept |
Definition at line 396 of file event_handler_tree.hpp.
References c4::yml::KEY, c4::yml::KEY_PLAIN, and c4::yml::KEYNIL.
|
inlinenoexcept |
Definition at line 402 of file event_handler_tree.hpp.
References c4::yml::VAL, c4::yml::VAL_PLAIN, and c4::yml::VALNIL.
|
inlinenoexcept |
Definition at line 409 of file event_handler_tree.hpp.
References c4::yml::KEY, and c4::yml::KEY_PLAIN.
|
inlinenoexcept |
Definition at line 415 of file event_handler_tree.hpp.
References c4::yml::VAL, and c4::yml::VAL_PLAIN.
|
inlinenoexcept |
Definition at line 423 of file event_handler_tree.hpp.
References c4::yml::KEY, and c4::yml::KEY_DQUO.
|
inlinenoexcept |
Definition at line 429 of file event_handler_tree.hpp.
References c4::yml::VAL, and c4::yml::VAL_DQUO.
|
inlinenoexcept |
Definition at line 437 of file event_handler_tree.hpp.
References c4::yml::KEY, and c4::yml::KEY_SQUO.
|
inlinenoexcept |
Definition at line 443 of file event_handler_tree.hpp.
References c4::yml::VAL, and c4::yml::VAL_SQUO.
|
inlinenoexcept |
Definition at line 451 of file event_handler_tree.hpp.
References c4::yml::KEY, and c4::yml::KEY_LITERAL.
|
inlinenoexcept |
Definition at line 457 of file event_handler_tree.hpp.
References c4::yml::VAL, and c4::yml::VAL_LITERAL.
|
inlinenoexcept |
Definition at line 465 of file event_handler_tree.hpp.
References c4::yml::KEY, and c4::yml::KEY_FOLDED.
|
inlinenoexcept |
Definition at line 471 of file event_handler_tree.hpp.
References c4::yml::VAL, and c4::yml::VAL_FOLDED.
|
inlinenoexcept |
Definition at line 479 of file event_handler_tree.hpp.
References c4::yml::KEY_UNFILT.
|
inlinenoexcept |
Definition at line 483 of file event_handler_tree.hpp.
References c4::yml::VAL_UNFILT.
|
inline |
Definition at line 495 of file event_handler_tree.hpp.
References _has_any_, c4::yml::KEYANCH, and c4::yml::KEYREF.
|
inline |
Definition at line 504 of file event_handler_tree.hpp.
References _has_any_, c4::yml::VALANCH, and c4::yml::VALREF.
|
inline |
Definition at line 514 of file event_handler_tree.hpp.
References _has_any_, c4::yml::KEY, c4::yml::KEYANCH, and c4::yml::KEYREF.
|
inline |
Definition at line 525 of file event_handler_tree.hpp.
References _has_any_, c4::yml::VAL, c4::yml::VALANCH, and c4::yml::VALREF.
|
inline |
|
inline |
|
inline |
Definition at line 564 of file event_handler_tree.hpp.
|
inline |
Definition at line 570 of file event_handler_tree.hpp.
|
inline |
Definition at line 584 of file event_handler_tree.hpp.
|
inline |
Definition at line 589 of file event_handler_tree.hpp.
|
inline |
Definition at line 594 of file event_handler_tree.hpp.
|
inlineprotectedinherited |
Definition at line 58 of file event_handler_stack.hpp.
|
inlineprotectedinherited |
Definition at line 65 of file event_handler_stack.hpp.
|
inlineprotectedinherited |
|
inlineprotectedinherited |
|
inlineprotectedinherited |
|
inlineprotectedinherited |
Definition at line 96 of file event_handler_stack.hpp.
|
inlineprotectedinherited |
|
inlineprotectedinherited |
Definition at line 127 of file event_handler_stack.hpp.
|
inherited |
Definition at line 46 of file event_handler_stack.hpp.
|
inherited |
current stack level: top of the stack. cached here for easier access.
Definition at line 47 of file event_handler_stack.hpp.
|
inherited |
parent of the current stack level.
Definition at line 48 of file event_handler_stack.hpp.
|
inherited |
Definition at line 49 of file event_handler_stack.hpp.