/home/msneddon/eclipse/galileoSR1_cpp/workspace/NFsim/src/NFreactions/mappings/mappingSet.hh

Go to the documentation of this file.
00001 #ifndef MAPPINGSET_HH_
00002 #define MAPPINGSET_HH_
00003 
00004 
00005 
00006 
00007 
00008 #include "../NFreactions.hh"
00009 
00010 using namespace std;
00011 
00012 namespace NFcore
00013 {
00014         //Needs a forward declaration here
00015         class Mapping;
00016         class Transformation;
00017 
00018 
00020 
00025         class MappingSet
00026         {
00027                 public:
00028 
00038                         MappingSet(unsigned int id, vector <Transformation *> &transformations);
00039 
00044                         ~MappingSet();
00045 
00046 
00052                         bool set(unsigned int mappingIndex, Molecule *m);
00053 
00054 
00061                         Mapping *get(unsigned int mappingIndex) { return mappings[mappingIndex]; }
00062 
00072                         void clear(); /*{
00073                                 this->clonedMappingSet=NO_CLONE;
00074                                 for(unsigned int t=0; t<n_mappings; t++) {
00075                                         mappings[t]->clear();
00076                                 }
00077 
00078                         };*/
00079 
00080 
00081 
00082                         bool hasDeletionTransform() const { return isDeletion; };
00083 
00090                         unsigned int getId() const { return id; };
00091 
00092                         unsigned int getNumOfMappings() const { return n_mappings; };
00093 
00094 
00095                         unsigned int getClonedMapping() const { return clonedMappingSet; };
00096                         void clearClonedMapping() { this->clonedMappingSet=NO_CLONE; };
00097 
00098 
00099                         static const unsigned int NO_CLONE = -1;
00100 
00101                         static void clone(MappingSet *original, MappingSet *newClone);
00102 
00103                         void printDetails() const;
00104                         void printDetails(ostream &o) const;
00105 
00106 
00107 
00108                 protected:
00109 
00114                         unsigned int id;
00115 
00116 
00120                         unsigned int n_mappings;
00121 
00125                         Mapping ** mappings;
00126 
00127 
00128                         bool isDeletion;
00129 
00130 
00135                         unsigned int clonedMappingSet;
00136 
00137         };
00138 
00139 }
00140 
00141 
00142 
00143 
00144 #endif /*MAPPINGSET_HH_*/

Generated on Thu Dec 9 11:02:48 2010 for NFsim by  doxygen 1.5.4