-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSCActiveRunnable.cpp
58 lines (49 loc) · 2.5 KB
/
SCActiveRunnable.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*-----------------------------------------------------------------------------+
| |
| SCL - Simulation Class Library |
| |
| (c) 1994-98 Marc Diefenbruch, Wolfgang Textor |
| University of Essen, Germany |
| |
+-------------------+-------------------+---------------+------------------+---+
| Module | File | Created | Project | |
+-------------------+-------------------+---------------+------------------+---+
| SCActiveRunnable |SCActiveRunnable.cc| 16. Aug 1994 | SCL | |
+-------------------+-------------------+---------------+------------------+---+
| |
| Change Log |
| |
| Nr. Date Description |
| ----- -------- ------------------------------------------------------ |
| 001 |
| 000 16.08.94 Neu angelegt |
| |
+-----------------------------------------------------------------------------*/
/* Lineal
00000000001111111111222222222233333333334444444444555555555566666666667777777777
01234567890123456789012345678901234567890123456789012345678901234567890123456789
*/
#include "SCActiveRunnable.h"
#include "SCEnabledTransitionList.h"
#if _SC_DMALLOC
#include <dmalloc.h>
#endif
SCActiveRunnable::SCActiveRunnable (SCTimeEvent *event,
SCEnabledTransitionList *etlist,
const SCNatural successors) :
SCTimeEvent(*event),
enabledTransitionList(etlist),
numOfSuccessors(successors),
currentSuccessor(0)
{
assert(numOfSuccessors > 0);
}
SCActiveRunnable::~SCActiveRunnable (void)
{
if (enabledTransitionList)
delete enabledTransitionList;
}
SCEnabledTransitionList *SCActiveRunnable::GetEnabledTransitionList(void) const
{
return enabledTransitionList;
}