MTK++ Latest version: 0.2.0

Public Member Functions | Protected Attributes
MTKpp::dMParser Class Reference

sheet/table parser More...

#include <mtkpp/src/Parsers/dMParser.h>

Inheritance diagram for MTKpp::dMParser:
Inheritance graph
[legend]
Collaboration diagram for MTKpp::dMParser:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 dMParser ()
 dMParser Constructor
virtual ~dMParser ()
 dMParser Destructor
int read (sheet *s, std::string f)
 Read xml file.
int import (sheet *s, std::string f)
 Import txt file Line 1st tableName nRows nColumns 2nd Column Labels 3rd Row Label data ... ... Nth.
int write (sheet *s, std::string f, bool bComments=false)
 Write xml file.
virtual void Read ()
 Read function.
virtual void Write ()
 Write function.
std::ofstream & OpenFile (std::string fileName)
 Write function.
std::string determineElement (std::string &name)
 Preceive element symbol from the atom name.
void setError (int i)
 Error handling within Parsers.
bool getError ()
 Error handling within dcParser.
void setErrorMessage (std::string s)
 Error handling within Parsers.
std::string getErrorMessage ()
 Error handling within Parsers.

Protected Attributes

sheetmySheet
 sheet pointer
table< double > * myDoubleTable
 table containing doubles
table< int > * myIntTable
 table containing integers
std::string currentType
 Current table type.
std::ofstream outputFileStream
 Output File Stream.
bool bError
 Error occured.
std::string errorMessage
 Error message.
unsigned int NUM_INDENTS_PER_SPACE

Detailed Description

sheet/table parser

Author:
Martin Peters

Constructor & Destructor Documentation

MTKpp::dMParser::dMParser ( )

dMParser Constructor

MTKpp::dMParser::~dMParser ( ) [virtual]

dMParser Destructor


Member Function Documentation

int MTKpp::dMParser::read ( sheet s,
std::string  f 
)

Read xml file.

Parameters:
ssheet pointer
ffilename
Returns:
success

Referenced by main().

int MTKpp::dMParser::import ( sheet s,
std::string  f 
)

Import txt file Line 1st tableName nRows nColumns 2nd Column Labels 3rd Row Label data ... ... Nth.

Parameters:
ssheet pointer
ffilename
Returns:
success

References MTKpp::sheet::addTable(), myDoubleTable, mySheet, MTKpp::table< T >::setCellValue(), MTKpp::table< T >::setColumnLabel(), MTKpp::table< T >::setName(), MTKpp::table< T >::setRowLabel(), MTKpp::table< T >::setSizes(), and MTKpp::splitString().

Referenced by main().

int MTKpp::dMParser::write ( sheet s,
std::string  f,
bool  bComments = false 
)

Write xml file.

Parameters:
ssheet pointer
ffilename
Returns:
success

Referenced by main().

void MTKpp::baseParser::Read ( ) [virtual, inherited]

Read function.

Referenced by MTKpp::acParser::Read(), and MTKpp::molParser::Read().

void MTKpp::baseParser::Write ( ) [virtual, inherited]
std::ofstream & MTKpp::baseParser::OpenFile ( std::string  fileName) [inherited]

Write function.

References MTKpp::baseParser::outputFileStream.

Referenced by main().

std::string MTKpp::baseParser::determineElement ( std::string &  name) [inherited]

Preceive element symbol from the atom name.

References MTKpp::GetAlphaChar(), and MTKpp::removeCharacter().

Referenced by MTKpp::pdbParser::Read(), and MTKpp::prepParser::readFragment().

void MTKpp::baseParser::setError ( int  i) [inline, inherited]
bool MTKpp::baseParser::getError ( ) [inline, inherited]

Error handling within dcParser.

Returns:
error

References MTKpp::baseParser::bError.

Referenced by main().

void MTKpp::baseParser::setErrorMessage ( std::string  s) [inline, inherited]
std::string MTKpp::baseParser::getErrorMessage ( ) [inline, inherited]

Error handling within Parsers.

Returns:
error message

References MTKpp::baseParser::errorMessage.

Referenced by main().


Member Data Documentation

sheet pointer

Referenced by import().

table<double>* MTKpp::dMParser::myDoubleTable [protected]

table containing doubles

Referenced by import().

table containing integers

std::string MTKpp::dMParser::currentType [protected]

Current table type.

std::ofstream MTKpp::baseParser::outputFileStream [protected, inherited]

Output File Stream.

Referenced by MTKpp::baseParser::OpenFile().

bool MTKpp::baseParser::bError [protected, inherited]
std::string MTKpp::baseParser::errorMessage [protected, inherited]
unsigned int MTKpp::baseParser::NUM_INDENTS_PER_SPACE [protected, inherited]

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

Generated on Fri Dec 23 2011 09:28:57 for MTK++ by Doxygen 1.7.5.1