VR-Forces 4.6 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
DtObjectParser Class Reference

This class is the base class for parsing out creation information from various textual formats. More...

Inheritance diagram for DtObjectParser:
Inheritance graph
[legend]

Public Member Functions

 DtObjectParser ()
 ~DtObjectParser ()
virtual bool parseFile (const string &filename)
 Pass in the file to parse, creates an istream and calls parse on it.
virtual bool parse (istream &stream)
 Derived classes will set up the tokenizer and determine how extract field information for each record.
virtual ObjectListgetCreateObjectList ()
 Gets a vector containing all of the acoData objects that were created during parsing.
virtual void initTypeMap (const std::map< std::string, std::string > &importData)
 Allows one to map their string names to our entity types.
virtual ObjectEntityTypeMaptypeMap ()

Protected Member Functions

void setSeparatorData (const string &recordSeparator, const string &fieldSeparators, const string &quoteChars, const string &escapeChars)
 Define how the each creation record and its fields are delimited.
virtual void clear ()
 cleans up the object, called from DTor and before parsing

Protected Attributes

ObjectList myCreateObjectList
 vector to keep track of all of the Aco Data that we have parsed
DtTokenizer myTokenizer
Coordinate_SystemmyCoordSystem
ObjectEntityTypeMap myTypeMap

Detailed Description

This class is the base class for parsing out creation information from various textual formats.

It uses the DtTokenizer class to parse the text file into records and fields for those records. Derived parsers will define how the text file seperates those and how to extract the information from those records and their fields.

Constructor & Destructor Documentation

DtObjectParser::DtObjectParser ( )
DtObjectParser::~DtObjectParser ( )

Member Function Documentation

virtual bool DtObjectParser::parseFile ( const string &  filename)
virtual

Pass in the file to parse, creates an istream and calls parse on it.

virtual bool DtObjectParser::parse ( istream &  stream)
inlinevirtual

Derived classes will set up the tokenizer and determine how extract field information for each record.

Reimplemented in DtCsvParser.

virtual ObjectList& DtObjectParser::getCreateObjectList ( )
virtual

Gets a vector containing all of the acoData objects that were created during parsing.

virtual void DtObjectParser::initTypeMap ( const std::map< std::string, std::string > &  importData)
virtual

Allows one to map their string names to our entity types.

virtual ObjectEntityTypeMap* DtObjectParser::typeMap ( )
virtual
void DtObjectParser::setSeparatorData ( const string &  recordSeparator,
const string &  fieldSeparators,
const string &  quoteChars,
const string &  escapeChars 
)
protected

Define how the each creation record and its fields are delimited.

For example a csv parser would use ","s to delimit fields and "/n" to define records These are passed into the tokenzier class that will go thru and parse the file into record chunks the derived class will then disect to get the field information and turn each record into an createinformation struct that will later on be used to create the vrfobjects that will represent these records.

virtual void DtObjectParser::clear ( )
protectedvirtual

cleans up the object, called from DTor and before parsing

Member Data Documentation

ObjectList DtObjectParser::myCreateObjectList
protected

vector to keep track of all of the Aco Data that we have parsed

DtTokenizer DtObjectParser::myTokenizer
protected
Coordinate_System* DtObjectParser::myCoordSystem
protected
ObjectEntityTypeMap DtObjectParser::myTypeMap
protected

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

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)