Changeset a5471c for molecuilder/src/World.hpp
- Timestamp:
- Feb 18, 2010, 1:21:35 PM (16 years ago)
- Children:
- cbc27f
- Parents:
- b53a7e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/World.hpp
rb53a7e ra5471c 13 13 #include <vector> 14 14 #include <set> 15 #include <boost/shared_ptr.hpp> 15 16 16 17 #include "Patterns/Observer.hpp" … … 28 29 { 29 30 friend class AtomDescriptor_impl; 31 friend class AtomDescriptor; 32 33 typedef std::map<int,atom*> AtomList; 30 34 public: 31 35 … … 40 44 /***** Methods to work with the World *****/ 41 45 molecule *createMolecule(); 46 47 protected: 48 /**** Iterators to use internal data structures */ 49 class AtomIterator { 50 public: 51 AtomIterator(AtomDescriptor, World*); 52 AtomIterator(const AtomIterator&); 53 AtomIterator& operator++(); 54 bool operator==(const AtomIterator&); 55 bool operator!=(const AtomIterator&); 56 atom* operator*(); 57 protected: 58 void advanceState(); 59 World* world; 60 AtomList::iterator state; 61 boost::shared_ptr<AtomDescriptor_impl> descr; 62 }; 63 64 AtomIterator getAtomIter(AtomDescriptor descr); 65 42 66 private: 43 67 periodentafel *periode; 44 std::map<int,atom*>atoms;68 AtomList atoms; 45 69 std::set<molecule*> molecules; 46 70
Note:
See TracChangeset
for help on using the changeset viewer.