Changes in src/World.cpp [35b698:6d574a]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/World.cpp
r35b698 r6d574a 14 14 #include "molecule.hpp" 15 15 #include "periodentafel.hpp" 16 #include "ThermoStatContainer.hpp"17 16 #include "Descriptors/AtomDescriptor.hpp" 18 17 #include "Descriptors/AtomDescriptor_impl.hpp" … … 21 20 #include "Descriptors/SelectiveIterator_impl.hpp" 22 21 #include "Actions/ManipulateAtomsProcess.hpp" 22 #include "Helpers/Assert.hpp" 23 23 24 24 #include "Patterns/Singleton_impl.hpp" … … 91 91 }; 92 92 93 class ThermoStatContainer * World::getThermostats()94 {95 return Thermostats;96 }97 98 99 93 int World::getExitFlag() { 100 94 return ExitFlag; … … 112 106 molecule *mol = NULL; 113 107 mol = NewMolecule(); 114 cout << "Creating molecule with id " << currMoleculeId << "." << endl; 115 assert(!molecules.count(currMoleculeId)); 108 ASSERT(!molecules.count(currMoleculeId),"currMoleculeId did not specify an unused ID"); 116 109 mol->setId(currMoleculeId++); 117 110 // store the molecule by ID … … 129 122 OBSERVE; 130 123 molecule *mol = molecules[id]; 131 assert(mol);124 ASSERT(mol,"Molecule id that was meant to be destroyed did not exist"); 132 125 DeleteMolecule(mol); 133 126 molecules.erase(id); … … 165 158 OBSERVE; 166 159 atom *atom = atoms[id]; 167 assert(atom);160 ASSERT(atom,"Atom ID that was meant to be destroyed did not exist"); 168 161 DeleteAtom(atom); 169 162 atoms.erase(id); … … 177 170 if(!target){ 178 171 target = atoms[oldId]; 179 assert(target &&"Atom with that ID not found");172 ASSERT(target,"Atom with that ID not found"); 180 173 return target->changeId(newId); 181 174 } … … 289 282 periode(new periodentafel), 290 283 configuration(new config), 291 Thermostats(new ThermoStatContainer),292 284 ExitFlag(0), 293 285 atoms(), … … 315 307 delete periode; 316 308 delete configuration; 317 delete Thermostats;318 309 MoleculeSet::iterator molIter; 319 310 for(molIter=molecules.begin();molIter!=molecules.end();++molIter){
Note:
See TracChangeset
for help on using the changeset viewer.