MeVisLab Toolbox Reference
mlObjMgrEvent.h
Go to the documentation of this file.
1 /*************************************************************************************
2 **
3 ** Copyright 2007, MeVis Medical Solutions AG
4 **
5 ** The user may use this file in accordance with the license agreement provided with
6 ** the Software or, alternatively, in accordance with the terms contained in a
7 ** written agreement between the user and MeVis Medical Solutions AG.
8 **
9 ** For further information use the contact form at https://www.mevislab.de/contact
10 **
11 **************************************************************************************/
12 
13 #ifndef ML_OBJ_MGR_EVENT_H
14 #define ML_OBJ_MGR_EVENT_H
15 
16 
18 
19 #include "MLObjMgrSystem.h"
20 #include "mlObjMgrObjectID.h"
21 #include "mlObjMgrFlags.h"
22 #include "mlObjMgrData.h"
23 
24 ML_START_NAMESPACE
25 
26  // Forward declaration of classes
27  class omAttribute;
28  class omObject;
29 
33  {
34  public:
35 
37  enum EventType {
38  NIL = 0,
45  NUM_EVENT_TYPES
46  };
47 
49  static const char *EventTypeStrings[NUM_EVENT_TYPES];
50 
51  public:
52 
55 
58 
60  size_t clientID;
61 
68 
73 
78 
80  : type(NIL), nonMaskable(false), clientID(0) {}
81  ObjMgrEvent(EventType _type, const omIDType &_objectID, const omIDType &_layerID, const omIDType &_infoID, const omFlags &_objectFlags, const omFlags &_layerFlags, const omFlags &_infoFlags, const omData &_newValue, const omData &_prevValue, bool _nonMaskable = false)
82  : type(_type), nonMaskable(_nonMaskable), clientID(0), objectID(_objectID), layerID(_layerID), infoID(_infoID), objectFlags(_objectFlags), layerFlags(_layerFlags), infoFlags(_infoFlags), newValue(_newValue), prevValue(_prevValue) {}
83 
84  ObjMgrEvent(EventType _type, void* _clientID, bool _nonMaskable = false);
85 
86  ObjMgrEvent(EventType _type, const omObject &_object, const omFlags &_flags, bool _nonMaskable = false);
87  ObjMgrEvent(EventType _type, const omObject &_object, bool _nonMaskable = false);
88 
89  ObjMgrEvent(EventType _type, const omAttribute &_attribute, const omFlags &_flags, bool _nonMaskable = false);
90  ObjMgrEvent(EventType _type, const omAttribute &_attribute, bool _nonMaskable = false);
91 
92  ObjMgrEvent(EventType _type, const omAttribute &_attribute, const omFlags &_flags, const omData &_newValue, bool _nonMaskable = false);
93  ObjMgrEvent(EventType _type, const omAttribute &_attribute, const omData &_newValue, bool _nonMaskable = false);
94 
95  ObjMgrEvent(EventType _type, const omAttribute &_attribute, const omFlags &_flags, const omData &_newValue, const omData &_prevValue, bool _nonMaskable = false);
96  ObjMgrEvent(EventType _type, const omAttribute &_attribute, const omData &_newValue, const omData &_prevValue, bool _nonMaskable = false);
97 
99  bool operator ==(const ObjMgrEvent &ev) const;
100  };
101 
103  typedef std::list<ObjMgrEvent> omEventContainer;
104 
105 ML_END_NAMESPACE
106 
107 #endif // __mlObjMgrEvent_H
Event information.
Definition: mlObjMgrEvent.h:33
EventType
Notification types.
Definition: mlObjMgrEvent.h:37
EventType type
What kind of modification to the object (container) has been made.
Definition: mlObjMgrEvent.h:54
ObjMgrEvent(EventType _type, const omAttribute &_attribute, const omData &_newValue, const omData &_prevValue, bool _nonMaskable=false)
ObjMgrEvent(EventType _type, const omAttribute &_attribute, bool _nonMaskable=false)
omIDType layerID
ID of layer that has been modified.
Definition: mlObjMgrEvent.h:65
omData prevValue
Previous value.
Definition: mlObjMgrEvent.h:77
ObjMgrEvent(EventType _type, void *_clientID, bool _nonMaskable=false)
size_t clientID
ID of client that should receive the event, or 0 for any client.
Definition: mlObjMgrEvent.h:60
omData newValue
New value.
Definition: mlObjMgrEvent.h:75
omFlags layerFlags
Definition: mlObjMgrEvent.h:71
ObjMgrEvent(EventType _type, const omObject &_object, bool _nonMaskable=false)
omIDType infoID
ID of information item that has been modified.
Definition: mlObjMgrEvent.h:67
ObjMgrEvent(EventType _type, const omAttribute &_attribute, const omData &_newValue, bool _nonMaskable=false)
ObjMgrEvent(EventType _type, const omObject &_object, const omFlags &_flags, bool _nonMaskable=false)
omFlags objectFlags
Special address flags.
Definition: mlObjMgrEvent.h:70
ObjMgrEvent(EventType _type, const omAttribute &_attribute, const omFlags &_flags, const omData &_newValue, const omData &_prevValue, bool _nonMaskable=false)
ObjMgrEvent(EventType _type, const omAttribute &_attribute, const omFlags &_flags, const omData &_newValue, bool _nonMaskable=false)
ObjMgrEvent(EventType _type, const omIDType &_objectID, const omIDType &_layerID, const omIDType &_infoID, const omFlags &_objectFlags, const omFlags &_layerFlags, const omFlags &_infoFlags, const omData &_newValue, const omData &_prevValue, bool _nonMaskable=false)
Definition: mlObjMgrEvent.h:81
ObjMgrEvent(EventType _type, const omAttribute &_attribute, const omFlags &_flags, bool _nonMaskable=false)
omIDType objectID
ID of object that has been modified.
Definition: mlObjMgrEvent.h:63
bool nonMaskable
Specifies whether or not an event can be filtered out.
Definition: mlObjMgrEvent.h:57
Manages the attribute data and takes care of allocation and deallocation.
Manages data and takes care of allocation and deallocation.
Definition: mlObjMgrData.h:35
Managed special flags of information address components.
Definition: mlObjMgrFlags.h:28
Base class that declares to basic functionality of an object.
bool operator==(const Tmat2< DT > &a, const Tmat2< DT > &b)
a == b ? Return true if yes.
Definition: mlMatrix2.h:425
std::list< ObjMgrEvent > omEventContainer
Declare type for event container;.