///////////////////////////////////////////////////////////////////////////// // event.cc // // SIMLIB version: 2.18 // Date: 2004-01-25 // // Copyright (c) 1991-2004 Petr Peringer // // This library is licensed under GNU Library GPL. See the file COPYING. // // // description: implementation of class Event // //////////////////////////////////////////////////////////////////////////// // interface // #include "simlib.h" #include "internal.h" //////////////////////////////////////////////////////////////////////////// // implementation // SIMLIB_IMPLEMENTATION //////////////////////////////////////////////////////////////////////////// // constructor // Event::Event(Priority_t p) : Entity(p) { dprintf(("Event::Event(%u)", p)); } //////////////////////////////////////////////////////////////////////////// // destructor // Event::~Event() { dprintf(("Event::~Event()", Name())); } //////////////////////////////////////////////////////////////////////////// // _Run() - activation method // void Event::_Run() { Behavior(); } //////////////////////////////////////////////////////////////////////////// // Event::Name // const char *Event::Name() { const char *name = SimObject::Name(); if(*name) return name; // has explicit name else return SIMLIB_create_name("Event#%lu", _Ident); } // end