NFcore::MappingSet Class Reference

#include <mappingSet.hh>

List of all members.


Detailed Description

Keeps a list of mappings needed by a particular list of reactants.

MappingSet objects manage a list of simple Mappings onto Molecules all within a single

Author:
Michael Sneddon

Public Member Functions

 MappingSet (unsigned int id, vector< Transformation * > &transformations)
 ~MappingSet ()
bool set (unsigned int mappingIndex, Molecule *m)
Mappingget (unsigned int mappingIndex)
void clear ()
bool hasDeletionTransform () const
unsigned int getId () const
unsigned int getNumOfMappings () const
unsigned int getClonedMapping () const
void clearClonedMapping ()
void printDetails () const
void printDetails (ostream &o) const

Static Public Member Functions

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

Static Public Attributes

static const unsigned int NO_CLONE = -1

Protected Attributes

unsigned int id
unsigned int n_mappings
Mapping ** mappings
bool isDeletion
unsigned int clonedMappingSet

Constructor & Destructor Documentation

MappingSet::MappingSet ( unsigned int  id,
vector< Transformation * > &  transformations 
)

Creates a new MappingSet. This MappingSet constructor will take care of populating itself with Mapping objects based on the list of transformations that are specified in the given vector. TransformationSet objects know how to make MappingSet objects which are immediately made when a ReactantList (or ReactantTree) initializes or expands its capacity. They are never destroyed until the simulation is complete.

Author:
Michael Sneddon

MappingSet::~MappingSet (  ) 

Destroys this MappingSet and any Mapping contained by this MappingSet

Author:
Michael Sneddon


Member Function Documentation

bool MappingSet::set ( unsigned int  mappingIndex,
Molecule m 
)

Assigns a particular Mapping in this set at the specified index to a given Molecule. MapGenerator objects use this function to Map molecules.

Author:
Michael Sneddon

Mapping* NFcore::MappingSet::get ( unsigned int  mappingIndex  )  [inline]

Retrieves a particular Mapping at the specified index. This is used when we need to actually transform a given Molecule involved with a rule that fired.

Author:
Michael Sneddon

void MappingSet::clear (  ) 

This clears the Mapping objects belonging to this MappingSet. It is generally good practice to do this once this MappingSet is no longer being used, but this function is not required for any real functionality. Note that currently this function does nothing (for efficiency). To make it do something, look at the file mappingSet.cpp and use the (slightly slower) yet less error prone version of these functions.

Author:
Michael Sneddon

bool NFcore::MappingSet::hasDeletionTransform (  )  const [inline]

unsigned int NFcore::MappingSet::getId (  )  const [inline]

Returns the Id of this MappingSet. The Id of the MappingSet is used to track the MappingSet as it exists in a ReactantList or ReactantTree. This Id should be unique within the list or tree, but is not unique within the system.

Author:
Michael Sneddon

unsigned int NFcore::MappingSet::getNumOfMappings (  )  const [inline]

unsigned int NFcore::MappingSet::getClonedMapping (  )  const [inline]

void NFcore::MappingSet::clearClonedMapping (  )  [inline]

void MappingSet::clone ( MappingSet original,
MappingSet newClone 
) [static]

void MappingSet::printDetails (  )  const

void MappingSet::printDetails ( ostream &  o  )  const


Member Data Documentation

const unsigned int NFcore::MappingSet::NO_CLONE = -1 [static]

unsigned int NFcore::MappingSet::id [protected]

The Id of this MappingSet assigned by the ReactantList or ReactantTree in which this MappingSet lives.

unsigned int NFcore::MappingSet::n_mappings [protected]

Keeps track of the number of Mapping objects contained in this MappingSet.

Mapping** NFcore::MappingSet::mappings [protected]

An array of pointers to Mapping objects. This is where the actual Mappings are stored.

bool NFcore::MappingSet::isDeletion [protected]

unsigned int NFcore::MappingSet::clonedMappingSet [protected]


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