DEDevice Class Reference

Base class of each device of the simulation. More...

#include <dedevice.h>

Collaboration diagram for DEDevice:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 DEDevice (DESystem *_System=0)
 Constructs a new device which is part of _System.
void newEvent (DEEvent *Ev)
 Inserts the event *Ev in the immediate queue, e.g., an event with zero delay.
void newEvent (DEEvent *Ev, const DETime &Advance)
 Inserts the event *Ev in the delayed queue. The delay of event execution (from actual time) is Advance.
void RemoveEvent (DEEvent *Ev)
 Remove the event *Ev from the event queue.
void RemoveEventsForMe ()
 Remove all the events for the device from the event queue.
virtual void Initialize ()
 Initialize the device for the simulation.
virtual const char * Type () const
 Returns a string identifying the device.

Related Functions

(Note that these are not member functions.)

ostream & operator<< (ostream &os, const DEDevice &Dev)
 Prints informations on the device.

Detailed Description

Base class of each device of the simulation.

Remarks:
Every DEDevice subclass should have a static setup() function to set its own file parameters. The parameters can then be read by the Initialize() function. Of couse every subclass' setup() should be called somewhere before any instance creation. A common place to do this is in the simulation setup(), which is automatically called.


Member Function Documentation

virtual void DEDevice::Initialize  )  [virtual]
 

Initialize the device for the simulation.

This funtion should be overridden to do initialization, parameters reading and cleaning up jobs, and is called by DESystem before the beginning of the simulation and of each run. /b Important: it can be called multiple times, so beware of the dynamic objects constructors.


The documentation for this class was generated from the following file:
Generated on Wed Dec 22 23:23:48 2004 for NePSing by doxygen 1.3.9.1 ---- Hosted by SourceForge.net Logo