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

Go to the documentation of this file.
00001 
00002 
00003 
00004 
00005 
00006 #ifndef MAPPING_HH_
00007 #define MAPPING_HH_
00008 
00009 #include "../NFreactions.hh"
00010 
00011 namespace NFcore
00012 {
00014 
00025         class Mapping
00026         {
00027                 public:
00028 
00037                         Mapping(unsigned int type, int index);
00038 
00043                         ~Mapping();
00044 
00050                         unsigned int getType() const;
00051 
00057                         int getIndex() const;
00058 
00064                         Molecule * getMolecule() const;
00065 
00073                         void clear();
00074 
00080                         bool setMolecule(Molecule *m);
00081 
00082 
00083                         static void clone(Mapping *original, Mapping *newClone);
00084 
00085 
00086                         void printDetails() const;
00087                         void printDetails(ostream &o) const;
00088 
00089 
00090                 protected:
00091 
00096                         unsigned int type;
00097 
00101                         int index;
00102 
00107                         Molecule * m;
00108         };
00109 
00110 
00111 
00112         inline
00113         Molecule * NFcore::Mapping::getMolecule() const
00114         {
00115                 //Make sure the Molecule points somewhere.  For effeciency, this check
00116                 //can be removed.
00117         //      if(m==NULL) {
00118         //              cout<<"Trying to get a molecule from a null mapping (in class Mapping)!! Quitting!"<<endl;
00119         //              exit(1);
00120         //      }
00121                 return m;
00122         }
00123 }
00124 
00125 
00126 
00127 
00128 
00129 
00130 
00131 
00132 
00133 #endif /*MAPPING_HH_*/

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