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

#include <eosim/utils/entityqueuelifo.hpp>

Inheritance diagram for eosim::utils::EntityQueueLifo:

Inheritance graph
[legend]
Collaboration diagram for eosim::utils::EntityQueueLifo:

Collaboration graph
[legend]
List of all members.

Detailed Description

Lifo Queue of Entities.

Author:
Sebastián Alaggia
Version:
1.0.1
Date:
2005
This is a lifo queue of entities.


Public Member Functions

 EntityQueueLifo ()
 The constructor creates an empty EntityQueueLifo.
 ~EntityQueueLifo ()
 The destructor of EntityQueueLifo. It assumed that all entities in a simulation are created dynamically, so when an EntityQueueLifo is destroyed it deletes every entity stored.
void push (core::Entity *ent)
 This operation adds ent at the begining of queue.
core::Entitypop ()
 This operation returns and remove the first entity in the queue.
void remove (unsigned int i)
 This operation removes the entity whose position is i.
bool empty ()
 This operation returns 1 if the queue is empty.
core::Entityoperator[] (unsigned int i)
 This operation returns the entity whose position is i.
unsigned int size ()
 This operation returns the size of the queue.


Member Function Documentation

Entity * EntityQueueLifo::pop (  )  [virtual]

This operation returns and remove the first entity in the queue.

Warning:
The queue is must not be empty.

Implements eosim::utils::EntityQueue.

void EntityQueueLifo::remove ( unsigned int  i  )  [virtual]

This operation removes the entity whose position is i.

Warning:
i must be within the limits of the queue.

Implements eosim::utils::EntityQueue.

Entity * EntityQueueLifo::operator[] ( unsigned int  i  )  [virtual]

This operation returns the entity whose position is i.

Warning:
i must be within the limits of the queue.

Implements eosim::utils::EntityQueue.


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