44 WorldPtr old_world = world_.lock();
46 old_world->removeObserver(observer_handle_);
61 WorldPtr world = other.world_.lock();
64 changes_ = other.changes_;
66 WorldWeakPtr(world).swap(world_);
67 observer_handle_ = world->addObserver(
76 WorldPtr old_world = world_.lock();
78 old_world->removeObserver(observer_handle_);
87 WorldPtr old_world = world_.lock();
89 old_world->removeObserver(observer_handle_);
91 WorldWeakPtr(world).swap(world_);
98 WorldPtr old_world = world_.lock();
101 old_world->notifyObserverAllObjects(observer_handle_,
World::DESTROY);
102 old_world->removeObserver(observer_handle_);
105 WorldWeakPtr(world).swap(world_);
Maintain a diff list of changes that have happened to a World.
void setWorld(const WorldPtr &world)
Set which world to record. Records all objects in old world (if any) as DESTROYED and all objects in ...
void clearChanges()
Clear the internally maintained vector of changes.
void reset()
Turn off recording and erase all previously recorded changes.
Represents an action that occurred on an object in the world. Several bits may be set indicating seve...