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

#include <objectcontainer.h>

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

Public Member Functions

 ObjectContainer ()
 
 ~ObjectContainer ()
 
void clearObjects ()
 
void addObject (Jade::Object &object)
 Add an object to this container. More...
 
void removeObject (Jade::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 Jade::ObjecttoObject (::Aurora::NWScript::Object *object)
 
static AreatoArea (Aurora::NWScript::Object *object)
 
static WaypointtoWaypoint (Aurora::NWScript::Object *object)
 
static PlaceabletoPlaceable (Aurora::NWScript::Object *object)
 
static CreaturetoCreature (Aurora::NWScript::Object *object)
 
static CreaturetoPC (Aurora::NWScript::Object *object)
 
static LocationtoLocation (Aurora::NWScript::EngineType *engineType)
 
static EventtoEvent (Aurora::NWScript::EngineType *engineType)
 

Private Types

typedef std::list< Jade::Object * > ObjectList
 

Private Attributes

ObjectList _objects [kObjectTypeMAX]
 

Additional Inherited Members

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

Detailed Description

Definition at line 62 of file objectcontainer.h.

Member Typedef Documentation

◆ ObjectList

Definition at line 92 of file objectcontainer.h.

Constructor & Destructor Documentation

◆ ObjectContainer()

Engines::Jade::ObjectContainer::ObjectContainer ( )

Definition at line 68 of file objectcontainer.cpp.

◆ ~ObjectContainer()

Engines::Jade::ObjectContainer::~ObjectContainer ( )

Definition at line 71 of file objectcontainer.cpp.

Member Function Documentation

◆ addObject()

void Engines::Jade::ObjectContainer::addObject ( Jade::Object object)

Add an object to this container.

Definition at line 85 of file objectcontainer.cpp.

References _objects, Aurora::NWScript::ObjectContainer::addObject(), Engines::Jade::kObjectTypeMAX, Aurora::NWScript::ObjectContainer::lock(), and Aurora::NWScript::ObjectContainer::unlock().

Referenced by Engines::Jade::Area::Area(), Engines::Jade::Area::loadObject(), and Engines::Jade::Module::usePC().

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

◆ clearObjects()

void Engines::Jade::ObjectContainer::clearObjects ( )

◆ findObjectsByType()

Aurora::NWScript::ObjectSearch * Engines::Jade::ObjectContainer::findObjectsByType ( ObjectType  type) const

Return a search context to iterate over all objects of this type.

Definition at line 118 of file objectcontainer.cpp.

References _objects, and Engines::Jade::kObjectTypeMAX.

◆ getFirstObjectByType()

Aurora::NWScript::Object * Engines::Jade::ObjectContainer::getFirstObjectByType ( ObjectType  type) const

Return the first object of this type.

Definition at line 109 of file objectcontainer.cpp.

References _objects, Aurora::NWScript::SearchRange< T >::get(), and Engines::Jade::kObjectTypeMAX.

Here is the call graph for this function:

◆ removeObject()

void Engines::Jade::ObjectContainer::removeObject ( Jade::Object object)

Remove an object from this container.

Definition at line 97 of file objectcontainer.cpp.

References _objects, Engines::Jade::kObjectTypeMAX, Aurora::NWScript::ObjectContainer::lock(), Aurora::NWScript::ObjectContainer::removeObject(), and Aurora::NWScript::ObjectContainer::unlock().

Referenced by Engines::Jade::Area::clear(), Engines::Jade::Module::unloadPC(), and Engines::Jade::Area::~Area().

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

◆ toArea()

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

Definition at line 129 of file objectcontainer.cpp.

Referenced by Engines::Jade::Functions::location().

Here is the caller graph for this function:

◆ toCreature()

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

Definition at line 141 of file objectcontainer.cpp.

Referenced by Engines::Jade::Functions::getAutoBalance().

Here is the caller graph for this function:

◆ toEvent()

Event * Engines::Jade::ObjectContainer::toEvent ( Aurora::NWScript::EngineType engineType)
static

Definition at line 157 of file objectcontainer.cpp.

Referenced by Engines::Jade::Functions::signalEvent().

Here is the caller graph for this function:

◆ toLocation()

Location * Engines::Jade::ObjectContainer::toLocation ( Aurora::NWScript::EngineType engineType)
static

◆ toObject()

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

◆ toPC()

Creature * Engines::Jade::ObjectContainer::toPC ( Aurora::NWScript::Object object)
static

Definition at line 145 of file objectcontainer.cpp.

References Engines::Jade::Creature::isPC().

Referenced by Engines::Jade::Functions::actionStartConversation(), Engines::Jade::Functions::getIsPC(), and Engines::Jade::Functions::sendMessageToPC().

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

◆ toPlaceable()

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

Definition at line 137 of file objectcontainer.cpp.

Referenced by Engines::Jade::Functions::actionCloseDoor(), and Engines::Jade::Functions::actionOpenDoor().

Here is the caller graph for this function:

◆ toWaypoint()

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

Definition at line 133 of file objectcontainer.cpp.

Referenced by Engines::Jade::Functions::getWaypointByTag().

Here is the caller graph for this function:

Member Data Documentation

◆ _objects

ObjectList Engines::Jade::ObjectContainer::_objects[kObjectTypeMAX]
private

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