Ignore:
Timestamp:
Feb 5, 2010, 3:19:27 PM (16 years ago)
Author:
Tillmann Crueger <crueger@…>
Children:
86b917
Parents:
42918b
Message:

Made all atoms register themselves with the world upon creation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/atom.cpp

    r42918b rd2d8f5  
    1313#include "parser.hpp"
    1414#include "vector.hpp"
     15#include "World.hpp"
    1516
    1617/************************************* Functions for class atom *************************************/
     
    2122atom::atom() : previous(NULL), next(NULL), father(this), sort(&nr)
    2223{
     24  World::get()->registerAtom(this);
    2325  node = &x;  // TesselPoint::x can only be referenced from here
    2426};
     
    2830atom::atom(atom *pointer) : previous(NULL), next(NULL), father(pointer), sort(&nr)
    2931{
     32  World::get()->registerAtom(this);
    3033  type = pointer->type;  // copy element of atom
    3134  x.CopyVector(&pointer->x); // copy coordination
     
    4043atom::~atom()
    4144{
     45  World::get()->unregisterAtom(this);
    4246  unlink(this);
    4347};
Note: See TracChangeset for help on using the changeset viewer.