Hosting courtesy of Sourceforge

SourceForge Logo
Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

Parse::Parser Class Reference

#include <Parse.h>

Inheritance diagram for Parse::Parser:

Inheritance graph
[legend]
List of all members.

Public Methods

virtual ~Parser ()
void addAction (string identifier, ParseAction *dynPtrAction)
virtual void read ()=0

Detailed Description

Abstract base class for all Parsers The Parser class is the class that drives the parsing. It maintains a map of identifiers and actions that are called when those identifiers are read. Derived classes are left to define just how to read the istream... yes, I am guilty of leaving implementation in an interface class :(.

Definition at line 61 of file Parse.h.


Constructor & Destructor Documentation

Parse::Parser::~Parser   [virtual]
 

Parser destructor. deletes all ParseAction sent to it via addAction

Definition at line 34 of file Parse.cpp.


Member Function Documentation

void Parse::Parser::addAction string    identifier,
ParseAction   action
 

Adds identifier, action pair

Parameters:
identifier  std::string from which to match the action with
dynPtrAction  dynamically allocated ParseAction that specifies action performed when identifier is read, deallocated in destructor

Definition at line 41 of file Parse.cpp.

virtual void Parse::Parser::read   [pure virtual]
 

Performs actual reading of the ifstream passed to the constructor. Specific behavior specified by the implementation

See also:
Parser::SimpleParser

Reimplemented in Parse::SimpleParser, and Parse::CommandLineParser.


Member Data Documentation

ActionMap_t Parse::Parser::actionMap [protected]
 

Definition at line 82 of file Parse.h.


The documentation for this class was generated from the following files:
Generated on Tue May 21 07:26:58 2002 for BomberLAN by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001