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

ExpressionParser.h

Go to the documentation of this file.
00001 // Emacs -*- C++ -*-
00002 #ifndef ANAPHE_EXPRESSION_PARSER
00003 #define ANAPHE_EXPRESSION_PARSER 1
00004 
00005 #include <string>
00006 #include <iosfwd>
00007 #include <map>
00008 #include <set>
00009 
00010 namespace Anaphe {
00011   namespace AIDA_Tuple_native {
00012 
00013 class ExpressionParser {
00014 public:
00016   ExpressionParser();
00018   ~ExpressionParser();
00019 
00021   std::set<std::string> mathematicalEvaluation( const std::string& expression,
00022                                                 const std::map< std::string, std::string >& variablesToTypes,
00023                                                 const std::string& functionName,
00024                                                 std::ostream& os ) const;
00025 
00027   std::set<std::string> logicalEvaluation( const std::string& expression,
00028                                            const std::map< std::string, std::string >& variablesToTypes,
00029                                            const std::string& functionName,
00030                                            std::ostream& os ) const;
00031 
00033   bool useHeaderFiles( const std::set< std::string >& headerFiles );
00034 
00036   const std::set<std::string>& headerFilesUsed() const;
00037 
00039   bool useNamespaces( const std::set< std::string >& namespaces );
00040 
00042   const std::set<std::string>& namespacesUsed() const;
00043 
00044 private:
00046   std::set<std::string> m_headerFiles;
00047 
00049   std::set<std::string> m_namespaces;
00050 
00052   std::set<std::string> findUsedVariables( const std::string& expression,
00053                                            const std::map< std::string, std::string >& variablesToTypes ) const;
00054 
00056   bool existsVariableInExpression( const std::string& variable,
00057                                    const std::string& expression ) const;
00058 
00060   std::string correctIdentation( const std::string& expression ) const;
00061 
00062 };
00063 
00064   }
00065 }
00066 
00067 #endif /* ifndef ANAPHE_EXPRESSION_PARSER */

Generated on Tue Feb 18 17:51:19 2003 for AIDA_Tuple_native by doxygen1.2.16