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/World.cpp

    r42918b rd2d8f5  
    88#include "World.hpp"
    99
    10 #include <iostream>
     10#include "atom.hpp"
     11
     12using namespace std;
    1113
    1214/******************************* getter and setter ************************/
     
    7375}
    7476
     77// some legacy stuff to let the World know about items created outside
     78void World::registerAtom(atom *theAtom){
     79  OBSERVE;
     80  atoms[theAtom->getId()] = theAtom;
     81}
    7582
    76 // methods for WorldContent CRTP mechanism
    77 void World::registerContent(atom *atom){
    78   std::cout << "############### some kind of Atom created ##################" << std::endl;
     83void World::unregisterAtom(atom *theAtom){
     84  OBSERVE;
     85  atoms.erase(theAtom->getId());
    7986}
Note: See TracChangeset for help on using the changeset viewer.