Ignore:
Timestamp:
Feb 25, 2010, 4:43:02 PM (16 years ago)
Author:
Tillmann Crueger <crueger@…>
Children:
3db67e
Parents:
2e6496
Message:

Made the world solely responsible for creating and erasing molecules.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/World.hpp

    r2e6496 r8d9d38  
    1616#include <boost/shared_ptr.hpp>
    1717
    18 
     18#include "defs.hpp"
    1919#include "Patterns/Observer.hpp"
    2020#include "Patterns/Cacheable.hpp"
     
    4040friend class ManipulateAtomsProcess;
    4141template<typename> friend class AtomsCalculation;
    42 
    43 typedef std::map<int,atom*> AtomSet;
    44 typedef std::map<int,molecule*> MoleculeSet;
     42typedef std::map<atomId_t,atom*> AtomSet;
     43typedef std::map<moleculeId_t,molecule*> MoleculeSet;
    4544public:
    4645
     
    9089  molecule *createMolecule();
    9190
     91  void destroyMolecule(molecule*);
     92  void destroyMolecule(moleculeId_t);
     93
    9294  /**
    9395   * Create a new atom. This method should be used whenever any atom is needed. Assigns a unique ID and stores
     
    112114   * atom directly since this will leave the pointer inside the world.
    113115   */
    114   void destroyAtom(int);
     116  void destroyAtom(atomId_t);
    115117
    116118  /**
     
    166168  periodentafel *periode;
    167169  AtomSet atoms;
    168   int currAtomId; //!< stores the next available Id for atoms
     170  atomId_t currAtomId; //!< stores the next available Id for atoms
    169171  MoleculeSet molecules;
    170   int currMoleculeId;
     172  moleculeId_t currMoleculeId;
    171173
    172174
Note: See TracChangeset for help on using the changeset viewer.