38 namespace DragonAge2 {
87 _objects[
object.getType()].push_back(&
object);
95 _objects[
object.getType()].remove(&
object);
103 ObjectMap::const_iterator l =
_objects.find(type);
115 ObjectMap::const_iterator l =
_objects.find(type);
117 return new SearchType(kEmptyObjectList.begin(), kEmptyObjectList.end());
127 return dynamic_cast<Area *
>(object);
131 return dynamic_cast<Waypoint *
>(object);
135 return dynamic_cast<Placeable *
>(object);
139 return dynamic_cast<Creature *
>(object);
143 return dynamic_cast<Event *
>(engineType);
::Aurora::NWScript::Object * getFirstObjectByType(ObjectType type) const
Return the first object of this type.
static Creature * toCreature(Aurora::NWScript::Object *object)
A placeable object in a Dragon Age II area.
SearchType(const iterator &a, const iterator &b)
A container of Dragon Age II objects.
A creature in a Dragon Age II area.
std::list< DragonAge2::Object * > ::const_iterator iterator
The context holding a Dragon Age II area.
SearchList::type ObjectList
An area in Dragon Age II, holding all objects and rooms within, as well as general area properties li...
void addObject(DragonAge2::Object &object)
Add an object to this container.
static Waypoint * toWaypoint(Aurora::NWScript::Object *object)
void removeObject(DragonAge2::Object &object)
Remove an object from this container.
SearchRange(const range &r)
An object in a Dragon Age II area.
float getDistance(DragonAge2::Object &a)
Utility templates and functions.
A waypoint in a Dragon Age II area.
::Aurora::NWScript::ObjectSearch * findObjectsByType(ObjectType type) const
Return a search context to iterate over all objects of this type.
static Event * toEvent(Aurora::NWScript::EngineType *engineType)
Low-level type definitions to handle fixed width types portably.
void removeObject(Object &object)
Remove an object from this container.
Object * get()
Return the current object in the search context.
std::list< DragonAge2::Object * > type
bool operator()(DragonAge2::Object *a, DragonAge2::Object *b)
static Area * toArea(Aurora::NWScript::Object *object)
ObjectType
Object type, matches the bitfield in script.ldf.
static DragonAge2::Object * toObject(::Aurora::NWScript::Object *object)
static Placeable * toPlaceable(Aurora::NWScript::Object *object)
virtual void getPosition(float &x, float &y, float &z) const
Return the object's position within its area.
ObjectDistanceSort(const DragonAge2::Object &target)
::Aurora::NWScript::Object * getObject(const iterator &t)
SearchType(const type &l)
void addObject(Object &object)
Add an object to this container.