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/unittests/bondgraphunittest.cpp

    r2e6496 r8d9d38  
    5252
    5353  // construct periodentafel
    54   tafel = new periodentafel;
     54  tafel = World::get()->getPeriode();
    5555  tafel->AddElement(hydrogen);
    5656  tafel->AddElement(carbon);
    5757
    5858  // construct molecule (tetraeder of hydrogens)
    59   TestMolecule = new molecule(tafel);
     59  TestMolecule = World::get()->createMolecule();
    6060  Walker = World::get()->createAtom();
    6161  Walker->type = hydrogen;
     
    9797
    9898  // remove molecule
    99   delete(TestMolecule);
     99  World::get()->destroyMolecule(TestMolecule);
    100100  // note that all the atoms are cleaned by TestMolecule
    101   delete(tafel);
    102   // note that element is cleaned by periodentafel
     101  World::destroy();
    103102};
    104103
Note: See TracChangeset for help on using the changeset viewer.