19 #include "MLObjMgrSystem.h"
23 #include <mlCallOnNextOpportunity.h>
46 friend class omEventComm;
68 static const char *NetworkModeStrings[NUM_NETWORK_MODES];
120 _defaultAddressFlags = flags;
124 return _defaultAddressFlags;
146 _preventSocketDistribution =
true;
151 _preventSocketDistribution =
false;
199 omSServer *_serverSocket;
200 omSClient *_clientSocket;
210 std::set<ObjMgrClient *> _clientModules;
216 std::list<omEventContainer> _undoBuffer;
217 std::list<omEventContainer> _redoBuffer;
224 bool _preventSocketDistribution;
227 bool _networkInitialized;
230 void evalClient(std::fstream &info,
ObjMgrClient *client);
231 void evalNetwork(std::fstream &info,
const std::multimap<ObjMgrBase *, ObjMgrBase *> &graph,
ObjMgrBase *current);
235 static void sendNotificationCB(
void *
self);
Field to encapsulate a boolean value.
Field to encapsulate an enumerated value.
Base class for all fields used in the ML.
Field to encapsulate an integer value.
Field without value for notifications.
Base class for all communicating modules.
Base class for all modules that wish to use and communicate (send and receive notifications) with the...
Database manager and communication switchboard.
~ObjMgr() override
Destructor.
omObjectContainer * _objects
Objects map.
BoolField * eventFilterFld
Filter events and remove duplicates etc. if toggle is on. Default is ON.
void addEvent(const ObjMgrEvent &event)
Add event to event container.
NotifyField * clearObjContainerFld
Clear object container.
MLint32 _notifyRecursionDepth
This value represents the current recursion depth in the sendNotification() method caused by an initi...
BoolField * eventLoggingFld
Macro for declaring methods for the runtime system.
std::string getDebugComment() const override
Return debug comment.
void handleNotification(Field *field) override
Called when input changes.
const omObjectContainer * getObjectContainer() const
Get read-only access to object container.
void disableEventRecordingForSocketDistribution()
Modifications to the object container go without any notice for ObjMgrs connected via socket interfac...
BoolField * permitRecursiveNotificationFld
Permit recursive reentry in handleNotification() of ObjMgrClient modules if toggle is on....
void disableEventRecording()
Modifications to the object container go without any notice (no events generated).
CallOnNextOpportunity _callLater
Helper object to schedule a call on next opportunity.
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.
const omFlags & getDefaultAddressFlags() const
Get default address flags to be assigned to newly created objects or attributes.
void enableEventRecording()
Modifications to the object container will be recorded (events are generated).
void activateAttachments() override
Initialize module after loading.
void removeClient(ObjMgrClient *client)
Remove ObjMgrClient from the container of instantiated modules.
BoolField * clientsReceiveOwnNotifyFld
Client modules receive notification sent by themselves if toggle is on. Default is OFF.
void sendNotificationOnNextOpportunity()
Send notification to all connected ObjMgrClient modules on next opportunity.
void saveNetworkInfo(const std::string &filename)
Write information about the current ObjMgr network to a file.
void setDefaultAddressFlags(const omFlags &flags)
Set default address flags to be assigned to newly created objects or attributes.
void addClient(ObjMgrClient *client)
Add a new ObjMgrClient to the container of instantiated modules.
void enableEventRecordingForSocketDistribution()
Modifications to the object container will be recorded for ObjMgrs connected via socket interface.
void sendNotification(ObjMgrBase *sendingClient)
Send notification to all connected ObjMgrClient modules (the BaseField is touched) that something has...
Field to encapsulate a string value.
Managed special flags of information address components.
Database (object container) - manages all objects.
#define ML_CLASS_HEADER(className)
Same like ML_CLASS_HEADER_EXPORTED with a non existing export symbol.
std::list< ObjMgrEvent > omEventContainer
Declare type for event container;.