Ignore:
Timestamp:
Feb 16, 2010, 4:24:07 PM (16 years ago)
Author:
Tillmann Crueger <crueger@…>
Children:
120f8b
Parents:
973c03
Message:

Rebuilt AtomDescriptors using PIMPL-Idiom and added unittest for descriptors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/World.hpp

    r973c03 r323177  
    2121class atom;
    2222class AtomDescriptor;
     23class AtomDescriptor_impl;
    2324
    2425class World : public Observable
    2526{
    26 friend class AtomDescriptor;
     27friend class AtomDescriptor_impl;
    2728public:
    2829
    2930  /***** getter and setter *****/
    3031  periodentafel* getPeriode();
    31   atom* getAtom(AtomDescriptor& descriptor);
    32   std::vector<atom*> getAllAtoms(AtomDescriptor& descriptor);
     32  atom* getAtom(AtomDescriptor descriptor);
     33  std::vector<atom*> getAllAtoms(AtomDescriptor descriptor);
    3334private:
    3435  periodentafel *periode;
     
    6364private:
    6465  MoleculeListClass *molecules;
     66
     67  // this is needed to assign unique IDs to atoms... so far
     68  // IDs are not assigned upon Atom creation, so we cannot query the ID
     69  // during construction. By using the dummy ID we can make sure all atoms
     70  // are actually stored in the map and don't overwrite each other.
     71  int dummyId;
    6572};
    6673
Note: See TracChangeset for help on using the changeset viewer.