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

PropertyCompiler Class Reference

#include <PropertyCompiler.h>

List of all members.

Public Methods

 PropertyCompiler (std::string sourcefile, MsgStream& my_log, JobOptionsCatalogue& myCat, PropertyCompiler* parent=0)
 Constructor of PropertyCompiler. More...

virtual ~PropertyCompiler ()
 Destructor: Closes source-file and terminates compilation. More...

StatusCode startCompiler ()
 Starts the compiler. More...


Private Types

enum  Symbols {
  BOFSy, EOFSy, assignSy, semicolonSy,
  commaSy, stringSy, numberSy, realSy,
  dotSy, noSy, identifierSy, booleanSy,
  includeSy, minusSy, plusSy, vectorStartSy,
  vectorEndSy, appendSy, ifDefSy, ifNDefSy,
  endIfSy, elseSy, unitsSy, envSy,
  propSy
}
enum  Operations { assign, append, noOperation, clear }

Private Methods

std::string resolveEnv (const std::string& sourcefile)
 Resolve include-File (resolve environment-settings and path-settings. More...

void ignorePlatformDependendLines ()
void getEntryPointOfDependendLines ()
void newCh ()
 Get next Characater, if EOL is reached, read in next line. More...

std::string newSy ()
 Gets the next symbol in the sourcecode and return it. More...

bool isNextEntryPoint ()
 Checks if the current symobl is another entry-point to recover from previous m_error. More...

Symbols getValueType (std::string& valueStr)
 Get the real value type of the symbol. More...

StatusCode checkSyntax ()
 Syntax-Analysator: Checks Syntax of source-code and interprets compiled lines. More...


Private Attributes

std::vector<std::string>* includeFiles
bool unitsDefined
bool hasParent
UnitsExtensionunits
char m_ch
unsigned int m_lnr
unsigned int m_cnr
unsigned int m_tokenlnr
unsigned int m_tokencnr
std::string m_identStr
std::string m_srcName
std::string m_srcLine
std::string m_compiledLine
Symbols m_sy
bool m_error
int m_errorCount
int m_warningCount
std::ifstream* m_in
MsgStream* m_log
JobOptionsCataloguem_Cat


Member Enumeration Documentation

enum PropertyCompiler::Operations [private]
 

Enumeration values:
assign  
append  
noOperation  
clear  

Definition at line 52 of file PropertyCompiler.h.

enum PropertyCompiler::Symbols [private]
 

Enumeration values:
BOFSy  
EOFSy  
assignSy  
semicolonSy  
commaSy  
stringSy  
numberSy  
realSy  
dotSy  
noSy  
identifierSy  
booleanSy  
includeSy  
minusSy  
plusSy  
vectorStartSy  
vectorEndSy  
appendSy  
ifDefSy  
ifNDefSy  
endIfSy  
elseSy  
unitsSy  
envSy  
propSy  

Definition at line 48 of file PropertyCompiler.h.


Constructor & Destructor Documentation

PropertyCompiler::PropertyCompiler ( std::string sourcefile,
MsgStream & my_log,
JobOptionsCatalogue & my_Cat,
PropertyCompiler * parent = 0 )
 

Constructor of PropertyCompiler.

Creates a new PropertyCompiler-Object which compiles the sourcefile in parameter sourcefile.

Parameters:
sourcefile   File to be compiled

Definition at line 48 of file PropertyCompiler.cpp.

Referenced by checkSyntax().

PropertyCompiler::~PropertyCompiler ( ) [virtual]
 

Destructor: Closes source-file and terminates compilation.

Definition at line 105 of file PropertyCompiler.cpp.


Member Function Documentation

StatusCode PropertyCompiler::checkSyntax ( ) [private]
 

Syntax-Analysator: Checks Syntax of source-code and interprets compiled lines.

Returns:
StatusCode indicating success or error

Definition at line 621 of file PropertyCompiler.cpp.

Referenced by startCompiler().

void PropertyCompiler::getEntryPointOfDependendLines ( ) [private]
 

Definition at line 612 of file PropertyCompiler.cpp.

Referenced by checkSyntax().

PropertyCompiler::Symbols PropertyCompiler::getValueType ( std::string & valueStr ) [private]
 

Get the real value type of the symbol.

(Real-Numbers are merged,...)

Returns:
Real symboltype

Definition at line 462 of file PropertyCompiler.cpp.

Referenced by checkSyntax().

void PropertyCompiler::ignorePlatformDependendLines ( ) [private]
 

Definition at line 607 of file PropertyCompiler.cpp.

Referenced by checkSyntax().

bool PropertyCompiler::isNextEntryPoint ( ) [private]
 

Checks if the current symobl is another entry-point to recover from previous m_error.

Returns:
Boolean value indicating if there is an EntryPoint or not.

Definition at line 448 of file PropertyCompiler.cpp.

Referenced by checkSyntax().

void PropertyCompiler::newCh ( ) [private]
 

Get next Characater, if EOL is reached, read in next line.

Definition at line 192 of file PropertyCompiler.cpp.

Referenced by checkSyntax(), newSy(), and startCompiler().

std::string PropertyCompiler::newSy ( ) [private]
 

Gets the next symbol in the sourcecode and return it.

Returns:
detected symbol

Definition at line 232 of file PropertyCompiler.cpp.

Referenced by checkSyntax(), getEntryPointOfDependendLines(), getValueType(), ignorePlatformDependendLines(), and isNextEntryPoint().

std::string PropertyCompiler::resolveEnv ( const std::string & sourcefile ) [private]
 

Resolve include-File (resolve environment-settings and path-settings.

Definition at line 118 of file PropertyCompiler.cpp.

Referenced by PropertyCompiler(), and checkSyntax().

StatusCode PropertyCompiler::startCompiler ( )
 

Starts the compiler.

Returns:
Status code indicating success or failure

Definition at line 1148 of file PropertyCompiler.cpp.

Referenced by checkSyntax(), and JobOptionsSvc::readOptions().


Member Data Documentation

bool PropertyCompiler::hasParent [private]
 

Definition at line 44 of file PropertyCompiler.h.

std::vector< std::string >* PropertyCompiler::includeFiles [private]
 

Definition at line 43 of file PropertyCompiler.h.

JobOptionsCatalogue * PropertyCompiler::m_Cat [private]
 

Definition at line 66 of file PropertyCompiler.h.

char PropertyCompiler::m_ch [private]
 

Definition at line 54 of file PropertyCompiler.h.

unsigned int PropertyCompiler::m_cnr [private]
 

Definition at line 55 of file PropertyCompiler.h.

std::string PropertyCompiler::m_compiledLine [private]
 

Definition at line 60 of file PropertyCompiler.h.

bool PropertyCompiler::m_error [private]
 

Definition at line 62 of file PropertyCompiler.h.

int PropertyCompiler::m_errorCount [private]
 

Definition at line 63 of file PropertyCompiler.h.

std::string PropertyCompiler::m_identStr [private]
 

Definition at line 57 of file PropertyCompiler.h.

std::ifstream * PropertyCompiler::m_in [private]
 

Definition at line 64 of file PropertyCompiler.h.

unsigned int PropertyCompiler::m_lnr [private]
 

Definition at line 55 of file PropertyCompiler.h.

MsgStream * PropertyCompiler::m_log [private]
 

Definition at line 65 of file PropertyCompiler.h.

std::string PropertyCompiler::m_srcLine [private]
 

Definition at line 59 of file PropertyCompiler.h.

std::string PropertyCompiler::m_srcName [private]
 

Definition at line 58 of file PropertyCompiler.h.

Symbols PropertyCompiler::m_sy [private]
 

Definition at line 61 of file PropertyCompiler.h.

unsigned int PropertyCompiler::m_tokencnr [private]
 

Definition at line 56 of file PropertyCompiler.h.

unsigned int PropertyCompiler::m_tokenlnr [private]
 

Definition at line 56 of file PropertyCompiler.h.

int PropertyCompiler::m_warningCount [private]
 

Definition at line 63 of file PropertyCompiler.h.

UnitsExtension * PropertyCompiler::units [private]
 

Definition at line 45 of file PropertyCompiler.h.

bool PropertyCompiler::unitsDefined [private]
 

Definition at line 44 of file PropertyCompiler.h.


The documentation for this class was generated from the following files:
Generated at Wed Nov 21 12:22:35 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000