|
rapidyaml
0.11.1
parse and emit YAML, and do it fast
|
Use this class a base of implementations of event handler to simplify the stack logic. More...
#include <event_handler_stack.hpp>
Public Types | |
| using | state = HandlerState |
| using | pfn_relocate_arena = detail::pfn_relocate_arena |
Public Member Functions | |
| void | check_trailing_doc_token () const |
| Check whether the current parse tokens are trailing on the previous doc, and raise an error if they are. More... | |
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... | |
| pfn_relocate_arena | m_relocate_arena |
| callback when the arena gets relocated More... | |
| void * | m_relocate_arena_data |
| csubstr | m_src |
Protected Member Functions | |
| EventHandlerStack () | |
| EventHandlerStack (Callbacks const &cb) | |
| void | _stack_start_parse (const char *filename, csubstr ymlsrc, pfn_relocate_arena relocate_arena, void *relocate_arena_data) |
| 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 |
| void | _stack_relocate_to_new_arena (csubstr prev, substr curr) |
| substr | _stack_relocate_to_new_arena (csubstr s, csubstr prev, substr curr) |
Use this class a base of implementations of event handler to simplify the stack logic.
Definition at line 41 of file event_handler_stack.hpp.
| using c4::yml::EventHandlerStack< HandlerImpl, HandlerState >::state = HandlerState |
Definition at line 46 of file event_handler_stack.hpp.
| using c4::yml::EventHandlerStack< HandlerImpl, HandlerState >::pfn_relocate_arena = detail::pfn_relocate_arena |
Definition at line 47 of file event_handler_stack.hpp.
|
inlineprotected |
Definition at line 60 of file event_handler_stack.hpp.
|
inlineprotected |
Definition at line 61 of file event_handler_stack.hpp.
|
inlineprotected |
Definition at line 65 of file event_handler_stack.hpp.
References c4::yml::EventHandlerStack< HandlerImpl, HandlerState >::m_curr, c4::yml::EventHandlerStack< HandlerImpl, HandlerState >::m_relocate_arena, c4::yml::EventHandlerStack< HandlerImpl, HandlerState >::m_relocate_arena_data, c4::yml::EventHandlerStack< HandlerImpl, HandlerState >::m_src, and c4::yml::EventHandlerStack< HandlerImpl, HandlerState >::m_stack.
|
inlineprotected |
Definition at line 76 of file event_handler_stack.hpp.
References c4::yml::EventHandlerStack< HandlerImpl, HandlerState >::m_src.
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
Definition at line 129 of file event_handler_stack.hpp.
References _has_any_, c4::yml::DOC, c4::yml::EventHandlerStack< HandlerImpl, HandlerState >::m_curr, c4::yml::EventHandlerStack< HandlerImpl, HandlerState >::m_stack, c4::yml::MAP, c4::yml::SEQ, and c4::yml::VAL.
|
inlineprotected |
Definition at line 135 of file event_handler_stack.hpp.
References _has_any_, c4::yml::DOC, and c4::yml::EventHandlerStack< HandlerImpl, HandlerState >::m_stack.
|
inlineprotected |
Definition at line 143 of file event_handler_stack.hpp.
References c4::yml::EventHandlerStack< HandlerImpl, HandlerState >::m_relocate_arena, c4::yml::EventHandlerStack< HandlerImpl, HandlerState >::m_relocate_arena_data, and c4::yml::EventHandlerStack< HandlerImpl, HandlerState >::m_stack.
|
inlineprotected |
Definition at line 157 of file event_handler_stack.hpp.
References c4::yml::EventHandlerStack< HandlerImpl, HandlerState >::m_stack.
|
inline |
Check whether the current parse tokens are trailing on the previous doc, and raise an error if they are.
This function is called by the parse engine (not the event handler) before a doc is started.
Definition at line 172 of file event_handler_stack.hpp.
References _has_any_, c4::yml::DOC, c4::yml::EventHandlerStack< HandlerImpl, HandlerState >::m_curr, c4::yml::EventHandlerStack< HandlerImpl, HandlerState >::m_stack, c4::yml::MAP, c4::yml::NDOC, c4::yml::SEQ, and c4::yml::VAL.
| detail::stack<state> c4::yml::EventHandlerStack< HandlerImpl, HandlerState >::m_stack |
Definition at line 51 of file event_handler_stack.hpp.
| state* c4::yml::EventHandlerStack< HandlerImpl, HandlerState >::m_curr |
current stack level: top of the stack. cached here for easier access.
Definition at line 52 of file event_handler_stack.hpp.
| state* c4::yml::EventHandlerStack< HandlerImpl, HandlerState >::m_parent |
parent of the current stack level.
Definition at line 53 of file event_handler_stack.hpp.
| pfn_relocate_arena c4::yml::EventHandlerStack< HandlerImpl, HandlerState >::m_relocate_arena |
callback when the arena gets relocated
Definition at line 54 of file event_handler_stack.hpp.
| void* c4::yml::EventHandlerStack< HandlerImpl, HandlerState >::m_relocate_arena_data |
Definition at line 55 of file event_handler_stack.hpp.
| csubstr c4::yml::EventHandlerStack< HandlerImpl, HandlerState >::m_src |
Definition at line 56 of file event_handler_stack.hpp.