|
SIMLIB/C++
3.07
|
abstract base class for events Event behavior is simple function (can not be interrupted) More...
#include <simlib.h>


Public Member Functions | |
| Event (Priority_t p=DEFAULT_PRIORITY) | |
| constructor, default priority if not specified More... | |
| virtual | ~Event () |
| destructor More... | |
| virtual void | Behavior ()=0 |
| behavior description More... | |
| virtual void | Output () const override |
| print object to default output More... | |
| virtual std::string | Name () const override |
| name of object More... | |
| virtual void | Activate (double t) override |
| activate at time t (schedule) More... | |
Public Member Functions inherited from simlib3::Entity | |
| unsigned long | id () const |
| Entity (Priority_t p=DEFAULT_PRIORITY) | |
| constructor More... | |
| virtual | ~Entity () |
| destructor More... | |
| operator Entity * () | |
| double | ActivationTime () |
| get activation time of entity - iff scheduled it is here, because Entity has no knowledge of calendar activation record structure More... | |
| void | Activate () |
| activate now More... | |
| virtual void | Passivate () |
| deactivation More... | |
| bool | Idle () |
| entity activation is not scheduled in calendar More... | |
| void | Cancel () |
| end Behavior() and remove entity More... | |
| virtual void | Out () override |
| remove entity from queue More... | |
| EventNotice * | GetEventNotice () |
Public Member Functions inherited from simlib3::Link | |
| Link () | |
| virtual | ~Link () |
| virtual void | Into (List *l) |
| insert last More... | |
| List * | Where () |
| where is linked More... | |
| virtual bool | isInQueue () |
| present in queue More... | |
Public Member Functions inherited from simlib3::SimObject | |
| bool | TestAndSetFlag (bool new_value, unsigned n) |
| internal method for flag manipulation is used for algebraic loop checking in continuous blocks More... | |
| SimObject () | |
| constructor More... | |
| virtual | ~SimObject () |
| virtual destructor More... | |
| void * | operator new (size_t size) |
| allocate object, set _flags More... | |
| void | operator delete (void *ptr) |
| deallocate object More... | |
| void * | operator new[] (size_t size)=delete |
| void | operator delete[] (void *ptr)=delete |
| bool | isAllocated () const |
| bool | HasName () const |
| void | SetName (const std::string &name) |
| assign the name More... | |
Private Member Functions | |
| virtual void | _Run () noexcept override |
| activation method, called from simulation control algorithm More... | |
| virtual void | Terminate () override |
| passivate event, it will be destroyed if not activated later in Behavior() Should not be used. More... | |
Additional Inherited Members | |
Public Types inherited from simlib3::Entity | |
| typedef EntityPriority_t | Priority_t |
Public Types inherited from simlib3::SimObject | |
| enum | _Flags { _CLEAR_ALL_FLAGS = 0, _ALLOCATED_FLAG = 1<<0, _EVAL_FLAG = 1<<1, _HAS_NAME_FLAG = 1<<2 } |
Public Attributes inherited from simlib3::Entity | |
| Priority_t | Priority |
| priority of the entity (scheduling,queues) More... | |
Protected Member Functions inherited from simlib3::Link | |
| Link (Link *p, Link *s, List *h) | |
Protected Attributes inherited from simlib3::Entity | |
| unsigned long | _Ident |
| unique identification number of entity More... | |
| double | _MarkTime |
| union { | |
| double _RemainingTime | |
| unsigned long _RequiredCapacity | |
| }; | |
| ServicePriority_t | _SPrio |
| priority of service in Facility More... | |
Protected Attributes inherited from simlib3::SimObject | |
| unsigned | _flags |
| bool flags for internal use (TODO bitfield?) More... | |
Static Protected Attributes inherited from simlib3::Entity | |
| static unsigned long | _Number = 0L |
| current number of entities More... | |
abstract base class for events Event behavior is simple function (can not be interrupted)
| simlib3::Event::Event | ( | Priority_t | p = DEFAULT_PRIORITY | ) |
|
virtual |
|
overrideprivatevirtualnoexcept |
activation method, called from simulation control algorithm
Implements simlib3::Entity.
Definition at line 42 of file event.cc.
References Behavior(), simlib3::Entity::Idle(), and Terminate().
|
overridevirtual |
activate at time t (schedule)
Reimplemented from simlib3::Entity.
Definition at line 62 of file event.cc.
References simlib3::Entity::_Ident, simlib3::Entity::Activate(), and Dprintf.
|
pure virtual |
behavior description
Implemented in simlib3::Sampler, and simlib3::ZDelayTimer.
Referenced by _Run().
|
overridevirtual |
name of object
get name of event. It is generic "Event#" if not explicitly named
Reimplemented from simlib3::SimObject.
Definition at line 71 of file event.cc.
References simlib3::Entity::_Ident, simlib3::SimObject::Name(), and simlib3::SIMLIB_create_tmp_name().
Referenced by Output(), simlib3::List::Output(), and Terminate().
|
overridevirtual |
print object to default output
Reimplemented from simlib3::SimObject.
Reimplemented in simlib3::Sampler.
Definition at line 35 of file output1.cc.
References Name(), and simlib3::Print().
|
overrideprivatevirtual |
passivate event, it will be destroyed if not activated later in Behavior()
Should not be used.
It is there only for backwards compatibility.
Implements simlib3::Entity.
Definition at line 52 of file event.cc.
References Dprintf, simlib3::SQS::Get(), simlib3::Entity::Idle(), simlib3::SimObject::isAllocated(), Name(), and simlib3::SIMLIB_Current.
Referenced by _Run().
1.8.13