Ignore:
Timestamp:
Mar 3, 2010, 5:47:40 PM (16 years ago)
Author:
Tillmann Crueger <crueger@…>
Children:
4938aa, f058ef
Parents:
14d898
Message:

Added mechanisms that allow reuse of IDs and changing Ids of Atoms

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/World.hpp

    r14d898 r3746aeb  
    130130   */
    131131  void destroyAtom(atomId_t);
     132
     133  /**
     134   * used when changing an atom Id.
     135   * Unless you are calling this method from inside an atom don't fiddle with the third parameter.
     136   *
     137   * Return value indicates wether the change could be done or not.
     138   */
     139  bool changeAtomId(atomId_t oldId, atomId_t newId, atom* target=0);
    132140
    133141  /**
     
    226234
    227235private:
     236
     237  atomId_t getNextAtomId();
     238  void releaseAtomId(atomId_t);
     239  bool reserveAtomId(atomId_t);
     240
    228241  periodentafel *periode;
    229242  AtomSet atoms;
     243  std::set<atomId_t> atomIdPool; //<!stores the pool for all available AtomIds below currAtomId
    230244  atomId_t currAtomId; //!< stores the next available Id for atoms
    231245  MoleculeSet molecules;
Note: See TracChangeset for help on using the changeset viewer.