File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44// SPDX-License-Identifier: LGPL-3.0-or-later
55//
66
7-
8- #ifndef __INET_COMMON_CLOCKEVENT_H
9- #define __INET_COMMON_CLOCKEVENT_H
10-
117#include "inet/clock/common/ClockEvent_m.h"
12-
13- namespace inet {
14-
15- class ClockBase ;
16-
17- class INET_API ClockEvent : public ClockEvent_Base
18- {
19- friend ClockBase;
20-
21- protected:
22- virtual void execute () override ;
23-
24- void callBaseExecute () { ClockEvent_Base::execute (); }
25-
26- public:
27- ClockEvent (const char *name = nullptr , short kind = 0 ) : ClockEvent_Base(name, kind) {}
28- ClockEvent (const ClockEvent& other) : ClockEvent_Base(other) {}
29-
30- ClockEvent& operator =(const ClockEvent& other) {
31- if (this == &other) return *this ;
32- ClockEvent_Base::operator =(other);
33- return *this ;
34- }
35- virtual ClockEvent *dup () const override { return new ClockEvent (*this ); }
36- };
37-
38- } // namespace inet
39-
40- #endif
41-
Original file line number Diff line number Diff line change @@ -10,6 +10,10 @@ import inet.clock.contract.IClock;
1010
1111namespace inet;
1212
13+ cplusplus {{
14+ class ClockBase;
15+ }}
16+
1317enum OverdueClockEventHandlingMode {
1418 UNSPECIFIED = -1;
1519 EXECUTE = 0;
@@ -19,9 +23,16 @@ enum OverdueClockEventHandlingMode {
1923
2024message ClockEvent
2125{
22- @customize ;
2326 IClock *clock;
2427 bool relative = false;
2528 clocktime_t arrivalClockTime = -1;
2629 OverdueClockEventHandlingMode overdueClockEventHandlingMode = UNSPECIFIED;
2730}
31+
32+ cplusplus (ClockEvent) {{
33+ friend ClockBase;
34+
35+ protected:
36+ virtual void execute() override;
37+ void callBaseExecute() { cMessage::execute(); }
38+ }}
You can’t perform that action at this time.
0 commit comments