Generated on Wed Apr 29 2015 11:51:40 for GGL-4.1.2 by doxygen 1.8.3.1
MoleculeComponent_GMLparser.hh
Go to the documentation of this file.
1 #ifndef GGL_CHEM_MOLECULECOMPONENT_GML_PARSER_HH_
2 #define GGL_CHEM_MOLECULECOMPONENT_GML_PARSER_HH_
3 
4 #include <utility>
5 #include <string>
6 #include <stdexcept>
7 
9 
10 namespace ggl {
11 namespace chem {
12 
13 
14  /*! @brief MoleculeComponent parser
15  *
16  * This class is a wrapper for the ggl::chem::MoleculeComponent_GML_grammar
17  * BNF grammar parser. It parses a GML string representation of a
18  * ggl::MoleculeDecomposition::MoleculeComponent object. This includes its
19  * properties as well as the additional constraints needed for matching.
20  * See ggl::chem::MoleculeComponent_GML_grammar for further details
21  *
22  * @author Martin Mann (c) 2012 http://www.bioinf.uni-freiburg.de/~mmann/
23  *
24  */
26  {
27 
28  public:
29 
30  //! Parses a GML string and generates a MoleculeComponent::PatternGraph object
31  //! @param GML_string the string to parse
32  //! @return pair.first = the graph encoding of the molecule
33  //! pair.second = -1 if parsing was successfull,
34  //! in error case it returns the string position that caused
35  //! the parsing error
36  //! @throw std::invalid_argument in case a check fails
37  static
38  std::pair< MoleculeComponent, int >
39  parseGML( const std::string & GML_string ) throw (std::invalid_argument);
40  };
41 
42 
43 } // namespace chem
44 } // namespace ggl
45 
46 
47 #endif /*GGL_CHEM_MOLECULECOMPONENT_GML_PARSER_HH_*/