xoreos
0.0.5
|
#include <objectcontainer.h>
Public Member Functions | |
ObjectContainer () | |
~ObjectContainer () | |
void | clearObjects () |
void | addObject (NWN::Object &object) |
Add an object to this container. More... | |
void | removeObject (NWN::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 NWN::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< NWN::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::NWN::ObjectContainer::ObjectContainer | ( | ) |
Definition at line 69 of file objectcontainer.cpp.
Engines::NWN::ObjectContainer::~ObjectContainer | ( | ) |
Definition at line 72 of file objectcontainer.cpp.
void Engines::NWN::ObjectContainer::addObject | ( | NWN::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::NWN::Area::Area(), Engines::NWN::Area::loadObject(), and Engines::NWN::Module::usePC().
void Engines::NWN::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::NWN::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::NWN::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::NWN::ObjectContainer::removeObject | ( | NWN::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::NWN::Area::clear(), Engines::NWN::Module::unloadPC(), and Engines::NWN::Area::~Area().
|
static |
Definition at line 133 of file objectcontainer.cpp.
Referenced by Engines::NWN::Functions::location(), Engines::NWN::Functions::musicBackgroundChangeDay(), Engines::NWN::Functions::musicBackgroundChangeNight(), Engines::NWN::Functions::musicBackgroundGetDayTrack(), Engines::NWN::Functions::musicBackgroundGetNightTrack(), Engines::NWN::Functions::musicBackgroundPlay(), and Engines::NWN::Functions::musicBackgroundStop().
|
static |
Definition at line 153 of file objectcontainer.cpp.
Referenced by Engines::NWN::Functions::addHenchman(), Engines::NWN::Functions::getAbilityScore(), Engines::NWN::Functions::getAlignmentGoodEvil(), Engines::NWN::Functions::getAlignmentLawChaos(), Engines::NWN::Functions::getAssociate(), Engines::NWN::Functions::getClassByPosition(), Engines::NWN::Functions::getCommandable(), Engines::NWN::Functions::getGender(), Engines::NWN::Functions::getGoodEvilValue(), Engines::NWN::Functions::getHasFeat(), Engines::NWN::Functions::getHenchman(), Engines::NWN::Functions::getHitDice(), Engines::NWN::Functions::getIsDead(), Engines::NWN::Functions::getIsDM(), Engines::NWN::Functions::getLawChaosValue(), Engines::NWN::Functions::getLevelByClass(), Engines::NWN::Functions::getLevelByPosition(), Engines::NWN::Functions::getMaster(), Engines::NWN::Functions::getNearestCreature(), Engines::NWN::Functions::getRacialType(), Engines::NWN::Functions::getSkillRank(), Engines::NWN::Functions::getXP(), Engines::NWN::Functions::removeHenchman(), and Engines::NWN::Functions::setCommandable().
|
static |
Definition at line 149 of file objectcontainer.cpp.
Referenced by Engines::NWN::Functions::actionCloseDoor(), and Engines::NWN::Functions::actionOpenDoor().
|
static |
Definition at line 165 of file objectcontainer.cpp.
Referenced by Engines::NWN::Functions::actionMoveToLocation(), Engines::NWN::Functions::getPositionFromLocation(), and Engines::NWN::Functions::jumpToLocation().
|
static |
Definition at line 129 of file objectcontainer.cpp.
|
static |
Definition at line 125 of file objectcontainer.cpp.
Referenced by Engines::NWN::Functions::actionCloseDoor(), Engines::NWN::Functions::actionMoveToLocation(), Engines::NWN::Functions::actionMoveToObject(), Engines::NWN::Functions::actionOpenDoor(), Engines::NWN::Functions::actionSpeakString(), Engines::NWN::Functions::actionStartConversation(), Engines::NWN::Functions::beginConversation(), Engines::NWN::Functions::getArea(), Engines::NWN::Functions::getDistanceToObject(), Engines::NWN::Functions::getLocation(), Engines::NWN::Functions::getName(), Engines::NWN::Functions::getNearestCreature(), Engines::NWN::Functions::getNearestObject(), Engines::NWN::Functions::getNearestObjectByTag(), Engines::NWN::Functions::getObjectType(), Engines::NWN::Functions::getParamObject(), Engines::NWN::Functions::getPCSpeaker(), Engines::NWN::Functions::getPosition(), Engines::NWN::Functions::isInConversation(), Engines::NWN::Functions::jumpTo(), Engines::NWN::Functions::jumpToLocation(), Engines::NWN::Functions::jumpToObject(), Engines::NWN::Functions::playAnimation(), Engines::NWN::Functions::playSound(), Engines::NWN::Functions::playSoundByStrRef(), Engines::NWN::Functions::playVoiceChat(), Engines::NWN::Functions::speakOneLinerConversation(), Engines::NWN::Functions::speakString(), and Engines::NWN::Functions::speakStringByStrRef().
|
static |
Definition at line 157 of file objectcontainer.cpp.
References Engines::NWN::Creature::isPC().
Referenced by Engines::NWN::Functions::actionStartConversation(), Engines::NWN::Functions::beginConversation(), Engines::NWN::Functions::getIsPC(), and Engines::NWN::Functions::sendMessageToPC().
|
static |
Definition at line 145 of file objectcontainer.cpp.
|
static |
Definition at line 141 of file objectcontainer.cpp.
Referenced by Engines::NWN::Functions::getIsOpen(), Engines::NWN::Functions::getLastClosedBy(), Engines::NWN::Functions::getLastOpenedBy(), Engines::NWN::Functions::getLastUsedBy(), Engines::NWN::Functions::getLocked(), and Engines::NWN::Functions::setLocked().
|
static |
Definition at line 137 of file objectcontainer.cpp.
Referenced by Engines::NWN::Functions::getWaypointByTag().
|
private |
Definition at line 99 of file objectcontainer.h.
Referenced by addObject(), clearObjects(), findObjectsByType(), getFirstObjectByType(), and removeObject().