Classes | Public Member Functions | Protected Member Functions | Protected Attributes

EvSimObjectPool Class Reference

Container for all elements in the simulation. More...

#include <EvSimObjectPool.h>

List of all members.

Classes

class  Iterator

Public Member Functions

virtual ~EvSimObjectPool ()
EvSimObject::ID createObject (EvSimObjectFactory const &objFactory)
 Add a new instance of the specified object by using a factory.
EvSimObject::ID addObject (EvSimObject *o)
 Add an already created sim object in the pool.
EvSimObjectgetObject (EvSimObject::ID oid) const
 Get a pointer to the specified objects.
void initObjects (EvSimNetwork &net)
 A call to this function makes sure that all objects contained in the pool are initialized properly and ready for simulation.
void resetObjects (InitializeContext &sim_ctxt)
int numOfObjects ()
 Returns the number of objects.
EvSimObject::ID getLastId ()
 Return the highest id value.
Iterator begin ()
 Returns an iterator for looping over all objects.
Iterator end ()
 End iterator corresponding to begin().

Protected Member Functions

EvSimObject::ID addObject (EvSimObjectFactory const &objFactory, RandomEngine *rng)

Protected Attributes

vector< EvSimObject * > pool

Detailed Description

Container for all elements in the simulation.


Constructor & Destructor Documentation

EvSimObjectPool::~EvSimObjectPool (  )  [virtual]

Destructor. All sim objects that the pool contains are also deleted from the heap.


Member Function Documentation

EvSimObject::ID EvSimObjectPool::addObject ( EvSimObject o  ) 

Add an already created sim object in the pool.

Adds object in the pool. the object is assigned id.

EvSimObject * EvSimObjectPool::getObject ( EvSimObject::ID  oid  )  const

Get a pointer to the specified objects.

Returns a pointer to the object identified by its id.

void EvSimObjectPool::initObjects ( EvSimNetwork net  ) 

A call to this function makes sure that all objects contained in the pool are initialized properly and ready for simulation.

Calls init() of every evsimobject in the pool.

void EvSimObjectPool::resetObjects ( InitializeContext sim_ctxt  ) 

Calls init() of every evsimobject in the pool.


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