OpenWalnut  1.2.5
Public Member Functions
WProjectFileIO Class Reference

A base class for all parts of OpenWalnut which can be serialized to a project file. More...

#include <WProjectFileIO.h>

+ Inheritance diagram for WProjectFileIO:

List of all members.

Public Member Functions

 WProjectFileIO ()
 Default constructor.
virtual ~WProjectFileIO ()
 Destructor.
virtual bool parse (std::string line, unsigned int lineNumber)=0
 This method parses the specified line and interprets it.
virtual void done ()
 Called whenever the end of the project file has been reached.
virtual void save (std::ostream &output)=0
 Saves the state to the specified stream.

Detailed Description

A base class for all parts of OpenWalnut which can be serialized to a project file.

It is used by WProjectFile to actually parse the file line by line. Derive from this class if you write your own parser and use it to fill your internal data structures.

Definition at line 36 of file WProjectFileIO.h.


Constructor & Destructor Documentation

Default constructor.

Definition at line 27 of file WProjectFileIO.cpp.

Destructor.

Definition at line 32 of file WProjectFileIO.cpp.


Member Function Documentation

void WProjectFileIO::done ( ) [virtual]

Called whenever the end of the project file has been reached.

This is useful if your specific parser class wants to do some post processing after parsing line by line.

Reimplemented in WModuleProjectFileCombiner, WGEProjectFileIO, and WRoiProjectFileIO.

Definition at line 37 of file WProjectFileIO.cpp.

virtual bool WProjectFileIO::parse ( std::string  line,
unsigned int  lineNumber 
) [pure virtual]

This method parses the specified line and interprets it.

It gets called line by line by WProjectFile.

Parameters:
linethe current line as string
lineNumberthe current line number. Useful for error/warning/debugging output.
Returns:
true if the line could be parsed.

Implemented in WModuleProjectFileCombiner, WGEProjectFileIO, and WRoiProjectFileIO.

virtual void WProjectFileIO::save ( std::ostream &  output) [pure virtual]

Saves the state to the specified stream.

Parameters:
outputthe stream to print the state to.

Implemented in WModuleProjectFileCombiner, WGEProjectFileIO, and WRoiProjectFileIO.


The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends