class ObjectParser

Class which parses a given object in the L2 ASCII script file

Inheritance:


Public Methods

string getName(void)
Returns the name of the type of object parsed.
ObjectParser(string name, objectID id)
The constructor function for the class
bool parse(TCCparser &parser)
Parses the object from the given input stream

Protected Methods

virtual bool check(list<ObjectParam> &op)
Checks the list of object parameters found

Private Fields

objectID id
Idenitification number indicating the object type
string name
Name of object type to parse

Documentation

Class which parses a given object in the L2 ASCII script file. It is called by the TCCparse class to read in an object and then right it out to the binary memory stream. All subclasses which inherit from this class must be copy-safe since the TCCparser class makes a copy of the parser when a new parser is added to the class.
ObjectParser(string name, objectID id)
The constructor function for the class. The routine converts the object type name into lower case and then copies it into internal storage. The ID parameter is an integer saved in the binary output format which is used to identify the object type.
Parameters:
name - name of object type for this parser
id - object type identification number

bool parse(TCCparser &parser)
Parses the object from the given input stream. The TCCparser class calls this function which will then read in the ASCII representation of the object and write it out to the given memory stream. The function reads in a list of parameters and then passes these to the virtual check function to ensure that all is well, before writing it out to the given parser class.
Parameters:
parser - TCC parser which is reading the input file

string getName(void)
Returns the name of the type of object parsed.

virtual bool check(list<ObjectParam> &op)
Checks the list of object parameters found. This function varies depending on the type of object being parsed. If it returns false then the ObjectParser will likewise return false to its calling routine.
Returns:
true if no errors found, false otherwise
Parameters:
op - list of object parameters found in file

string name
Name of object type to parse

objectID id
Idenitification number indicating the object type


Direct child classes:
ToolParser
ScriptParser
Author:
Roger Moore (moore@pa.msu.edu)

alphabetic index hierarchy of classes


This page has been generated automatically by doc++.

Copyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de