libvariant
 All Classes Namespaces Files Functions Enumerations Groups
Public Member Functions | List of all members
libvariant::Parser Class Reference

The public parser interface. More...

#include <Variant/Parser.h>

Public Member Functions

 Parser (shared_ptr< ParserImpl > pi)
 
int Run ()
 
void PushAction (shared_ptr< ParserActions > action)
 Push an action handler onto the action stack.
 
shared_ptr< ParserActionsPopAction ()
 Pop the top action handler off the stack.
 
bool Done () const
 Query state.
 
bool Error () const
 
bool Ok () const
 
std::string ErrorStr () const
 Return a string describing the last error suitable for presentation to a user.
 
void Reset ()
 Reset the parser if applicable (some types will throw)
 
shared_ptr< ParserImplGetImpl ()
 Internal/advanced function to get the underlying implementation.
 

Detailed Description

The public parser interface.

Member Function Documentation

int libvariant::Parser::Run ( )
inline

0 on success, 1 when done, -1 other problem, throw on error The parser has a action stack, the parser events go to the action on the top of the stack. At any time a new action class can be pushed or popped from the action stack and if the stack is empty the parser stops processing events and run returns.


The documentation for this class was generated from the following files: