eosim::utils::CEventVector                     EoSimulator Programmer's Manual

 

NAME

      CEventVector: Vector of C Events

 

SYNOPSIS

      #include <eosim/utils/ceventvector.hpp>

 

namespace eosim {

namespace utils {

     

class CEventVector {

public:

CEventVector ();

~CEventVector ();

void push (core::CEvent* elem_);

void remove (unsigned i_);

core::CEvent* operator[] (unsigned int i_);

unsigned int size();

};

     

}

}

 

DESCRIPTION

This container stores CEvents in a vector. It is used by CCalendar to register CEvent.

 

CLASS OPERATIONS

CEventVector ():

      The constructor creates an empty CEventVector.

     

~CEventVector ():

      The destructor of CEventVector. This operation doesn’t delete any CEvents stored

     

void push (core::CEvent* elem_):

            This operation adds elem_ at the end of the vector.

           

void remove (unsigned i_):

This operation remove the element whose position in the vector is i_. If i_ is outside the vector, the simulation aborts immediately displaying an error message.

 

core::CEvent* operator[] (unsigned int i_):

            This operation returns the CEvent whose position in the vector is i_. The use of this operation is either cVect[i] or cVect.operator[](i). If i_ is outside the vector, the simulation aborts immediately displaying an error message.

 

unsigned int size():

            This operation returns the size of the vector.

 

SEE ALSO

eosim::core::CEvent

eosim::core::CCalendar