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

Anaphe::AIDA_Tuple_native::ExpressionParser Class Reference

#include <ExpressionParser.h>

List of all members.

Public Methods

 ExpressionParser ()
 Constructor.

 ~ExpressionParser ()
 Destructor.

std::set< std::string > mathematicalEvaluation (const std::string &expression, const std::map< std::string, std::string > &variablesToTypes, const std::string &functionName, std::ostream &os) const
 Creates a function which evaluates an expression. Returns the variables used.

std::set< std::string > logicalEvaluation (const std::string &expression, const std::map< std::string, std::string > &variablesToTypes, const std::string &functionName, std::ostream &os) const
 Creates a function which evaluates a logical expression.

bool useHeaderFiles (const std::set< std::string > &headerFiles)
 Tells the system to include a set of header files in the generated expressions.

const std::set< std::string > & headerFilesUsed () const
 Retrieves the currently used header files.

bool useNamespaces (const std::set< std::string > &namespaces)
 Tells the system to use a set of namespaces.

const std::set< std::string > & namespacesUsed () const
 Retrieves the currently used namespaces.


Private Methods

std::set< std::string > findUsedVariables (const std::string &expression, const std::map< std::string, std::string > &variablesToTypes) const
 Checks which of the variables are used.

bool existsVariableInExpression (const std::string &variable, const std::string &expression) const
 Checks if there is a variable in the expression.

std::string correctIdentation (const std::string &expression) const
 Formats an expression in order to keep identation consistent.


Private Attributes

std::set< std::string > m_headerFiles
 header files to be included in the generated files

std::set< std::string > m_namespaces
 namespaces to be used in the generated files


Constructor & Destructor Documentation

Anaphe::AIDA_Tuple_native::ExpressionParser::ExpressionParser  
 

Definition at line 60 of file ExpressionParser.cpp.

References areTablesInitialized, and initializeTables().

Anaphe::AIDA_Tuple_native::ExpressionParser::~ExpressionParser  
 

Definition at line 67 of file ExpressionParser.cpp.


Member Function Documentation

std::string Anaphe::AIDA_Tuple_native::ExpressionParser::correctIdentation const std::string &    expression const [private]
 

Definition at line 318 of file ExpressionParser.cpp.

Referenced by logicalEvaluation(), and mathematicalEvaluation().

bool Anaphe::AIDA_Tuple_native::ExpressionParser::existsVariableInExpression const std::string &    variable,
const std::string &    expression
const [private]
 

Definition at line 284 of file ExpressionParser.cpp.

References forbiddenCharactersInVariables.

Referenced by findUsedVariables(), logicalEvaluation(), and mathematicalEvaluation().

std::set< std::string > Anaphe::AIDA_Tuple_native::ExpressionParser::findUsedVariables const std::string &    expression,
const std::map< std::string, std::string > &    variablesToTypes
const [private]
 

Definition at line 270 of file ExpressionParser.cpp.

References existsVariableInExpression().

Referenced by logicalEvaluation(), and mathematicalEvaluation().

const std::set< std::string > & Anaphe::AIDA_Tuple_native::ExpressionParser::headerFilesUsed   const
 

Definition at line 80 of file ExpressionParser.cpp.

References m_headerFiles.

std::set< std::string > Anaphe::AIDA_Tuple_native::ExpressionParser::logicalEvaluation const std::string &    expression,
const std::map< std::string, std::string > &    variablesToTypes,
const std::string &    functionName,
std::ostream &    os
const
 

Definition at line 186 of file ExpressionParser.cpp.

References correctIdentation(), existsVariableInExpression(), findUsedVariables(), m_headerFiles, and m_namespaces.

Referenced by Anaphe::AIDA_Tuple_native::CompiledExpressionManager::createFilterExpression().

std::set< std::string > Anaphe::AIDA_Tuple_native::ExpressionParser::mathematicalEvaluation const std::string &    expression,
const std::map< std::string, std::string > &    variablesToTypes,
const std::string &    functionName,
std::ostream &    os
const
 

Definition at line 102 of file ExpressionParser.cpp.

References correctIdentation(), existsVariableInExpression(), findUsedVariables(), m_headerFiles, and m_namespaces.

Referenced by Anaphe::AIDA_Tuple_native::CompiledExpressionManager::createEvaluatorExpression().

const std::set< std::string > & Anaphe::AIDA_Tuple_native::ExpressionParser::namespacesUsed   const
 

Definition at line 95 of file ExpressionParser.cpp.

References m_namespaces.

bool Anaphe::AIDA_Tuple_native::ExpressionParser::useHeaderFiles const std::set< std::string > &    headerFiles
 

Definition at line 72 of file ExpressionParser.cpp.

References m_headerFiles.

Referenced by Anaphe::AIDA_Tuple_native::CompiledExpressionManager::CompiledExpressionManager().

bool Anaphe::AIDA_Tuple_native::ExpressionParser::useNamespaces const std::set< std::string > &    namespaces
 

Definition at line 87 of file ExpressionParser.cpp.

References m_namespaces.

Referenced by Anaphe::AIDA_Tuple_native::CompiledExpressionManager::CompiledExpressionManager().


Member Data Documentation

std::set<std::string> Anaphe::AIDA_Tuple_native::ExpressionParser::m_headerFiles [private]
 

Definition at line 46 of file ExpressionParser.h.

Referenced by headerFilesUsed(), logicalEvaluation(), mathematicalEvaluation(), and useHeaderFiles().

std::set<std::string> Anaphe::AIDA_Tuple_native::ExpressionParser::m_namespaces [private]
 

Definition at line 49 of file ExpressionParser.h.

Referenced by logicalEvaluation(), mathematicalEvaluation(), namespacesUsed(), and useNamespaces().


The documentation for this class was generated from the following files:
Generated on Tue Feb 18 17:51:25 2003 for AIDA_Tuple_native by doxygen1.2.16