Changeset 120f8b for molecuilder/src/World.hpp
- Timestamp:
- Feb 16, 2010, 5:26:59 PM (16 years ago)
- Children:
- b53a7e
- Parents:
- 323177
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/World.hpp
r323177 r120f8b 12 12 #include <map> 13 13 #include <vector> 14 #include <set> 14 15 15 16 #include "Patterns/Observer.hpp" … … 20 21 class MoleculeListClass; 21 22 class atom; 23 class molecule; 22 24 class AtomDescriptor; 23 25 class AtomDescriptor_impl; … … 29 31 30 32 /***** getter and setter *****/ 31 periodentafel* getPeriode(); 33 // reference to pointer is used for legacy reason... reference will be removed latter to keep encapsulation of World object 34 periodentafel *&getPeriode(); 32 35 atom* getAtom(AtomDescriptor descriptor); 33 36 std::vector<atom*> getAllAtoms(AtomDescriptor descriptor); 37 int numAtoms(); 38 int numMolecules(); 39 40 /***** Methods to work with the World *****/ 41 molecule *createMolecule(); 34 42 private: 35 43 periodentafel *periode; 36 44 std::map<int,atom*> atoms; 45 std::set<molecule*> molecules; 37 46 38 47 … … 57 66 *****/ 58 67 public: 59 MoleculeListClass * getMolecules();68 MoleculeListClass *&getMolecules(); 60 69 61 70 // functions used for the WorldContent template mechanism … … 63 72 void unregisterAtom(atom *theAtom); 64 73 private: 65 MoleculeListClass *molecules; 74 // this function cleans up anything that cannot be cleaned while the lock is active 75 // at a later point all these cleanups have to be moved to the World Class so the deadlock and 76 // race condition can both be avoided. 77 void destroyLegacy(); 78 79 MoleculeListClass *molecules_deprecated; 66 80 67 81 // this is needed to assign unique IDs to atoms... so far
Note:
See TracChangeset
for help on using the changeset viewer.