xoreos
0.0.5
|
#include <objectcontainer.h>
Public Member Functions | |
ObjectContainer () | |
~ObjectContainer () | |
void | clearObjects () |
void | addObject (KotOR::Object &object) |
Add an object to this container. More... | |
void | removeObject (KotOR::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 KotOR::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 SoundObject * | toSoundObject (Aurora::NWScript::Object *object) |
static Creature * | toPartyMember (Aurora::NWScript::Object *object) |
Private Types | |
typedef std::list< KotOR::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 64 of file objectcontainer.h.
|
private |
Definition at line 96 of file objectcontainer.h.
|
private |
Definition at line 97 of file objectcontainer.h.
Engines::KotOR::ObjectContainer::ObjectContainer | ( | ) |
Definition at line 69 of file objectcontainer.cpp.
Engines::KotOR::ObjectContainer::~ObjectContainer | ( | ) |
Definition at line 72 of file objectcontainer.cpp.
void Engines::KotOR::ObjectContainer::addObject | ( | KotOR::Object & | object | ) |
Add an object to this container.
Definition at line 85 of file objectcontainer.cpp.
References _objects, Aurora::NWScript::ObjectContainer::addObject(), Aurora::NWScript::ObjectContainer::lock(), and Aurora::NWScript::ObjectContainer::unlock().
Referenced by Engines::KotOR::Module::addToParty(), Engines::KotOR::Area::Area(), and Engines::KotOR::Area::loadObject().
void Engines::KotOR::ObjectContainer::clearObjects | ( | ) |
Definition at line 75 of file objectcontainer.cpp.
References _objects, Aurora::NWScript::ObjectContainer::clearObjects(), Aurora::NWScript::ObjectContainer::lock(), and Aurora::NWScript::ObjectContainer::unlock().
Aurora::NWScript::ObjectSearch * Engines::KotOR::ObjectContainer::findObjectsByType | ( | ObjectType | type | ) | const |
Return a search context to iterate over all objects of this type.
Definition at line 115 of file objectcontainer.cpp.
References _objects.
Aurora::NWScript::Object * Engines::KotOR::ObjectContainer::getFirstObjectByType | ( | ObjectType | type | ) | const |
Return the first object of this type.
Definition at line 105 of file objectcontainer.cpp.
References _objects, and Aurora::NWScript::SearchRange< T >::get().
void Engines::KotOR::ObjectContainer::removeObject | ( | KotOR::Object & | object | ) |
Remove an object from this container.
Definition at line 95 of file objectcontainer.cpp.
References _objects, Aurora::NWScript::ObjectContainer::lock(), Aurora::NWScript::ObjectContainer::removeObject(), and Aurora::NWScript::ObjectContainer::unlock().
Referenced by Engines::KotOR::Area::clear(), Engines::KotOR::Area::removeObject(), and Engines::KotOR::Area::~Area().
|
static |
Definition at line 133 of file objectcontainer.cpp.
Referenced by Engines::KotOR::Functions::musicBackgroundChangeDay(), Engines::KotOR::Functions::musicBackgroundChangeNight(), Engines::KotOR::Functions::musicBackgroundGetDayTrack(), Engines::KotOR::Functions::musicBackgroundGetNightTrack(), Engines::KotOR::Functions::musicBackgroundPlay(), and Engines::KotOR::Functions::musicBackgroundStop().
|
static |
Definition at line 153 of file objectcontainer.cpp.
Referenced by Engines::KotOR::Functions::actionMoveToObject(), Engines::KotOR::Module::addItemToActiveObject(), Engines::KotOR::Functions::clearAllActions(), Engines::KotOR::Module::clickObject(), Engines::KotOR::Functions::createItemOnObject(), Engines::KotOR::Functions::getClassByPosition(), Engines::KotOR::Functions::getGender(), Engines::KotOR::Functions::getItemInSlot(), Engines::KotOR::Functions::getLevelByClass(), Engines::KotOR::Functions::getLevelByPosition(), Engines::KotOR::Functions::getRacialType(), Engines::KotOR::Functions::getSubRace(), Engines::KotOR::Functions::isObjectPartyMember(), Engines::KotOR::DialogGUI::makeLookAtPC(), Engines::KotOR::Module::playAnimationOnActiveObject(), Engines::KotOR::DialogGUI::playDefaultAnimations(), Engines::KotOR::DialogGUI::playTalkAnimations(), and Engines::KotOR::Module::startConversation().
|
static |
Definition at line 149 of file objectcontainer.cpp.
Referenced by Engines::KotOR::Functions::actionCloseDoor(), and Engines::KotOR::Functions::actionOpenDoor().
|
static |
Definition at line 129 of file objectcontainer.cpp.
|
static |
Definition at line 125 of file objectcontainer.cpp.
Referenced by Engines::KotOR::Functions::actionMoveToObject(), Engines::KotOR::Functions::destroyObject(), Engines::KotOR::Functions::getCurrentHitPoints(), Engines::KotOR::Functions::getMaxHitPoints(), Engines::KotOR::Functions::getMinOneHP(), Engines::KotOR::Module::getObjectLocation(), Engines::KotOR::Functions::getParamObject(), Engines::KotOR::Functions::setMaxHitPoints(), Engines::KotOR::Functions::setMinOneHP(), and Engines::KotOR::Functions::signalEvent().
|
static |
Definition at line 169 of file objectcontainer.cpp.
References Engines::KotOR::Creature::isPartyMember().
|
static |
Definition at line 161 of file objectcontainer.cpp.
References Engines::KotOR::Creature::isPC().
Referenced by Engines::KotOR::Functions::getIsPC(), and Engines::KotOR::Functions::sendMessageToPC().
|
static |
Definition at line 145 of file objectcontainer.cpp.
Referenced by Engines::KotOR::Module::addItemToActiveObject(), Engines::KotOR::Module::clickObject(), and Engines::KotOR::Functions::createItemOnObject().
|
static |
Definition at line 141 of file objectcontainer.cpp.
Referenced by Engines::KotOR::Module::clickObject(), Engines::KotOR::Functions::getIsOpen(), Engines::KotOR::Functions::getLastClosedBy(), Engines::KotOR::Functions::getLastOpenedBy(), Engines::KotOR::Functions::getLastUsedBy(), Engines::KotOR::Functions::getLocked(), and Engines::KotOR::Functions::setLocked().
|
static |
Definition at line 157 of file objectcontainer.cpp.
Referenced by Engines::KotOR::Functions::soundObjectPlay(), and Engines::KotOR::Functions::soundObjectStop().
|
static |
Definition at line 137 of file objectcontainer.cpp.
|
private |
Definition at line 99 of file objectcontainer.h.
Referenced by addObject(), clearObjects(), findObjectsByType(), getFirstObjectByType(), and removeObject().