Ignore:
Timestamp:
Feb 25, 2010, 10:50:54 AM (16 years ago)
Author:
Tillmann Crueger <crueger@…>
Children:
2e6496
Parents:
bb89b9
Message:

moved Iterators for the World to a seperate file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/World.hpp

    rbb89b9 ra1a532  
    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.