ssim::Event Class Reference

basic event in the simulation. More...

`#include <ssim.h>`

Inheritance diagram for ssim::Event:
[legend]

## Public Member Functions

| Event ()
virtual | ~Event ()
virtual std::string | str () const

## Private Attributes

unsigned | refcount

## Friends

class | SimImpl
class | Sim

## Detailed Description

basic event in the simulation.

This base class represents a piece of information or a signal exchanged between two processes through the simulator. Every simulated event must inherit from this class. For example:

class TextMessage : public Event {
public:
char * message;
TextMessage(const char * m) {
message = strdup(m);
}
~TextMessage() {
free(message);
}
};

See also
  Sim::signal_event(), Sim::self_signal_event(), Process::process_event(const Event*)

Definition at line 106 of file ssim.h.

## Constructor & Destructor Documentation

## Event()

ssim::Event::Event | ( |  | ) |

inline

Definition at line 108 of file ssim.h.

## ~Event()

virtual ssim::Event::~Event | ( |  | ) |

inline virtual

Definition at line 109 of file ssim.h.

## Member Function Documentation

## str()

virtual std::string ssim::Event::str | ( |  | ) | const

inline virtual

Reimplemented in ssim::cMessage.

Definition at line 110 of file ssim.h.

## Friends And Related Function Documentation

## Sim

friend class Sim

friend

Definition at line 115 of file ssim.h.

## SimImpl

friend class SimImpl

friend

Definition at line 114 of file ssim.h.

## Member Data Documentation

## refcount

unsigned ssim::Event::refcount

mutable private

Definition at line 110 of file ssim.h.

The documentation for this class was generated from the following file:

- /home/marcle/src/R/microsimulation/inst/include/siena/ssim.h

ssim::Event::Event
Event()
Definition: ssim.h:108