eosim::core::CEvent Class Reference
[Modeling Clases]

#include <eosim/core/cevent.hpp>

Inheritance diagram for eosim::core::CEvent:

Inheritance graph
[legend]
Collaboration diagram for eosim::core::CEvent:

Collaboration graph
[legend]
List of all members.

Detailed Description

C Events.

Author:
Sebastián Alaggia
Version:
1.0.1
Date:
2005

This is the parent class of all C events. A CEvent (conditional event) only occur when the model meets certain conditions (resources availability, queue positions, etc).

CEvent is an abstract class which represents a conditional event that is relevant to a system. CEvents are stateless objects and Model’s attributes as well as BEvent.

To create a subclass of CEvent you must implement three methods:

CEvents are very much like BEvents, the only difference is that BEvents occur at a certain time to a certain group of entities. But, CEvents occur when its model meets certain conditions such as resources availability. That’s why BEvent::eventRoutine is applied to an entity and CEvent::eventRoutine is applied to its model. CEvents have to be registered using Model::registerCEvent; an unregistered CEvent will not have any effect in its model, but it won't rise an error (simply it won't be executed).

All CEvents belong to a Model, they have the attribute CEvent::owner to have access to its model. This parameter appear in CEvent constructor and it must be called at the constructor of any subclass.

CEvent::eventRoutine defines every action taken in this particular point in time. CEvents acts over many unspecific entities, and may change the state of the model. If one event creates or deletes an Entity, see the rules decripted in the documentation of that class.


Public Member Functions

 CEvent (Model &owner)
 The constructor creates a CEvent which belongs to the Model owner.
virtual ~CEvent ()
 The destructor of CEvent.
virtual void eventRoutine ()=0
 This abstract operation brings an uniform interface to CEvents routines.

Protected Attributes

Modelowner


Member Function Documentation

virtual void eosim::core::CEvent::eventRoutine (  )  [pure virtual]

This abstract operation brings an uniform interface to CEvents routines.

Note:
In order to model an specific event, the programmer have to give an specific method to this operation. If the event needs to have access to its model, use the attribute owner. Keep in mind that CEvents acts to an specific model, not to an specific entity.

Implemented in eosim::graphic::RefreshGraphic.


Generated on Tue Oct 14 16:48:46 2008 for EOSimulator by  doxygen 1.5.2