NFcore::Mapping Class Reference

#include <mapping.hh>

List of all members.


Detailed Description

Keeps a pointer to a molecule and remembers a single component to act on.

This is the low level unit that is used by reactions to identify the particular component of a molecule to update or change when a transformation is required. It is maintained by a MappingSet which is just a collection of Mapping objects. The "type" of mapping is identified in the same way as the "type" of transformation. See the Transformation class for a list of those types. The "index" simply is the index of the binding site or state of a molecule. It is possible that some "types" do not require an "index" (as in the case of adding or deleting an entire molecule).

Author:
Michael Sneddon

Public Member Functions

 Mapping (unsigned int type, int index)
 ~Mapping ()
unsigned int getType () const
int getIndex () const
MoleculegetMolecule () const
void clear ()
bool setMolecule (Molecule *m)
void printDetails () const
void printDetails (ostream &o) const

Static Public Member Functions

static void clone (Mapping *original, Mapping *newClone)

Protected Attributes

unsigned int type
int index
Moleculem

Constructor & Destructor Documentation

NFcore::Mapping::Mapping ( unsigned int  type,
int  index 
)

Creates a new Mapping object with the specified "type" (as defined by the types in the Transformation class) and a specified "index" which is the binding site or state index (in a MoleculeType) that this Mapping will map onto. The type and index does not (and should not) change during a simulation.

Author:
Michael Sneddon

NFcore::Mapping::~Mapping (  ) 

Destroys this mapping, but does not delete the molecule it is mapped to.

Author:
Michael Sneddon


Member Function Documentation

unsigned int NFcore::Mapping::getType (  )  const

Returns the type of mapping this is. See Transformation for the possible types that can be assigned.

Author:
Michael Sneddon

int NFcore::Mapping::getIndex (  )  const

Returns the index into either the binding site or state of the Molecule this Mapping points to.

Author:
Michael Sneddon

Molecule * NFcore::Mapping::getMolecule (  )  const [inline]

Once this Mapping has been mapped to a molecule, you can get a pointer to that Molecule with this function.

Author:
Michael Sneddon

void NFcore::Mapping::clear (  ) 

This clears the Mapping by forgetting the Molecule that this maps to. It is good practice to call this function after the Mapping becomes unused (as is done by ReactantList) but it is not always necessary as long as you have another way to keep track of mappings (as ReactionList does).

Author:
Michael Sneddon

bool NFcore::Mapping::setMolecule ( Molecule m  ) 

This sets the Mapping to actually point to a particular Molecule in the system. This Molecule is remembered until a new Molecule is set or the clear() function is called.

Author:
Michael Sneddon

void NFcore::Mapping::clone ( Mapping original,
Mapping newClone 
) [static]

void NFcore::Mapping::printDetails (  )  const

void NFcore::Mapping::printDetails ( ostream &  o  )  const


Member Data Documentation

unsigned int NFcore::Mapping::type [protected]

The "type" of mapping this is, taken from the same list of types in the Transformation class.

int NFcore::Mapping::index [protected]

The index of the binding site or state that this Mapping keeps track of.

Molecule* NFcore::Mapping::m [protected]

A pointer to the Molecule that this Mapping keeps track of. It can only keep track of one Molecule at a time.


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