Klamp't
0.8.1
|
#include <LineReader.h>
Public Member Functions | |
LineReader (istream &in) | |
bool | Read () |
virtual Result | InputToken (const string &word) |
virtual Result | InputPunct (const string &punct) |
virtual Result | InputEndLine () |
virtual bool | Begin (const string &name, stringstream &args)=0 |
subclass should just fill these in | |
virtual bool | Assign (const string &item, stringstream &rhs)=0 |
virtual bool | End () |
Public Attributes | |
int | mode |
string | curitem |
This is a helper class to read text data of the form
begin NAME [args] ITEM1 = [args] ITEM2 = [args] end where NAME and ITEM_ are single words, [args] are arbitrary arguments up to the endline.
Subclasses should fill in Begin(), Assign(), and End(). These methods return true if the name and arguments are valid.