NFcore::MapGenerator Class Reference

#include <mappingGenerator.hh>

List of all members.


Detailed Description

Knows how to assign mappings in a MappingSet to a particular Molecule.

MapGenerators are simple objects given to TemplateMolecules (so are maintained and deleted by TemplateMolecule objects) that assign Mapping objects to particular Molecule objects. This allows us to Map specific components of a reactant as we compare the potential molecules to the TemplateMolecule. (see the TemplateMolecule compare() functions). If there is a match, the Template Molecule uses this to assign a mapping. This class is useful because it knows which Mapping to use in the MappingSet provided in the map() function. This is necessary information as we always reuse Mapping and MappingSet objects for effeciency.

Author:
Michael Sneddon

Public Member Functions

 MapGenerator (unsigned int mappingIndex)
 ~MapGenerator ()
bool map (MappingSet *mappingSet, Molecule *molecule)

Protected Attributes

unsigned int mappingIndex

Constructor & Destructor Documentation

MapGenerator::MapGenerator ( unsigned int  mappingIndex  ) 

Creates a MapGenerator (generally created in a TransformationSet when we are creating Transformations) that remembers the index of a Mapping in a MappingSet so that we always reuse the same Mapping.

Author:
Michael Sneddon

NFcore::MapGenerator::~MapGenerator (  )  [inline]

Deconstructor that does nothing significant.

Author:
Michael Sneddon


Member Function Documentation

bool MapGenerator::map ( MappingSet mappingSet,
Molecule molecule 
)

The one key function of a MapGenerator - this takes a MappingSet and finds the particular Mapping that this MapGenerator needs to create and sets that Mapping to point to the given molecule. This is called in the TemplateMolecule compare() function.

Author:
Michael Sneddon


Member Data Documentation

unsigned int NFcore::MapGenerator::mappingIndex [protected]

Keeps track of the index of the Mapping in the MappingSet that this MapGenerator must assign.


The documentation for this class was generated from the following files:
Generated on Thu Dec 9 11:02:48 2010 for NFsim by  doxygen 1.5.4