xoreos
0.0.5
|
#include <objectcontainer.h>
Public Member Functions | |
ObjectContainer () | |
~ObjectContainer () | |
void | clearObjects () |
void | addObject (KotOR2::Object &object) |
Add an object to this container. More... | |
void | removeObject (KotOR2::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 KotOR2::Object * | toObject (::Aurora::NWScript::Object *object) |
static Module * | toModule (Aurora::NWScript::Object *object) |
static Area * | toArea (Aurora::NWScript::Object *object) |
static Waypoint * | toWaypoint (Aurora::NWScript::Object *object) |
static Situated * | toSituated (Aurora::NWScript::Object *object) |
static Placeable * | toPlaceable (Aurora::NWScript::Object *object) |
static Door * | toDoor (Aurora::NWScript::Object *object) |
static Creature * | toCreature (Aurora::NWScript::Object *object) |
static Creature * | toPC (Aurora::NWScript::Object *object) |
static Creature * | toPartyMember (Aurora::NWScript::Object *object) |
Private Types | |
typedef std::list< KotOR2::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 63 of file objectcontainer.h.
|
private |
Definition at line 94 of file objectcontainer.h.
|
private |
Definition at line 95 of file objectcontainer.h.
Engines::KotOR2::ObjectContainer::ObjectContainer | ( | ) |
Definition at line 68 of file objectcontainer.cpp.
Engines::KotOR2::ObjectContainer::~ObjectContainer | ( | ) |
Definition at line 71 of file objectcontainer.cpp.
void Engines::KotOR2::ObjectContainer::addObject | ( | KotOR2::Object & | object | ) |
Add an object to this container.
Definition at line 84 of file objectcontainer.cpp.
References _objects, Aurora::NWScript::ObjectContainer::addObject(), Aurora::NWScript::ObjectContainer::lock(), and Aurora::NWScript::ObjectContainer::unlock().
Referenced by Engines::KotOR2::Area::Area(), and Engines::KotOR2::Area::loadObject().
void Engines::KotOR2::ObjectContainer::clearObjects | ( | ) |
Definition at line 74 of file objectcontainer.cpp.
References _objects, Aurora::NWScript::ObjectContainer::clearObjects(), Aurora::NWScript::ObjectContainer::lock(), and Aurora::NWScript::ObjectContainer::unlock().
Aurora::NWScript::ObjectSearch * Engines::KotOR2::ObjectContainer::findObjectsByType | ( | ObjectType | type | ) | const |
Return a search context to iterate over all objects of this type.
Definition at line 114 of file objectcontainer.cpp.
References _objects.
Aurora::NWScript::Object * Engines::KotOR2::ObjectContainer::getFirstObjectByType | ( | ObjectType | type | ) | const |
Return the first object of this type.
Definition at line 104 of file objectcontainer.cpp.
References _objects, and Aurora::NWScript::SearchRange< T >::get().
void Engines::KotOR2::ObjectContainer::removeObject | ( | KotOR2::Object & | object | ) |
Remove an object from this container.
Definition at line 94 of file objectcontainer.cpp.
References _objects, Aurora::NWScript::ObjectContainer::lock(), Aurora::NWScript::ObjectContainer::removeObject(), and Aurora::NWScript::ObjectContainer::unlock().
Referenced by Engines::KotOR2::Area::clear(), and Engines::KotOR2::Area::~Area().
|
static |
Definition at line 132 of file objectcontainer.cpp.
Referenced by Engines::KotOR2::Functions::musicBackgroundChangeDay(), Engines::KotOR2::Functions::musicBackgroundChangeNight(), Engines::KotOR2::Functions::musicBackgroundGetDayTrack(), Engines::KotOR2::Functions::musicBackgroundGetNightTrack(), Engines::KotOR2::Functions::musicBackgroundPlay(), and Engines::KotOR2::Functions::musicBackgroundStop().
|
static |
Definition at line 152 of file objectcontainer.cpp.
Referenced by Engines::KotOR2::Module::clickObject(), Engines::KotOR2::Module::playAnimationOnActiveObject(), Engines::KotOR2::DialogGUI::playDefaultAnimations(), Engines::KotOR2::DialogGUI::playTalkAnimations(), and Engines::KotOR2::Module::startConversation().
|
static |
Definition at line 148 of file objectcontainer.cpp.
|
static |
Definition at line 128 of file objectcontainer.cpp.
|
static |
Definition at line 124 of file objectcontainer.cpp.
Referenced by Engines::KotOR2::Module::getObjectLocation(), and Engines::KotOR2::Functions::getParamObject().
|
static |
Definition at line 164 of file objectcontainer.cpp.
References Engines::KotOR2::Creature::isPartyMember().
Referenced by Engines::KotOR2::Functions::isObjectPartyMember().
|
static |
Definition at line 156 of file objectcontainer.cpp.
References Engines::KotOR2::Creature::isPC().
Referenced by Engines::KotOR2::Functions::getIsPC(), and Engines::KotOR2::Functions::sendMessageToPC().
|
static |
Definition at line 144 of file objectcontainer.cpp.
|
static |
Definition at line 140 of file objectcontainer.cpp.
Referenced by Engines::KotOR2::Functions::getIsOpen(), Engines::KotOR2::Functions::getLastClosedBy(), Engines::KotOR2::Functions::getLastOpenedBy(), Engines::KotOR2::Functions::getLastUsedBy(), Engines::KotOR2::Functions::getLocked(), and Engines::KotOR2::Functions::setLocked().
|
static |
Definition at line 136 of file objectcontainer.cpp.
|
private |
Definition at line 97 of file objectcontainer.h.
Referenced by addObject(), clearObjects(), findObjectsByType(), getFirstObjectByType(), and removeObject().