template<typename Handler>
void parse(Context& ctx, Handler& handler);
template<typename Handler>
void parse(Context& ctx, Handler& handler, ErrorCode& ec);
Required header: <Eclog/Parse.h>
The parse function parses an Eclog text from the input source and reports parsing events to a user-defined handler.
Context&
ctx The parsing context.
Handler&
handler The handler that receives the parsing events.
ErrorCode&
ec Set to indicate what error occurred, if any.
Handler
must be a class type, and given
the following expressions must be valid:
handler.onObjectBegin()
handler.onObjectEnd()
handler.onArrayBegin()
handler.onArrayEnd()
handler.onKey(key)
handler.onValue(value)