// non-scheduling version for createForUnserialize()
GlobalSimLoopExitEvent();
GlobalSimLoopExitEvent(Tick when, const std::string &_cause, int c,
- Tick repeat = 0, bool serialize = false);
+ Tick repeat = 0);
const std::string getCause() const { return cause; }
- const int getCode() const { return code; }
+ int getCode() const { return code; }
void process(); // process event
public:
LocalSimLoopExitEvent();
- LocalSimLoopExitEvent(const std::string &_cause, int c, Tick repeat = 0,
- bool serialize = false);
+ LocalSimLoopExitEvent(const std::string &_cause, int c, Tick repeat = 0);
const std::string getCause() const { return cause; }
- const int getCode() const { return code; }
+ int getCode() const { return code; }
- void process(); // process event
+ void process() override; // process event
- virtual const char *description() const;
+ const char *description() const override;
- virtual void serialize(std::ostream &os);
- virtual void unserialize(Checkpoint *cp, const std::string §ion);
- virtual void unserialize(Checkpoint *cp, const std::string §ion,
- EventQueue *eventq);
- static Serializable *createForUnserialize(Checkpoint *cp,
+ void serialize(CheckpointOut &cp) const override;
+ void unserialize(CheckpointIn &cp) override;
+ static Serializable *createForUnserialize(CheckpointIn &cp,
const std::string §ion);
};
-class CountedDrainEvent : public Event
-{
- private:
- // Count of how many objects have not yet drained
- int count;
-
- public:
- CountedDrainEvent();
-
- void process();
-
- void setCount(int _count) { count = _count; }
-
- const int getCount() const { return count; }
-};
-
//
// Event class to terminate simulation after 'n' related events have
// occurred using a shared counter: used to terminate when *all*
public:
CountedExitEvent(const std::string &_cause, int &_downCounter);
- void process(); // process event
+ void process() override; // process event
- virtual const char *description() const;
+ const char *description() const override;
};