xoreos  0.0.5
Public Member Functions | Static Public Member Functions | Private Types | Private Attributes | List of all members
Engines::KotOR2::ObjectContainer Class Reference

#include <objectcontainer.h>

Inheritance diagram for Engines::KotOR2::ObjectContainer:
Inheritance graph
[legend]
Collaboration diagram for Engines::KotOR2::ObjectContainer:
Collaboration graph
[legend]

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::ObjectgetFirstObjectByType (ObjectType type) const
 Return the first object of this type. More...
 
::Aurora::NWScript::ObjectSearchfindObjectsByType (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...
 
ObjectgetObjectByID (uint32 id) const
 Find a specific object by ID. More...
 
ObjectgetFirstObject () const
 Return the first object. More...
 
ObjectgetFirstObjectByTag (const Common::UString &tag) const
 Return the first object with this tag. More...
 
ObjectSearchfindObjects () const
 Return a search context to iterate over all objects. More...
 
ObjectSearchfindObjectsByTag (const Common::UString &tag) const
 Return a search context to iterate over all objects with this tag. More...
 

Static Public Member Functions

static KotOR2::ObjecttoObject (::Aurora::NWScript::Object *object)
 
static ModuletoModule (Aurora::NWScript::Object *object)
 
static AreatoArea (Aurora::NWScript::Object *object)
 
static WaypointtoWaypoint (Aurora::NWScript::Object *object)
 
static SituatedtoSituated (Aurora::NWScript::Object *object)
 
static PlaceabletoPlaceable (Aurora::NWScript::Object *object)
 
static DoortoDoor (Aurora::NWScript::Object *object)
 
static CreaturetoCreature (Aurora::NWScript::Object *object)
 
static CreaturetoPC (Aurora::NWScript::Object *object)
 
static CreaturetoPartyMember (Aurora::NWScript::Object *object)
 

Private Types

typedef std::list< KotOR2::Object * > ObjectList
 
typedef std::map< ObjectType, ObjectListObjectMap
 

Private Attributes

ObjectMap _objects
 

Additional Inherited Members

- Protected Member Functions inherited from Aurora::NWScript::ObjectContainer
void lock ()
 
void unlock ()
 

Detailed Description

Definition at line 63 of file objectcontainer.h.

Member Typedef Documentation

◆ ObjectList

Definition at line 94 of file objectcontainer.h.

◆ ObjectMap

Definition at line 95 of file objectcontainer.h.

Constructor & Destructor Documentation

◆ ObjectContainer()

Engines::KotOR2::ObjectContainer::ObjectContainer ( )

Definition at line 68 of file objectcontainer.cpp.

◆ ~ObjectContainer()

Engines::KotOR2::ObjectContainer::~ObjectContainer ( )

Definition at line 71 of file objectcontainer.cpp.

Member Function Documentation

◆ addObject()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clearObjects()

void Engines::KotOR2::ObjectContainer::clearObjects ( )

◆ findObjectsByType()

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.

◆ getFirstObjectByType()

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().

Here is the call graph for this function:

◆ removeObject()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toArea()

Area * Engines::KotOR2::ObjectContainer::toArea ( Aurora::NWScript::Object object)
static

◆ toCreature()

Creature * Engines::KotOR2::ObjectContainer::toCreature ( Aurora::NWScript::Object object)
static

◆ toDoor()

Door * Engines::KotOR2::ObjectContainer::toDoor ( Aurora::NWScript::Object object)
static

Definition at line 148 of file objectcontainer.cpp.

◆ toModule()

Module * Engines::KotOR2::ObjectContainer::toModule ( Aurora::NWScript::Object object)
static

Definition at line 128 of file objectcontainer.cpp.

◆ toObject()

KotOR2::Object * Engines::KotOR2::ObjectContainer::toObject ( ::Aurora::NWScript::Object object)
static

Definition at line 124 of file objectcontainer.cpp.

Referenced by Engines::KotOR2::Module::getObjectLocation(), and Engines::KotOR2::Functions::getParamObject().

Here is the caller graph for this function:

◆ toPartyMember()

Creature * Engines::KotOR2::ObjectContainer::toPartyMember ( Aurora::NWScript::Object object)
static

Definition at line 164 of file objectcontainer.cpp.

References Engines::KotOR2::Creature::isPartyMember().

Referenced by Engines::KotOR2::Functions::isObjectPartyMember().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toPC()

Creature * Engines::KotOR2::ObjectContainer::toPC ( Aurora::NWScript::Object object)
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toPlaceable()

Placeable * Engines::KotOR2::ObjectContainer::toPlaceable ( Aurora::NWScript::Object object)
static

Definition at line 144 of file objectcontainer.cpp.

◆ toSituated()

Situated * Engines::KotOR2::ObjectContainer::toSituated ( Aurora::NWScript::Object object)
static

◆ toWaypoint()

Waypoint * Engines::KotOR2::ObjectContainer::toWaypoint ( Aurora::NWScript::Object object)
static

Definition at line 136 of file objectcontainer.cpp.

Member Data Documentation

◆ _objects

ObjectMap Engines::KotOR2::ObjectContainer::_objects
private

The documentation for this class was generated from the following files: