OMNeT++ Simulation Library  5.4.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 
104 SIM_API extern simsignal_t POST_MODEL_CHANGE;
105 
113 {
114 };
115 
127 class SIM_API cPreModuleAddNotification : public cModelChangeNotification
128 {
129  public:
131  const char *moduleName;
134  int index;
135 };
136 
149 class SIM_API cPostModuleAddNotification : public cModelChangeNotification
150 {
151  public:
153 };
154 
168 class SIM_API cPreModuleDeleteNotification : public cModelChangeNotification
169 {
170  public:
172 };
173 
188 class SIM_API cPostModuleDeleteNotification : public cModelChangeNotification
189 {
190  public:
192  int moduleId;
194  const char *moduleName;
197  int index;
198 };
199 
210 class SIM_API cPreModuleReparentNotification : public cModelChangeNotification
211 {
212  public:
215 };
216 
226 class SIM_API cPostModuleReparentNotification : public cModelChangeNotification
227 {
228  public:
231 };
232 
251 class SIM_API cPreGateAddNotification : public cModelChangeNotification
252 {
253  public:
255  const char *gateName;
257  bool isVector;
258 };
259 
278 class SIM_API cPostGateAddNotification : public cModelChangeNotification
279 {
280  public:
282  const char *gateName;
283 };
284 
300 class SIM_API cPreGateDeleteNotification : public cModelChangeNotification
301 {
302  public:
304  const char *gateName;
305 };
306 
324 class SIM_API cPostGateDeleteNotification : public cModelChangeNotification
325 {
326  public:
328  const char *gateName;
330  bool isVector;
332 };
333 
346 class SIM_API cPreGateVectorResizeNotification : public cModelChangeNotification
347 {
348  public:
350  const char *gateName;
351  int newSize;
352 };
353 
366 class SIM_API cPostGateVectorResizeNotification : public cModelChangeNotification
367 {
368  public:
370  const char *gateName;
371  int oldSize;
372 };
373 
387 class SIM_API cPreGateConnectNotification : public cModelChangeNotification
388 {
389  public:
393 };
394 
411 class SIM_API cPostGateConnectNotification : public cModelChangeNotification
412 {
413  public:
415 };
416 
433 class SIM_API cPreGateDisconnectNotification : public cModelChangeNotification
434 {
435  public:
437 };
438 
453 class SIM_API cPostGateDisconnectNotification : public cModelChangeNotification
454 {
455  public:
459 };
460 
480 class SIM_API cPathChangeNotification : public cModelChangeNotification
481 {
482  public:
486 };
487 
501 
515 
529 
543 
554 class SIM_API cPreParameterChangeNotification : public cModelChangeNotification
555 {
556  public:
558 };
559 
570 class SIM_API cPostParameterChangeNotification : public cModelChangeNotification
571 {
572  public:
574 };
575 
585 class SIM_API cPreDisplayStringChangeNotification : public cModelChangeNotification
586 {
587  public:
589 };
590 
600 class SIM_API cPostDisplayStringChangeNotification : public cModelChangeNotification
601 {
602  public:
604 };
605 
606 } // namespace omnetpp
607 
608 #endif
609 
cGate * gate
The gate that is about to be disconnected.
Definition: cmodelchange.h:436
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:254
cGate * pathStartGate
The start gate of the path.
Definition: cmodelchange.h:483
Model change notification fired after a module has been deleted.
Definition: cmodelchange.h:188
Model change notification fired after a gate or gate vector has been added to the module...
Definition: cmodelchange.h:278
const char * gateName
Name of the gate or gate vector.
Definition: cmodelchange.h:304
bool isVector
Name of the gate vector that was deleted.
Definition: cmodelchange.h:330
cGate::Type gateType
Type of the new gate or gate vector (INPUT, OUTPUT or INOUT)
Definition: cmodelchange.h:256
cChannel * channel
The channel object associated with the link; it points to valid object that will be deleted once the ...
Definition: cmodelchange.h:458
int oldSize
The old size of the gate vector.
Definition: cmodelchange.h:371
Model change notification fired after a gate is disconnected.
Definition: cmodelchange.h:453
Model change notification fired after a gate vector has been resized.
Definition: cmodelchange.h:366
Represents a module or channel parameter.
Definition: cpar.h:68
const char * gateName
Name of the new gate or gate vector.
Definition: cmodelchange.h:282
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:554
Model change notification fired just before a gate vector is resized.
Definition: cmodelchange.h:346
cGate * targetGate
The gate it will be connected to.
Definition: cmodelchange.h:391
const char * moduleName
Name of the new module.
Definition: cmodelchange.h:131
Model change notification fired after a parameter change.
Definition: cmodelchange.h:570
Model change notification fired after a gate has been connected.
Definition: cmodelchange.h:411
int index
Index of the deleted in its vector; 0 if not part of a module vector.
Definition: cmodelchange.h:197
cModule * module
The reparented module.
Definition: cmodelchange.h:229
Model change notification fired just before a gate or gate vector is added to the module...
Definition: cmodelchange.h:251
const char * gateName
Name of the gate or gate vector.
Definition: cmodelchange.h:328
Model change notification fired after a module has been reparented.
Definition: cmodelchange.h:226
Common base class for data objects that accompany PRE_MODEL_CHANGE and POST_MODEL_CHANGE signals...
Definition: cmodelchange.h:112
int vectorSize
Size of the module vector that will contain the new module; -1 if not a vector.
Definition: cmodelchange.h:133
int moduleId
The ID of the deleted module.
Definition: cmodelchange.h:192
Model change notification fired after a module is created.
Definition: cmodelchange.h:149
const char * moduleName
Name of the deleted module.
Definition: cmodelchange.h:194
This class represents modules in the simulation.
Definition: cmodule.h:47
cGate * gate
The gate that has been connected.
Definition: cmodelchange.h:414
Model change notification fired just before a module is created.
Definition: cmodelchange.h:127
const char * gateName
The name of the gate vector.
Definition: cmodelchange.h:350
cGate * targetGate
The gate to which it was connected.
Definition: cmodelchange.h:457
cModule * module
Parent of the gate or gate vector.
Definition: cmodelchange.h:303
cChannel * channel
The channel object to be associated with the connection.
Definition: cmodelchange.h:392
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:132
Base class for path change notifications.
Definition: cmodelchange.h:480
Model change notification fired just before a gate is deleted.
Definition: cmodelchange.h:300
cModule * module
The module to which the new gate or gate vector was added.
Definition: cmodelchange.h:281
cDisplayString * displayString
The display string that is about to be updated.
Definition: cmodelchange.h:588
const char * gateName
The name of the gate vector.
Definition: cmodelchange.h:370
int vectorSize
Size of the module vector that contained the deleted module; -1 if not a vector.
Definition: cmodelchange.h:196
Model change notification fired just before a module is reparented.
Definition: cmodelchange.h:210
Model change notification fired just before a connection path is cut.
Definition: cmodelchange.h:528
Model change notification fired just before a connection path is created.
Definition: cmodelchange.h:500
cGate::Type gateType
Type of the gate or gate vector.
Definition: cmodelchange.h:329
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:327
cPar * par
The module parameter that has changed.
Definition: cmodelchange.h:573
cDisplayString * displayString
The display string that was updated.
Definition: cmodelchange.h:603
Model change notification fired just before a display string change.
Definition: cmodelchange.h:585
cModule * module
The module of the gate vector.
Definition: cmodelchange.h:349
Model change notification fired after a dispay string change.
Definition: cmodelchange.h:600
cModule * oldParentModule
The old parent for the module.
Definition: cmodelchange.h:230
Definition: cabstracthistogram.h:21
Model change notification fired after a gate has been deleted.
Definition: cmodelchange.h:324
cModuleType * moduleType
Type of the new module.
Definition: cmodelchange.h:130
cModule * parentModule
Parent module of the deleted module.
Definition: cmodelchange.h:195
int vectorSize
If a gate vector was deleted: size of the vector.
Definition: cmodelchange.h:331
const char * gateName
Name of the new gate or gate vector.
Definition: cmodelchange.h:255
cGate * pathEndGate
The end gate of the path.
Definition: cmodelchange.h:484
Model change notification fired just before a module is deleted.
Definition: cmodelchange.h:168
cModule * module
The new module.
Definition: cmodelchange.h:152
int newSize
The new size of the gate vector.
Definition: cmodelchange.h:351
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:134
bool isVector
Whether a new gate or a gate vector will be added.
Definition: cmodelchange.h:257
cModule * module
The module that is about to be deleted.
Definition: cmodelchange.h:171
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:390
Model change notification fired just before a gate has been disconnected.
Definition: cmodelchange.h:433
cModule * newParentModule
The new parent for the module.
Definition: cmodelchange.h:214
cModule * module
Pointer of the deleted module. The module object has already been deleted at this point...
Definition: cmodelchange.h:191
Base class for channels.
Definition: cchannel.h:34
Model change notification fired after a connection path has been created.
Definition: cmodelchange.h:514
cGate * gate
The gate that has been disconnected.
Definition: cmodelchange.h:456
Type
Definition: cgate.h:73
cModuleType * moduleType
Type of the deleted module.
Definition: cmodelchange.h:193
cModule * module
The module of the gate vector.
Definition: cmodelchange.h:369
cPar * par
The module parameter that is about to be changed.
Definition: cmodelchange.h:557
Model change notification fired after a connection path has been cut.
Definition: cmodelchange.h:542
cModule * module
The module which is about to be reparented.
Definition: cmodelchange.h:213
Model change notification fired just before a gate is connected.
Definition: cmodelchange.h:387
cGate * changedGate
The gate whose connection has changed.
Definition: cmodelchange.h:485