#include <mappingSet.hh>
MappingSet objects manage a list of simple Mappings onto Molecules all within a single
Public Member Functions | |
MappingSet (unsigned int id, vector< Transformation * > &transformations) | |
~MappingSet () | |
bool | set (unsigned int mappingIndex, Molecule *m) |
Mapping * | get (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 |
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.
MappingSet::~MappingSet | ( | ) |
Destroys this MappingSet and any Mapping contained by this MappingSet
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.
Mapping* NFcore::MappingSet::get | ( | unsigned int | mappingIndex | ) | [inline] |
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.
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.
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 |
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] |