eosim::core::BEvent EoSimulator Programmer's Manual
NAME
BEvent: B Events
SYNOPSIS
#include <eosim/core/bevent.hpp>
namespace eosim {
namespace core {
class BEvent {
protected:
Model& owner;
public:
BEvent (std::string name_, Model& owner_);
virtual ~BEvent ();
std::string getName();
virtual void eventRoutine (Entity* who_) = 0;
};
}
}
DESCRIPTION
This is the parent class of all B events. A BEvent (bounded event) is an relevant point of time which is going to occur at a certain time to a certain group of entities. BEvents are defined by the user. All BEvents are assumed to be stateless objects. They are treated as a sample of code which is executed by the entities.
CLASS OPERATIONS
BEvent (std::string name_, Model& owner_):
The constructor creates a BEvent with name name_ which belongs to the Model owner_.
~BEvent ():
The destructor of BEvent.
std::string getName():
This operation returns the event’s name.
void eventRoutine (Entity* who_):
This abstract operation brings an uniform interface to BEvents routines. In order to model an specific event, the programmer has to give an specific method to this operation. If the event needs to have access to its model, use the attribute owner.
SEE ALSO