YAML Parser

template<typename _Handler>
class orcus::yaml_parser : public orcus::yaml::parser_base

Public Types

typedef _Handler handler_type

Public Functions

yaml_parser(const char *p, size_t n, handler_type &hdl)
void parse()

Parser Handler

class orcus::yaml_handler

Public Functions

inline void begin_parse()

Called when the parser starts parsing a content.

inline void end_parse()

Called when the parser finishes parsing an entire content.

inline void begin_document()

Called when a new document is encountered.

inline void end_document()

Called when the parser has finished parsing a document.

inline void begin_sequence()

Called when a sequence begins.

inline void end_sequence()

Called when a sequence ends.

inline void begin_map()

Called when a map begins.

inline void begin_map_key()

Called when the parser starts parsing a map key.

inline void end_map_key()

Called when the parser finishes parsing a map key.

inline void end_map()

Called when the parser finishes parsing an entire map.

inline void string(const char *p, size_t n)

Called when a string value is encountered.

Parameters
  • p – pointer to the first character of the string value.

  • len – length of the string value.

inline void number(double val)

Called when a numeric value is encountered.

Parameters

val – numeric value.

inline void boolean_true()

Called when a boolean ‘true’ keyword is encountered.

inline void boolean_false()

Called when a boolean ‘false’ keyword is encountered.

inline void null()

Called when a ‘null’ keyword is encountered.