eosim::utils::EntityQueue Class Reference
[Collections]

#include <eosim/utils/entityqueue.hpp>

Inheritance diagram for eosim::utils::EntityQueue:

Inheritance graph
[legend]
List of all members.

Detailed Description

Interface for Queue of Entities.

Author:
Sebastián Alaggia
Version:
1.0.1
Date:
2005
This interface defines the behavior of all queues of entities in EOSimulator.


Public Member Functions

 EntityQueue ()
 The constructor creates an empty EntityQueue.
virtual ~EntityQueue ()
 The destructor of EntityQueue.
virtual void push (core::Entity *ent)=0
 This operation adds ent in the queue.
virtual core::Entitypop ()=0
 This operation returns and remove the first entity in the queue.
virtual void remove (unsigned int i)=0
 This operation removes the entity whose position is i.
virtual bool empty ()=0
 This operation returns 1 if the queue is empty.
virtual core::Entityoperator[] (unsigned int i)=0
 This operation returns the entity whose position is i.
virtual unsigned int size ()=0
 This operation returns the size of the queue.


Constructor & Destructor Documentation

virtual eosim::utils::EntityQueue::~EntityQueue (  )  [virtual]

The destructor of EntityQueue.

Attention:
It assumed that all entities in a simulation are created dynamically, so when an EntityQueue is destroyed it deletes every entity stored.


Member Function Documentation

virtual void eosim::utils::EntityQueue::push ( core::Entity ent  )  [pure virtual]

This operation adds ent in the queue.

Note:
The position where ent is inserted depends on the realization of the interface.

Implemented in eosim::utils::EntityQueueFifo, eosim::utils::EntityQueueLifo, and eosim::utils::EntityQueueOrdered.

virtual core::Entity* eosim::utils::EntityQueue::operator[] ( unsigned int  i  )  [pure virtual]

This operation returns the entity whose position is i.

Note:
The use of this operation is either eQue[i] or eQue.operator[](i).

Implemented in eosim::utils::EntityQueueFifo, eosim::utils::EntityQueueLifo, and eosim::utils::EntityQueueOrdered.


Generated on Tue Oct 14 16:49:07 2008 for EOSimulator by  doxygen 1.5.2