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