MeVisLabToolboxReference
|
Database manager and communication switchboard. More...
#include <ObjMgr/mlObjMgr.h>
Public Member Functions | |
ObjMgr () | |
Constructor. | |
~ObjMgr () | |
Destructor. | |
void | setDefaultAddressFlags (const omFlags &flags) |
Set default address flags to be assigned to newly created objects or attributes. | |
const omFlags & | getDefaultAddressFlags () const |
Get default address flags to be assigned to newly created objects or attributes. | |
void | addEvent (const ObjMgrEvent &event) |
Add event to event container. | |
void | disableEventRecording () |
Modifications to the object container go without any notice (no events generated). | |
void | enableEventRecording () |
Modifications to the object container will be recorded (events are generated). | |
void | disableEventRecordingForSocketDistribution () |
Modifications to the object container go without any notice for ObjMgrs connected via socket interface (these events will not be distributed). | |
void | enableEventRecordingForSocketDistribution () |
Modifications to the object container will be recorded for ObjMgrs connected via socket interface. | |
const omObjectContainer * | getObjectContainer () const |
Get read-only access to object container. | |
void | saveNetworkInfo (const std::string &filename) |
Write information about the current ObjMgr network to a file. | |
Public Attributes | |
BoolField * | eventLoggingFld |
Macro for declaring methods for the runtime system. | |
BoolField * | eventFilterFld |
Filter events and remove duplicates etc. if toggle is on. Default is ON. | |
BoolField * | permitRecursiveNotificationFld |
Permit recursive reentry in handleNotification() of ObjMgrClient modules if toggle is on. Default is ON. | |
BoolField * | clientsReceiveOwnNotifyFld |
Client modules receive notification sent by themselves if toggle is on. Default is OFF. | |
NotifyField * | clearObjContainerFld |
Clear object container. | |
StringField * | infoFileNameFld |
Specifies the name of a file in which information about the current ObjMgr network are written. | |
NotifyField * | saveInfoFld |
Write information about the current ObjMgr network to a file whose name is given in infoFileFld. | |
Protected Member Functions | |
virtual void | activateAttachments () |
Initialize module after loading. | |
virtual void | handleNotification (Field *field) |
Called when input changes. | |
void | addClient (ObjMgrClient *client) |
Add a new ObjMgrClient to the container of instantiated modules. | |
void | removeClient (ObjMgrClient *client) |
Remove ObjMgrClient from the container of instantiated modules. | |
void | sendNotification (ObjMgrBase *sendingClient) |
Send notification to all connected ObjMgrClient modules (the BaseField is touched) that something has changed in the object container. | |
void | sendNotificationOnNextOpportunity () |
Send notification to all connected ObjMgrClient modules on next opportunity. | |
virtual std::string | getDebugComment () const |
Return debug comment. | |
Protected Attributes | |
omObjectContainer * | _objects |
Objects map. | |
MLint32 | _notifyRecursionDepth |
This value represents the current recursion depth in the sendNotification() method caused by an initial notify from one ObjMgrClient. | |
CallOnNextOpportunity | _callLater |
Helper object to schedule a call on next opportunity. | |
Friends | |
class | ObjMgrBase |
class | ObjMgrClient |
Database manager and communication switchboard.
Definition at line 43 of file mlObjMgr.h.
ml::ObjMgr::ObjMgr | ( | ) |
Constructor.
ml::ObjMgr::~ObjMgr | ( | ) |
Destructor.
virtual void ml::ObjMgr::activateAttachments | ( | ) | [protected, virtual] |
Initialize module after loading.
Reimplemented from ml::FieldContainer.
void ml::ObjMgr::addClient | ( | ObjMgrClient * | client | ) | [protected] |
Add a new ObjMgrClient to the container of instantiated modules.
void ml::ObjMgr::addEvent | ( | const ObjMgrEvent & | event | ) |
Add event to event container.
If something is created, this function must be called after the creation took place. If something is removed, it must be called prior to the action itself. Hence the function is able to analyze some aspects of the event.
void ml::ObjMgr::disableEventRecording | ( | ) | [inline] |
Modifications to the object container go without any notice (no events generated).
Handle with care!
Definition at line 138 of file mlObjMgr.h.
void ml::ObjMgr::disableEventRecordingForSocketDistribution | ( | ) | [inline] |
Modifications to the object container go without any notice for ObjMgrs connected via socket interface (these events will not be distributed).
Handle with care!
Definition at line 149 of file mlObjMgr.h.
void ml::ObjMgr::enableEventRecording | ( | ) | [inline] |
Modifications to the object container will be recorded (events are generated).
This is the normal case.
Definition at line 143 of file mlObjMgr.h.
void ml::ObjMgr::enableEventRecordingForSocketDistribution | ( | ) | [inline] |
Modifications to the object container will be recorded for ObjMgrs connected via socket interface.
This is the normal case.
Definition at line 154 of file mlObjMgr.h.
virtual std::string ml::ObjMgr::getDebugComment | ( | ) | const [inline, protected, virtual] |
const omFlags& ml::ObjMgr::getDefaultAddressFlags | ( | ) | const [inline] |
Get default address flags to be assigned to newly created objects or attributes.
Definition at line 127 of file mlObjMgr.h.
const omObjectContainer* ml::ObjMgr::getObjectContainer | ( | ) | const [inline] |
Get read-only access to object container.
Definition at line 159 of file mlObjMgr.h.
virtual void ml::ObjMgr::handleNotification | ( | Field * | field | ) | [protected, virtual] |
Called when input changes.
Reimplemented from ml::Module.
void ml::ObjMgr::removeClient | ( | ObjMgrClient * | client | ) | [protected] |
Remove ObjMgrClient from the container of instantiated modules.
void ml::ObjMgr::saveNetworkInfo | ( | const std::string & | filename | ) |
Write information about the current ObjMgr network to a file.
void ml::ObjMgr::sendNotification | ( | ObjMgrBase * | sendingClient | ) | [protected] |
Send notification to all connected ObjMgrClient modules (the BaseField is touched) that something has changed in the object container.
If client is NULL, the sender cannot be determined.
void ml::ObjMgr::sendNotificationOnNextOpportunity | ( | ) | [protected] |
Send notification to all connected ObjMgrClient modules on next opportunity.
void ml::ObjMgr::setDefaultAddressFlags | ( | const omFlags & | flags | ) | [inline] |
Set default address flags to be assigned to newly created objects or attributes.
Definition at line 123 of file mlObjMgr.h.
friend class ObjMgrBase [friend] |
Definition at line 45 of file mlObjMgr.h.
friend class ObjMgrClient [friend] |
Reimplemented from ml::ObjMgrBase.
Definition at line 46 of file mlObjMgr.h.
CallOnNextOpportunity ml::ObjMgr::_callLater [protected] |
Helper object to schedule a call on next opportunity.
Definition at line 198 of file mlObjMgr.h.
MLint32 ml::ObjMgr::_notifyRecursionDepth [protected] |
This value represents the current recursion depth in the sendNotification() method caused by an initial notify from one ObjMgrClient.
Definition at line 195 of file mlObjMgr.h.
omObjectContainer* ml::ObjMgr::_objects [protected] |
Objects map.
Definition at line 191 of file mlObjMgr.h.
Clear object container.
Definition at line 91 of file mlObjMgr.h.
Client modules receive notification sent by themselves if toggle is on. Default is OFF.
Definition at line 88 of file mlObjMgr.h.
Filter events and remove duplicates etc. if toggle is on. Default is ON.
Definition at line 82 of file mlObjMgr.h.
Macro for declaring methods for the runtime system.
If toggle is off, no events will be recorded and sent to connected ObjMgrClient modules. Default is ON
Definition at line 79 of file mlObjMgr.h.
Specifies the name of a file in which information about the current ObjMgr network are written.
Definition at line 94 of file mlObjMgr.h.
Permit recursive reentry in handleNotification() of ObjMgrClient modules if toggle is on. Default is ON.
Definition at line 85 of file mlObjMgr.h.
Write information about the current ObjMgr network to a file whose name is given in infoFileFld.
Definition at line 97 of file mlObjMgr.h.