xoreos
0.0.5
|
#include <objectcontainer.h>
Public Member Functions | |
ObjectContainer () | |
~ObjectContainer () | |
void | clearObjects () |
void | addObject (Witcher::Object &object) |
Add an object to this container. More... | |
void | removeObject (Witcher::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 Witcher::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 Location * | toLocation (Aurora::NWScript::EngineType *engineType) |
Private Types | |
typedef std::list< Witcher::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::Witcher::ObjectContainer::ObjectContainer | ( | ) |
Definition at line 69 of file objectcontainer.cpp.
Engines::Witcher::ObjectContainer::~ObjectContainer | ( | ) |
Definition at line 72 of file objectcontainer.cpp.
void Engines::Witcher::ObjectContainer::addObject | ( | Witcher::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::Witcher::Area::Area(), Engines::Witcher::Module::enter(), and Engines::Witcher::Area::loadObject().
void Engines::Witcher::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::Witcher::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::Witcher::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::Witcher::ObjectContainer::removeObject | ( | Witcher::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::Witcher::Area::clear(), Engines::Witcher::Module::unloadPC(), and Engines::Witcher::Area::~Area().
|
static |
Definition at line 133 of file objectcontainer.cpp.
Referenced by Engines::Witcher::Functions::location(), Engines::Witcher::Functions::musicBackgroundChangeDay(), Engines::Witcher::Functions::musicBackgroundChangeNight(), Engines::Witcher::Functions::musicBackgroundGetDayTrack(), Engines::Witcher::Functions::musicBackgroundGetNightTrack(), Engines::Witcher::Functions::musicBackgroundPlay(), and Engines::Witcher::Functions::musicBackgroundStop().
|
static |
Definition at line 153 of file objectcontainer.cpp.
Referenced by Engines::Witcher::Functions::getNearestCreature().
|
static |
Definition at line 149 of file objectcontainer.cpp.
Referenced by Engines::Witcher::Functions::actionCloseDoor(), and Engines::Witcher::Functions::actionOpenDoor().
|
static |
Definition at line 165 of file objectcontainer.cpp.
Referenced by Engines::Witcher::Functions::actionJumpToLocation(), Engines::Witcher::Functions::actionMoveToLocation(), Engines::Witcher::Functions::getPositionFromLocation(), and Engines::Witcher::Functions::jumpToLocation().
|
static |
Definition at line 129 of file objectcontainer.cpp.
|
static |
Definition at line 125 of file objectcontainer.cpp.
Referenced by Engines::Witcher::Functions::actionCloseDoor(), Engines::Witcher::Functions::actionJumpToLocation(), Engines::Witcher::Functions::actionJumpToObject(), Engines::Witcher::Functions::actionMoveToLocation(), Engines::Witcher::Functions::actionMoveToObject(), Engines::Witcher::Functions::actionOpenDoor(), Engines::Witcher::Functions::actionSpeakString(), Engines::Witcher::Functions::getArea(), Engines::Witcher::Functions::getDistanceToObject(), Engines::Witcher::Functions::getLocation(), Engines::Witcher::Functions::getName(), Engines::Witcher::Functions::getNearestCreature(), Engines::Witcher::Functions::getNearestObject(), Engines::Witcher::Functions::getNearestObjectByTag(), Engines::Witcher::Module::getObjectLocation(), Engines::Witcher::Functions::getObjectType(), Engines::Witcher::Functions::getParamObject(), Engines::Witcher::Functions::getPosition(), Engines::Witcher::Functions::jumpTo(), Engines::Witcher::Functions::jumpToLocation(), Engines::Witcher::Functions::jumpToObject(), Engines::Witcher::Functions::playSound(), Engines::Witcher::Functions::playSoundByStrRef(), Engines::Witcher::Functions::speakOneLinerConversation(), Engines::Witcher::Functions::speakString(), and Engines::Witcher::Functions::speakStringByStrRef().
|
static |
Definition at line 157 of file objectcontainer.cpp.
References Engines::Witcher::Creature::isPC().
Referenced by Engines::Witcher::Functions::getIsPC(), and Engines::Witcher::Functions::sendMessageToPC().
|
static |
Definition at line 145 of file objectcontainer.cpp.
|
static |
Definition at line 141 of file objectcontainer.cpp.
Referenced by Engines::Witcher::Functions::getIsOpen(), Engines::Witcher::Functions::getLastClosedBy(), Engines::Witcher::Functions::getLastOpenedBy(), Engines::Witcher::Functions::getLastUsedBy(), Engines::Witcher::Functions::getLocked(), and Engines::Witcher::Functions::setLocked().
|
static |
Definition at line 137 of file objectcontainer.cpp.
Referenced by Engines::Witcher::Functions::getWaypointByTag().
|
private |
Definition at line 99 of file objectcontainer.h.
Referenced by addObject(), clearObjects(), findObjectsByType(), getFirstObjectByType(), and removeObject().