Changeset d346b6
- Timestamp:
- Feb 5, 2010, 3:19:27 PM (15 years ago)
- Branches:
- Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
- Children:
- fc1b24
- Parents:
- 4d9c01
- Location:
- src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Makefile.am
r4d9c01 rd346b6 27 27 # deleted once everything is fully refactored 28 28 LEGACYSOURCE = Legacy/oldmenu.cpp 29 LEGACYHEADER = Legacy/oldmenu.hpp Legacy/WorldContent.hpp Legacy/WorldContent_impl.hpp29 LEGACYHEADER = Legacy/oldmenu.hpp 30 30 31 31 SOURCE = ${ANALYSISSOURCE} ${ATOMSOURCE} ${PATTERNSOURCE} ${UISOURCE} ${LEGACYSOURCE} bond.cpp bondgraph.cpp boundary.cpp config.cpp element.cpp ellipsoid.cpp errorlogger.cpp graph.cpp helpers.cpp info.cpp leastsquaremin.cpp linkedcell.cpp log.cpp logger.cpp memoryusageobserver.cpp moleculelist.cpp molecule.cpp molecule_dynamics.cpp molecule_fragmentation.cpp molecule_geometry.cpp molecule_graph.cpp molecule_pointcloud.cpp parser.cpp periodentafel.cpp tesselation.cpp tesselationhelpers.cpp vector.cpp verbose.cpp World.cpp -
src/World.cpp
r4d9c01 rd346b6 8 8 #include "World.hpp" 9 9 10 #include <iostream> 10 #include "atom.hpp" 11 12 using namespace std; 11 13 12 14 /******************************* getter and setter ************************/ … … 73 75 } 74 76 77 // some legacy stuff to let the World know about items created outside 78 void World::registerAtom(atom *theAtom){ 79 OBSERVE; 80 atoms[theAtom->getId()] = theAtom; 81 } 75 82 76 // methods for WorldContent CRTP mechanism 77 void World::registerContent(atom *atom){ 78 std::cout << "############### some kind of Atom created ##################" << std::endl;83 void World::unregisterAtom(atom *theAtom){ 84 OBSERVE; 85 atoms.erase(theAtom->getId()); 79 86 } -
src/World.hpp
r4d9c01 rd346b6 10 10 11 11 #include <boost/thread.hpp> 12 #include <map> 12 13 13 14 #include "Patterns/Observer.hpp" … … 27 28 private: 28 29 periodentafel *periode; 30 std::map<int,atom*> atoms; 29 31 30 32 … … 52 54 53 55 // functions used for the WorldContent template mechanism 54 void registerContent(atom *theAtom); 56 void registerAtom(atom *theAtom); 57 void unregisterAtom(atom *theAtom); 55 58 private: 56 59 MoleculeListClass *molecules; -
src/atom.cpp
r4d9c01 rd346b6 13 13 #include "parser.hpp" 14 14 #include "vector.hpp" 15 #include "World.hpp" 15 16 16 17 /************************************* Functions for class atom *************************************/ … … 21 22 atom::atom() : previous(NULL), next(NULL), father(this), sort(&nr) 22 23 { 24 World::get()->registerAtom(this); 23 25 node = &x; // TesselPoint::x can only be referenced from here 24 26 }; … … 28 30 atom::atom(atom *pointer) : previous(NULL), next(NULL), father(pointer), sort(&nr) 29 31 { 32 World::get()->registerAtom(this); 30 33 type = pointer->type; // copy element of atom 31 34 x.CopyVector(&pointer->x); // copy coordination … … 40 43 atom::~atom() 41 44 { 45 World::get()->unregisterAtom(this); 42 46 unlink(this); 43 47 }; -
src/atom_particleinfo.cpp
r4d9c01 rd346b6 20 20 }; 21 21 22 int ParticleInfo::getId() { 23 return nr; 24 } 25 22 26 ostream & operator << (ostream &ost, const ParticleInfo &a) 23 27 { -
src/atom_particleinfo.hpp
r4d9c01 rd346b6 35 35 ostream & operator << (ostream &ost) const; 36 36 37 int getId(); 38 37 39 private: 38 40 };
Note:
See TracChangeset
for help on using the changeset viewer.