Changeset d2dbac0 for src/World.hpp


Ignore:
Timestamp:
Feb 25, 2010, 10:50:54 AM (15 years ago)
Author:
Tillmann Crueger <crueger@…>
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:
244d26
Parents:
0e2a47
Message:

moved Iterators for the World to a seperate file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/World.hpp

    r0e2a47 rd2dbac0  
    4141template<typename> friend class AtomsCalculation;
    4242
    43 typedef std::map<int,atom*> AtomList;
     43typedef std::map<int,atom*> AtomSet;
     44typedef std::map<int,molecule*> MoleculeSet;
    4445public:
    4546
     
    131132    AtomIterator  operator++(int);  // postfix with dummy parameter
    132133    bool operator==(const AtomIterator&);
    133     bool operator==(const AtomList::iterator&);
     134    bool operator==(const AtomSet::iterator&);
    134135    bool operator!=(const AtomIterator&);
    135     bool operator!=(const AtomList::iterator&);
     136    bool operator!=(const AtomSet::iterator&);
    136137    atom* operator*();
    137138
     
    140141    void advanceState();
    141142    World* world;
    142     AtomList::iterator state;
     143    AtomSet::iterator state;
    143144    boost::shared_ptr<AtomDescriptor_impl>  descr;
    144145    int index;
     
    152153
    153154  /**
    154    * returns an iterator to the end of the AtomList. Due to overloading this iterator
     155   * returns an iterator to the end of the AtomSet. Due to overloading this iterator
    155156   * can be compared to iterators produced by getAtomIter (see the mis-matching types).
    156157   * Thus it can be used to detect when such an iterator is at the end of the list.
    157158   * used for internal purposes, like AtomProcesses and AtomCalculations.
    158159   */
    159   AtomList::iterator atomEnd();
     160  AtomSet::iterator atomEnd();
    160161
    161162  /******* Internal manipulation routines for double callback and Observer mechanism ******/
     
    164165private:
    165166  periodentafel *periode;
    166   AtomList atoms;
     167  AtomSet atoms;
    167168  int currAtomId; //!< stores the next available Id for atoms
    168   std::set<molecule*> molecules;
     169  MoleculeSet molecules;
     170  int currMoleculeId;
    169171
    170172
Note: See TracChangeset for help on using the changeset viewer.