Changeset 5d4edf for molecuilder/src/World.hpp
- Timestamp:
- Feb 19, 2010, 11:49:42 AM (16 years ago)
- Children:
- 9ef76a
- Parents:
- cbc27f
- git-author:
- Tillmann Crueger <crueger@…> (02/19/10 11:31:39)
- git-committer:
- Tillmann Crueger <crueger@…> (02/19/10 11:49:42)
- File:
-
- 1 edited
-
molecuilder/src/World.hpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/World.hpp
rcbc27f r5d4edf 9 9 #define WORLD_HPP_ 10 10 11 #include < boost/thread.hpp>11 #include <string> 12 12 #include <map> 13 13 #include <vector> 14 14 #include <set> 15 #include <boost/thread.hpp> 15 16 #include <boost/shared_ptr.hpp> 17 16 18 17 19 #include "Patterns/Observer.hpp" … … 25 27 class AtomDescriptor; 26 28 class AtomDescriptor_impl; 29 class ManipulateAtomsProcess; 27 30 28 31 class World : public Observable … … 30 33 friend class AtomDescriptor_impl; 31 34 friend class AtomDescriptor; 35 36 friend class ManipulateAtomsProcess; 32 37 33 38 typedef std::map<int,atom*> AtomList; … … 45 50 molecule *createMolecule(); 46 51 52 ManipulateAtomsProcess* manipulateAtoms(boost::function<void(atom*)>,std::string,AtomDescriptor); 53 47 54 protected: 48 55 /**** Iterators to use internal data structures */ 49 56 class AtomIterator { 50 57 public: 58 AtomIterator(); 51 59 AtomIterator(AtomDescriptor, World*); 52 60 AtomIterator(const AtomIterator&); 53 AtomIterator& operator++(); 61 AtomIterator& operator=(const AtomIterator&); 62 AtomIterator& operator++(); // prefix 63 AtomIterator operator++(int); // postfix with dummy parameter 54 64 bool operator==(const AtomIterator&); 65 bool operator==(const AtomList::iterator&); 55 66 bool operator!=(const AtomIterator&); 67 bool operator!=(const AtomList::iterator&); 56 68 atom* operator*(); 69 70 int getCount(); 57 71 protected: 58 72 void advanceState(); … … 60 74 AtomList::iterator state; 61 75 boost::shared_ptr<AtomDescriptor_impl> descr; 76 int index; 62 77 }; 63 78 64 79 AtomIterator getAtomIter(AtomDescriptor descr); 80 AtomList::iterator atomEnd(); 65 81 66 82 private:
Note:
See TracChangeset
for help on using the changeset viewer.
