Generated on Wed Apr 29 2015 11:51:41 for GGL-4.1.2 by doxygen 1.8.3.1
Data Structures | Public Member Functions | Static Public Member Functions | Protected Types | Protected Attributes
ggl::chem::MoleculeComponent_GML_grammar Class Reference

MoleculeComponent parser. More...

#include <MoleculeComponent_GML_grammar.hh>

Inheritance diagram for ggl::chem::MoleculeComponent_GML_grammar:
Inheritance graph
[legend]

Data Structures

struct  definition
 The definition of the GML grammar. More...
 

Public Member Functions

 MoleculeComponent_GML_grammar (MoleculeComponent &toFill)
 

Static Public Member Functions

static std::pair
< MoleculeComponent, int > 
parseGML (const std::string &GML_string) throw (std::invalid_argument)
 

Protected Types

typedef std::map< int, size_t > MapIntSizeT
 type for mapping integers to size_t More...
 

Protected Attributes

MoleculeComponenttoFill
 

Detailed Description

  Parses a GML string representation of a
  ggl::MoleculeDecomposition::MoleculeComponent object. This includes its
  properties as well as the additional constraints needed for matching.

  Example :
      ======= GRAPH IN GML =========================

      molcomp [
        description " '-Cl' (attached to a primary carbon with no other clorine atoms attached)"
        priority 4
        energy  -11.7
        node [ id 0 label "C" ]
        node [ id 1 label "Cl" ]
        edge [ source 0 target 1 label "-" ]
        constrainAdj [
        id 0
        op =
        count 1
        nodeLabels [ label "Cl" ]
        ]
        constrainAdj [
           id 0
           op =
           count 2
           nodeLabels [ label "H" ]
        ]
      ]

      ==============================================
Author
Martin Mann (c) 2010 http://www.bioinf.uni-freiburg.de/~mmann/

Definition at line 94 of file MoleculeComponent_GML_grammar.hh.

Member Typedef Documentation

typedef std::map<int, size_t> ggl::chem::MoleculeComponent_GML_grammar::MapIntSizeT
protected

Definition at line 109 of file MoleculeComponent_GML_grammar.hh.

Constructor & Destructor Documentation

ggl::chem::MoleculeComponent_GML_grammar::MoleculeComponent_GML_grammar ( MoleculeComponent toFill)
explicit

Constructs the definitions of a GML graph grammar to parse a GML graph string representation and to fill the encoded graph into a given boost graph object.

Parameters
toFillthe object to add nodes and edges to

Member Function Documentation

static std::pair< MoleculeComponent, int > ggl::chem::MoleculeComponent_GML_grammar::parseGML ( const std::string &  GML_string) throw (std::invalid_argument)
static

Parses a GML string and generates a MoleculeComponent::PatternGraph object

Parameters
GML_stringthe string to parse
Returns
pair.first = the graph encoding of the molecule pair.second = -1 if parsing was successfull, in error case it returns the string position that caused the parsing error
Exceptions
std::invalid_argumentin case a check fails

Field Documentation

MoleculeComponent& ggl::chem::MoleculeComponent_GML_grammar::toFill
protected

The boost core graph object that is filled to represent the next parsed Rule.

Definition at line 116 of file MoleculeComponent_GML_grammar.hh.


The documentation for this class was generated from the following file: