OMNeT++ Simulation Library  5.6.1
cmodelchange.h
1 //==========================================================================
2 // CMODELCHANGE.H - part of
3 // OMNeT++/OMNEST
4 // Discrete System Simulation in C++
5 //
6 //==========================================================================
7 
8 /*--------------------------------------------------------------*
9  Copyright (C) 1992-2017 Andras Varga
10  Copyright (C) 2006-2017 OpenSim Ltd.
11 
12  This file is distributed WITHOUT ANY WARRANTY. See the file
13  `license' for details on this and other legal matters.
14 *--------------------------------------------------------------*/
15 
16 #ifndef __OMNETPP_CMODELCHANGE_H
17 #define __OMNETPP_CMODELCHANGE_H
18 
19 #include "cobject.h"
20 
21 namespace omnetpp {
22 
56 SIM_API extern simsignal_t PRE_MODEL_CHANGE;
57 
92 SIM_API extern simsignal_t POST_MODEL_CHANGE;
93 
101 {
102 };
103 
115 class SIM_API cPreModuleAddNotification : public cModelChangeNotification
116 {
117  public:
119  const char *moduleName;
122  int index;
123 };
124 
137 class SIM_API cPostModuleAddNotification : public cModelChangeNotification
138 {
139  public:
141 };
142 
156 class SIM_API cPreModuleDeleteNotification : public cModelChangeNotification
157 {
158  public:
160 };
161 
176 class SIM_API cPostModuleDeleteNotification : public cModelChangeNotification
177 {
178  public:
180  int moduleId;
182  const char *moduleName;
185  int index;
186 };
187 
198 class SIM_API cPreModuleReparentNotification : public cModelChangeNotification
199 {
200  public:
203 };
204 
214 class SIM_API cPostModuleReparentNotification : public cModelChangeNotification
215 {
216  public:
219 };
220 
239 class SIM_API cPreGateAddNotification : public cModelChangeNotification
240 {
241  public:
243  const char *gateName;
245  bool isVector;
246 };
247 
266 class SIM_API cPostGateAddNotification : public cModelChangeNotification
267 {
268  public:
270  const char *gateName;
271 };
272 
288 class SIM_API cPreGateDeleteNotification : public cModelChangeNotification
289 {
290  public:
292  const char *gateName;
293 };
294 
312 class SIM_API cPostGateDeleteNotification : public cModelChangeNotification
313 {
314  public:
316  const char *gateName;
318  bool isVector;
320 };
321 
334 class SIM_API cPreGateVectorResizeNotification : public cModelChangeNotification
335 {
336  public:
338  const char *gateName;
339  int newSize;
340 };
341 
354 class SIM_API cPostGateVectorResizeNotification : public cModelChangeNotification
355 {
356  public:
358  const char *gateName;
359  int oldSize;
360 };
361 
375 class SIM_API cPreGateConnectNotification : public cModelChangeNotification
376 {
377  public:
381 };
382 
399 class SIM_API cPostGateConnectNotification : public cModelChangeNotification
400 {
401  public:
403 };
404 
421 class SIM_API cPreGateDisconnectNotification : public cModelChangeNotification
422 {
423  public:
425 };
426 
441 class SIM_API cPostGateDisconnectNotification : public cModelChangeNotification
442 {
443  public:
447 };
448 
468 class SIM_API cPathChangeNotification : public cModelChangeNotification
469 {
470  public:
474 };
475 
489 
503 
517 
531 
542 class SIM_API cPreParameterChangeNotification : public cModelChangeNotification
543 {
544  public:
546 };
547 
558 class SIM_API cPostParameterChangeNotification : public cModelChangeNotification
559 {
560  public:
562 };
563 
573 class SIM_API cPreDisplayStringChangeNotification : public cModelChangeNotification
574 {
575  public:
577 };
578 
588 class SIM_API cPostDisplayStringChangeNotification : public cModelChangeNotification
589 {
590  public:
592 };
593 
594 } // namespace omnetpp
595 
596 #endif
597 
cGate * gate
The gate that is about to be disconnected.
Definition: cmodelchange.h:424
Represents a module gate.
Definition: cgate.h:63
Root of the OMNeT++ class hierarchy. cObject is a lightweight class without any data members...
Definition: cobject.h:58
cModule * module
The module to which the new gate or gate vector will be added.
Definition: cmodelchange.h:242
cGate * pathStartGate
The start gate of the path.
Definition: cmodelchange.h:471
Model change notification fired after a module has been deleted.
Definition: cmodelchange.h:176
Model change notification fired after a gate or gate vector has been added to the module...
Definition: cmodelchange.h:266
const char * gateName
Name of the gate or gate vector.
Definition: cmodelchange.h:292
bool isVector
Name of the gate vector that was deleted.
Definition: cmodelchange.h:318
cGate::Type gateType
Type of the new gate or gate vector (INPUT, OUTPUT or INOUT)
Definition: cmodelchange.h:244
cChannel * channel
The channel object associated with the link; it points to valid object that will be deleted once the ...
Definition: cmodelchange.h:446
int oldSize
The old size of the gate vector.
Definition: cmodelchange.h:359
Model change notification fired after a gate is disconnected.
Definition: cmodelchange.h:441
Model change notification fired after a gate vector has been resized.
Definition: cmodelchange.h:354
Represents a module or channel parameter.
Definition: cpar.h:68
const char * gateName
Name of the new gate or gate vector.
Definition: cmodelchange.h:270
SIM_API simsignal_t POST_MODEL_CHANGE
A signal which is fired after simulation model changes such as module creation or connection creation...
Model change notification fired just before a parameter change.
Definition: cmodelchange.h:542
Model change notification fired just before a gate vector is resized.
Definition: cmodelchange.h:334
cGate * targetGate
The gate it will be connected to.
Definition: cmodelchange.h:379
const char * moduleName
Name of the new module.
Definition: cmodelchange.h:119
Model change notification fired after a parameter change.
Definition: cmodelchange.h:558
Model change notification fired after a gate has been connected.
Definition: cmodelchange.h:399
int index
Index of the deleted in its vector; 0 if not part of a module vector.
Definition: cmodelchange.h:185
cModule * module
The reparented module.
Definition: cmodelchange.h:217
Model change notification fired just before a gate or gate vector is added to the module...
Definition: cmodelchange.h:239
const char * gateName
Name of the gate or gate vector.
Definition: cmodelchange.h:316
Model change notification fired after a module has been reparented.
Definition: cmodelchange.h:214
Common base class for data objects that accompany PRE_MODEL_CHANGE and POST_MODEL_CHANGE signals...
Definition: cmodelchange.h:100
int vectorSize
Size of the module vector that will contain the new module; -1 if not a vector.
Definition: cmodelchange.h:121
int moduleId
The ID of the deleted module.
Definition: cmodelchange.h:180
Model change notification fired after a module is created.
Definition: cmodelchange.h:137
const char * moduleName
Name of the deleted module.
Definition: cmodelchange.h:182
This class represents modules in the simulation.
Definition: cmodule.h:47
cGate * gate
The gate that has been connected.
Definition: cmodelchange.h:402
Model change notification fired just before a module is created.
Definition: cmodelchange.h:115
const char * gateName
The name of the gate vector.
Definition: cmodelchange.h:338
cGate * targetGate
The gate to which it was connected.
Definition: cmodelchange.h:445
cModule * module
Parent of the gate or gate vector.
Definition: cmodelchange.h:291
cChannel * channel
The channel object to be associated with the connection.
Definition: cmodelchange.h:380
SIM_API simsignal_t PRE_MODEL_CHANGE
A signal which is fired before simulation model changes such as module creation or connection creatio...
cModule * parentModule
Parent module.
Definition: cmodelchange.h:120
Base class for path change notifications.
Definition: cmodelchange.h:468
Model change notification fired just before a gate is deleted.
Definition: cmodelchange.h:288
cModule * module
The module to which the new gate or gate vector was added.
Definition: cmodelchange.h:269
cDisplayString * displayString
The display string that is about to be updated.
Definition: cmodelchange.h:576
const char * gateName
The name of the gate vector.
Definition: cmodelchange.h:358
int vectorSize
Size of the module vector that contained the deleted module; -1 if not a vector.
Definition: cmodelchange.h:184
Model change notification fired just before a module is reparented.
Definition: cmodelchange.h:198
Model change notification fired just before a connection path is cut.
Definition: cmodelchange.h:516
Model change notification fired just before a connection path is created.
Definition: cmodelchange.h:488
cGate::Type gateType
Type of the gate or gate vector.
Definition: cmodelchange.h:317
Utility class, to make it impossible to call the operator= and copy constructor of any class derived ...
Definition: cobject.h:311
cModule * module
Parent of the gate or gate vector.
Definition: cmodelchange.h:315
cPar * par
The module parameter that has changed.
Definition: cmodelchange.h:561
cDisplayString * displayString
The display string that was updated.
Definition: cmodelchange.h:591
Model change notification fired just before a display string change.
Definition: cmodelchange.h:573
cModule * module
The module of the gate vector.
Definition: cmodelchange.h:337
Model change notification fired after a dispay string change.
Definition: cmodelchange.h:588
cModule * oldParentModule
The old parent for the module.
Definition: cmodelchange.h:218
Definition: cabstracthistogram.h:21
Model change notification fired after a gate has been deleted.
Definition: cmodelchange.h:312
cModuleType * moduleType
Type of the new module.
Definition: cmodelchange.h:118
cModule * parentModule
Parent module of the deleted module.
Definition: cmodelchange.h:183
int vectorSize
If a gate vector was deleted: size of the vector.
Definition: cmodelchange.h:319
const char * gateName
Name of the new gate or gate vector.
Definition: cmodelchange.h:243
cGate * pathEndGate
The end gate of the path.
Definition: cmodelchange.h:472
Model change notification fired just before a module is deleted.
Definition: cmodelchange.h:156
cModule * module
The new module.
Definition: cmodelchange.h:140
int newSize
The new size of the gate vector.
Definition: cmodelchange.h:339
Represents a display string.
Definition: cdisplaystring.h:58
int index
Index of the new module in its vector; 0 if not part of a module vector.
Definition: cmodelchange.h:122
bool isVector
Whether a new gate or a gate vector will be added.
Definition: cmodelchange.h:245
cModule * module
The module that is about to be deleted.
Definition: cmodelchange.h:159
Abstract class for creating a module of a specific type.
Definition: ccomponenttype.h:192
int simsignal_t
Signal handle.
Definition: clistener.h:24
cGate * gate
The gate that is about to be connected.
Definition: cmodelchange.h:378
Model change notification fired just before a gate has been disconnected.
Definition: cmodelchange.h:421
cModule * newParentModule
The new parent for the module.
Definition: cmodelchange.h:202
cModule * module
Pointer of the deleted module. The module object has already been deleted at this point...
Definition: cmodelchange.h:179
Base class for channels.
Definition: cchannel.h:34
Model change notification fired after a connection path has been created.
Definition: cmodelchange.h:502
cGate * gate
The gate that has been disconnected.
Definition: cmodelchange.h:444
Type
Definition: cgate.h:73
cModuleType * moduleType
Type of the deleted module.
Definition: cmodelchange.h:181
cModule * module
The module of the gate vector.
Definition: cmodelchange.h:357
cPar * par
The module parameter that is about to be changed.
Definition: cmodelchange.h:545
Model change notification fired after a connection path has been cut.
Definition: cmodelchange.h:530
cModule * module
The module which is about to be reparented.
Definition: cmodelchange.h:201
Model change notification fired just before a gate is connected.
Definition: cmodelchange.h:375
cGate * changedGate
The gate whose connection has changed.
Definition: cmodelchange.h:473