Changeset 25aa214
- Timestamp:
- Dec 19, 2025, 11:29:38 PM (9 days ago)
- Branches:
- Candidate_v1.7.1, stable
- Children:
- 98ad30
- Parents:
- d2be22
- git-author:
- Frederik Heber <frederik.heber@…> (11/16/25 11:19:01)
- git-committer:
- Frederik Heber <frederik.heber@…> (12/19/25 23:29:38)
- Location:
- src
- Files:
-
- 8 edited
-
Filling/unittests/IsVoidNode_FillPredicateUnitTest.cpp (modified) (1 diff)
-
Filling/unittests/Ops_FillPredicateUnitTest.cpp (modified) (1 diff)
-
Fragmentation/Exporters/HydrogenPool.cpp (modified) (1 diff)
-
Fragmentation/Exporters/unittests/SaturationDistanceMaximizerUnitTest.cpp (modified) (1 diff)
-
World.cpp (modified) (2 diffs)
-
World.hpp (modified) (1 diff)
-
unittests/AtomIdSetUnitTest.cpp (modified) (1 diff)
-
unittests/MoleculeUnitTest.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/Filling/unittests/IsVoidNode_FillPredicateUnitTest.cpp
rd2be22 r25aa214 80 80 // create some atoms as "neighbours" 81 81 atoms.resize((size_t)5, NULL); 82 std::generate_n(atoms.begin(), (size_t)5, boost::bind(&World::createAtom, World::getPointer()) ); 82 std::generate_n(atoms.begin(), (size_t)5, boost::bind( 83 static_cast<atom* (World::*)(World::CreateAtomNotificationType)>(&World::createAtom), 84 World::getPointer(), 85 World::CreateAtomNotificationType::NOTIFY_ON_CREATE_ATOM) 86 ); 83 87 84 88 // position them -
src/Filling/unittests/Ops_FillPredicateUnitTest.cpp
rd2be22 r25aa214 79 79 // create some atoms as "neighbours" 80 80 atoms.resize((size_t)5, NULL); 81 std::generate_n(atoms.begin(), (size_t)5, boost::bind(&World::createAtom, World::getPointer()) ); 81 std::generate_n(atoms.begin(), (size_t)5, boost::bind( 82 static_cast<atom* (World::*)(World::CreateAtomNotificationType)>(&World::createAtom), 83 World::getPointer(), 84 World::CreateAtomNotificationType::NOTIFY_ON_CREATE_ATOM) ); 82 85 83 86 // position them -
src/Fragmentation/Exporters/HydrogenPool.cpp
rd2be22 r25aa214 60 60 { 61 61 // get new hydrogen from world, but remove its observers 62 atom * const Walker = World::getInstance().createAtom( );62 atom * const Walker = World::getInstance().createAtom(World::CreateAtomNotificationType::DO_NOT_NOTIFY); 63 63 Walker->setType(HYDROGEN); // set element 64 64 Walker->setName(std::string("H_")+toString(HydrogenCount)); -
src/Fragmentation/Exporters/unittests/SaturationDistanceMaximizerUnitTest.cpp
rd2be22 r25aa214 87 87 // prepare SaturatedBonds each with degree one 88 88 atomVector.resize((size_t)MaxAtoms); 89 std::generate_n(atomVector.begin(), MaxAtoms, 90 boost::bind(&World::createAtom, boost::ref(World::getInstance()))); 89 std::generate_n(atomVector.begin(), MaxAtoms, boost::bind( 90 static_cast<atom* (World::*)(World::CreateAtomNotificationType)>(&World::createAtom), 91 World::getPointer(), 92 World::CreateAtomNotificationType::NOTIFY_ON_CREATE_ATOM)); 91 93 std::list<bond*> bondVector; 92 94 SaturationDistanceMaximizer::PositionContainers_t PositionContainers; -
src/World.cpp
rd2be22 r25aa214 391 391 } 392 392 393 atom *World::createAtom( ){393 atom *World::createAtom(const CreateAtomNotificationType _notify){ 394 394 OBSERVE; 395 395 atomId_t id = atomIdPool.getNextId(); … … 401 401 _lastchangedatom = res; 402 402 _lastchangedatomid = res->getId(); 403 NOTIFY(AtomInserted); 403 if (_notify == NOTIFY_ON_CREATE_ATOM) 404 NOTIFY(AtomInserted); 404 405 return res; 405 406 } -
src/World.hpp
rd2be22 r25aa214 337 337 void destroyMolecule(moleculeId_t); 338 338 339 /** Enumeration of a notification boolean switch that makes it more readible. 340 */ 341 enum CreateAtomNotificationType { 342 NOTIFY_ON_CREATE_ATOM, //!< default 343 DO_NOT_NOTIFY //!< this should only be used by the \a HydrogenPool for fragmentation hydrogens 344 }; 345 339 346 /** 340 347 * Create a new atom. This method should be used whenever any atom is needed. Assigns a unique ID and stores 341 348 * the atom in the World. If the atom is not destroyed it will automatically be destroyed when the world ends. 342 */ 343 atom *createAtom(); 349 * 350 * \param _notify - if do not notify, then the AtomInserted channel receives no update, used by \a HydrogenPool. 351 */ 352 atom *createAtom(const CreateAtomNotificationType _notify = NOTIFY_ON_CREATE_ATOM); 344 353 345 354 /** -
src/unittests/AtomIdSetUnitTest.cpp
rd2be22 r25aa214 63 63 64 64 atomVector.resize((size_t)MaxAtoms); 65 std::generate_n(atomVector.begin(), MaxAtoms, 66 boost::bind(&World::createAtom, boost::ref(World::getInstance()))); 65 std::generate_n(atomVector.begin(), MaxAtoms, boost::bind( 66 static_cast<atom* (World::*)(World::CreateAtomNotificationType)>(&World::createAtom), 67 World::getPointer(), 68 World::CreateAtomNotificationType::NOTIFY_ON_CREATE_ATOM) 69 ); 67 70 } 68 71 -
src/unittests/MoleculeUnitTest.cpp
rd2be22 r25aa214 64 64 65 65 atomVector.resize((size_t)MaxAtoms); 66 std::generate_n(atomVector.begin(), MaxAtoms, 67 boost::bind(&World::createAtom, boost::ref(World::getInstance()))); 66 std::generate_n(atomVector.begin(), MaxAtoms, boost::bind( 67 static_cast<atom* (World::*)(World::CreateAtomNotificationType)>(&World::createAtom), 68 World::getPointer(), 69 World::CreateAtomNotificationType::NOTIFY_ON_CREATE_ATOM) 70 ); 68 71 std::for_each(atomVector.begin(), atomVector.end(), 69 72 boost::bind(static_cast<void (AtomInfo::*)(int)>(&AtomInfo::setType), _1, (atomicNumber_t)1));
Note:
See TracChangeset
for help on using the changeset viewer.
