00001 #ifndef INPUTCOMBININGRULEPARSER_H 00002 #define INPUTCOMBININGRULEPARSER_H 00003 00004 #ifndef INCLUDED_GLARE_INPUTLIBRARYSET 00005 #define INCLUDED_GLARE_INPUTLIBRARYSET 00006 #include "InputLibrarySet.h" 00007 #endif 00008 00009 #ifndef INCLUDED_STD_IOSFWD 00010 #define INCLUDED_STD_IOSFWD 00011 #include <iosfwd> 00012 #endif 00013 00014 #ifndef INCLUDED_STD_MAP 00015 #define INCLUDED_STD_MAP 00016 #include <map> 00017 #endif 00018 00019 #ifndef INCLUDED_STD_STRING 00020 #define INCLUDED_STD_STRING 00021 #include <string> 00022 #endif 00023 00024 #ifndef INCLUDED_STD_VECTOR 00025 #define INCLUDED_STD_VECTOR 00026 #include <vector> 00027 #endif 00028 00029 class InputDimension; 00030 class InputProperty; 00031 class InputFormat; 00032 00036 class InputCombiningRuleParser 00037 { 00038 public: 00039 00044 InputCombiningRuleParser( void ); 00048 void parse( std::istream& p_istream ); 00049 00053 void validateState( void ); 00054 00058 const std::vector< InputLibrarySet* >& getInputLibrarySet( void ); 00059 00063 const std::vector< InputDimension* >& getInputDimension( void ); 00064 00068 const InputFormat* const getInputFormat( void ); 00069 00070 protected: 00071 00072 void parseDimension( const std::vector< std::string >& p_tokens ); 00073 void parseLibrarySet( const std::vector< std::string >& p_tokens ); 00074 void parseDimensionFreeze( const std::vector< std::string >& p_tokens ); 00075 void parseProperty( const std::vector< std::string >& p_tokens ); 00076 void parseInputFormat( const std::vector< std::string >& p_tokens ); 00077 const std::string m_TOKEN_DIMDEF; 00078 const std::string m_TOKEN_LIBDEF; 00079 const std::string m_TOKEN_COMMENT; 00080 const std::string m_TOKEN_DIMFREEZE; 00081 const std::string m_TOKEN_PROPDEF; 00082 const std::string m_TOKEN_INPUTDEF; 00083 std::vector< InputLibrarySet* > m_library_set; 00084 std::map< std::string, InputDimension* > m_fetch_dimension; 00085 std::vector< InputDimension* > m_input_dimension; 00086 std::map< std::string, InputProperty* > m_fetch_property; 00087 InputFormat* m_input_format; 00088 }; 00089 00090 #endif 00091 string, InputProperty* > m_fetch_property; 00092 InputFormat* m_input_format; 00093 }; 00094 00095 #endif