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

 

NAME

      DistVector: Vector of Distributions

 

SYNOPSIS

      #include <eosim/utils/distvector.hpp>

 

namespace eosim {

namespace utils {

     

class DistVector {

public:

DistVector ();

~DistVector ();

void push (dist::Distribution* elem_);

void remove (unsigned int i_);

dist::Distribution*& operator[] (unsigned int i_);

unsigned int size();   

};

     

}

}

 

DESCRIPTION

This container stores Distributions in a vector. It is used by DistManager to register Distributions.

 

CLASS OPERATIONS

DistVector ():

      The constructor creates an empty DistVector.

     

~DistVector ():

      The destructor of DistVector. This operation doesn’t delete any Distributions stored

     

void push (dist::Distribution * 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.

 

dist::Distribution * operator[] (unsigned int i_):

            This operation returns the Distribution whose position in the vector is i_. The use of this operation is either dVect[i] or dVect.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::dist::DistManager

eosim::dist::Distribution