Hosting courtesy of Sourceforge

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

Parse::GeneratedVectorParser Class Template Reference

#include <ListParser.h>

Inheritance diagram for Parse::GeneratedVectorParser:

Inheritance graph
[legend]
Collaboration diagram for Parse::GeneratedVectorParser:

Collaboration graph
[legend]
List of all members.

Public Methods

 GeneratedVectorParser (vector< Base *> &vectorToAddTo, ParserGenerator< Derived > *dynPtrParseGen)
virtual void getValue (istream &input)
 ~GeneratedVectorParser ()

Detailed Description

template<class Base, class Derived = Base>
class Parse::GeneratedVectorParser< Base, Derived >

Class capable of parsing types Base that need not be subclasses of Parseable with the aid of a ParserGenerator for Base. Nice for adding in the ability to parse a class that was not orginally designed to be Parseable, or to parse a parseable object in an "unnatural" way

Definition at line 223 of file ListParser.h.


Constructor & Destructor Documentation

template<class Base, class Derived = Base>
Parse::GeneratedVectorParser< Base, Derived >::GeneratedVectorParser vector< Base *> &    vectorToAddTo,
ParserGenerator< Derived > *    dynPtrParseGen
 

GeneratedVectorParser constructor.

Parameters:
vectorToAddTo  vector used for storage of newly allocated Derived.
dynPtrParseGen  dynamically allocated ParserGenerator<T> that binds a Parser to new T added to the vector. Will be deleted in the destuctor.

Definition at line 231 of file ListParser.h.

template<class Base, class Derived = Base>
Parse::GeneratedVectorParser< Base, Derived >::~GeneratedVectorParser  
 

deletes dynPtrParseGen passed to it in the constructor

Definition at line 258 of file ListParser.h.


Member Function Documentation

template<class Base, class Derived = Base>
virtual void Parse::GeneratedVectorParser< Base, Derived >::getValue istream &    input [virtual]
 

Creates a new Derived on the heap, puts a reference to it the vector passed to the constructor.

The Derived will be at the back of the vector, unless the identifier "index" was read, in which case it will be placed at index. It will NOT delete the pointer at the old index, causing it to overwrite and could lead to memory leaks

Reimplemented from Parse::ParseAction.

Definition at line 242 of file ListParser.h.


Member Data Documentation

template<class Base, class Derived = Base>
ParserGenerator<Derived>* Parse::GeneratedVectorParser::pg [protected]
 

Definition at line 262 of file ListParser.h.


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