xoreos
0.0.5
|
#include <objectcontainer.h>
Public Member Functions | |
ObjectContainer () | |
~ObjectContainer () | |
void | clearObjects () |
void | addObject (Sonic::Object &object) |
Add an object to this container. More... | |
void | removeObject (Sonic::Object &object) |
Remove an object from this container. More... | |
::Aurora::NWScript::Object * | getFirstObjectByType (ObjectType type) const |
Return the first object of this type. More... | |
::Aurora::NWScript::ObjectSearch * | findObjectsByType (ObjectType type) const |
Return a search context to iterate over all objects of this type. More... | |
Public Member Functions inherited from Aurora::NWScript::ObjectContainer | |
ObjectContainer () | |
~ObjectContainer () | |
void | clearObjects () |
void | addObject (Object &object) |
Add an object to this container. More... | |
void | removeObject (Object &object) |
Remove an object from this container. More... | |
Object * | getObjectByID (uint32 id) const |
Find a specific object by ID. More... | |
Object * | getFirstObject () const |
Return the first object. More... | |
Object * | getFirstObjectByTag (const Common::UString &tag) const |
Return the first object with this tag. More... | |
ObjectSearch * | findObjects () const |
Return a search context to iterate over all objects. More... | |
ObjectSearch * | findObjectsByTag (const Common::UString &tag) const |
Return a search context to iterate over all objects with this tag. More... | |
Static Public Member Functions | |
static Sonic::Object * | toObject (::Aurora::NWScript::Object *object) |
static Module * | toModule (Aurora::NWScript::Object *object) |
static Area * | toArea (Aurora::NWScript::Object *object) |
static Placeable * | toPlaceable (Aurora::NWScript::Object *object) |
Private Types | |
typedef std::list< Sonic::Object * > | ObjectList |
typedef std::map< ObjectType, ObjectList > | ObjectMap |
Private Attributes | |
ObjectMap | _objects |
Additional Inherited Members | |
Protected Member Functions inherited from Aurora::NWScript::ObjectContainer | |
void | lock () |
void | unlock () |
Definition at line 59 of file objectcontainer.h.
|
private |
Definition at line 84 of file objectcontainer.h.
|
private |
Definition at line 85 of file objectcontainer.h.
Engines::Sonic::ObjectContainer::ObjectContainer | ( | ) |
Definition at line 64 of file objectcontainer.cpp.
Engines::Sonic::ObjectContainer::~ObjectContainer | ( | ) |
Definition at line 67 of file objectcontainer.cpp.
void Engines::Sonic::ObjectContainer::addObject | ( | Sonic::Object & | object | ) |
Add an object to this container.
Definition at line 80 of file objectcontainer.cpp.
References _objects, Aurora::NWScript::ObjectContainer::addObject(), Aurora::NWScript::ObjectContainer::lock(), and Aurora::NWScript::ObjectContainer::unlock().
Referenced by Engines::Sonic::Area::Area(), and Engines::Sonic::Area::loadObject().
void Engines::Sonic::ObjectContainer::clearObjects | ( | ) |
Definition at line 70 of file objectcontainer.cpp.
References _objects, Aurora::NWScript::ObjectContainer::clearObjects(), Aurora::NWScript::ObjectContainer::lock(), and Aurora::NWScript::ObjectContainer::unlock().
Aurora::NWScript::ObjectSearch * Engines::Sonic::ObjectContainer::findObjectsByType | ( | ObjectType | type | ) | const |
Return a search context to iterate over all objects of this type.
Definition at line 110 of file objectcontainer.cpp.
References _objects.
Aurora::NWScript::Object * Engines::Sonic::ObjectContainer::getFirstObjectByType | ( | ObjectType | type | ) | const |
Return the first object of this type.
Definition at line 100 of file objectcontainer.cpp.
References _objects, and Aurora::NWScript::SearchRange< T >::get().
void Engines::Sonic::ObjectContainer::removeObject | ( | Sonic::Object & | object | ) |
Remove an object from this container.
Definition at line 90 of file objectcontainer.cpp.
References _objects, Aurora::NWScript::ObjectContainer::lock(), Aurora::NWScript::ObjectContainer::removeObject(), and Aurora::NWScript::ObjectContainer::unlock().
Referenced by Engines::Sonic::Area::~Area().
|
static |
Definition at line 128 of file objectcontainer.cpp.
|
static |
Definition at line 124 of file objectcontainer.cpp.
|
static |
Definition at line 120 of file objectcontainer.cpp.
|
static |
Definition at line 132 of file objectcontainer.cpp.
|
private |
Definition at line 87 of file objectcontainer.h.
Referenced by addObject(), clearObjects(), findObjectsByType(), getFirstObjectByType(), and removeObject().