Klamp't  0.8.1
Public Member Functions | Public Attributes | List of all members
LineReader Class Referenceabstract

#include <LineReader.h>

Inheritance diagram for LineReader:
HoldReader

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
 

Detailed Description

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.


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