GlobalObjects
Loading...
Searching...
No Matches
glo::WatchNotifyManager::ObjectWatch Class Reference

Monitoring class for objects. More...

Public Member Functions

 ObjectWatch (const ObjID &rObjID)
 
 ~ObjectWatch ()
 
void deleteAllWatches (Communicator *pCommunicator)
 
ObjIDgetObjID ()
 
bool hasWatches () const
 
void setWatch (const CommunicatorCallBackIndex &rCommunicatorCallBackIndex, std::stack< ObjID > *pDependObjIdStack, TdWatchNotifyMode tdWatchNotifyMode, EnDeepMode eDeepMode)
 
int unsetWatch (const CommunicatorCallBackIndex &rCommunicatorCallBackIndex, std::stack< ObjID > *&prWNM_ReadDependObjIdStack, std::stack< ObjID > *&prWNM_WriteDependObjIdStack, std::stack< ObjID > *&prWNM_DeleteDependObjIdStack, std::stack< ObjID > *&prWNM_LockDependObjIdStack, std::stack< ObjID > *&prWNM_UnlockDependObjIdStack, TdWatchNotifyMode tdWatchNotifyMode, EnDeepMode eDeepMode, bool bSimulate=false)
 

Protected Member Functions

 ObjectWatch ()
 

Private Member Functions

void clearCommunicatorObjNotifyModesMap ()
 

Private Attributes

std::map< CommunicatorCallBackIndex, CommunicatorObjNotifyModes *, std::less< CommunicatorCallBackIndex > > m_CommunicatorObjNotifyModesMap
 
ObjID m_ObjID
 

Detailed Description

Monitoring class for objects.

Author
Helmut Jakoby

Constructor & Destructor Documentation

◆ ObjectWatch() [1/2]

glo::WatchNotifyManager::ObjectWatch::ObjectWatch ( )
protected

The standard constructor is not available.

◆ ObjectWatch() [2/2]

glo::WatchNotifyManager::ObjectWatch::ObjectWatch ( const ObjID & rObjID)

Constructor with parameter passing.

Parameters
[in]rObjIDThe object ID of the object to be monitored.

◆ ~ObjectWatch()

glo::WatchNotifyManager::ObjectWatch::~ObjectWatch ( )

Destructor.

Member Function Documentation

◆ clearCommunicatorObjNotifyModesMap()

void glo::WatchNotifyManager::ObjectWatch::clearCommunicatorObjNotifyModesMap ( )
private

Removes all monitoring of the object.

◆ deleteAllWatches()

void glo::WatchNotifyManager::ObjectWatch::deleteAllWatches ( Communicator * pCommunicator)

Removes all monitoring of the transferred client communicator.

Parameters
[in]pCommunicatorThe client communicator.

◆ getObjID()

ObjID & glo::WatchNotifyManager::ObjectWatch::getObjID ( )

Returns the object ID of the object to be monitored.

Returns
The object ID of the object to be monitored.

◆ hasWatches()

bool glo::WatchNotifyManager::ObjectWatch::hasWatches ( ) const

Checks if object monitors are set.

Returns
Returns true if any supervision is set.

◆ setWatch()

void glo::WatchNotifyManager::ObjectWatch::setWatch ( const CommunicatorCallBackIndex & rCommunicatorCallBackIndex,
std::stack< ObjID > * pDependObjIdStack,
TdWatchNotifyMode tdWatchNotifyMode,
EnDeepMode eDeepMode )

Registers a monitoring for its object with possibly dependent objects.

Parameters
[in]rCommunicatorCallBackIndexThe client communicator that wants to monitor.
[in]pDependObjIdStackThe dependent objects that are 'also monitored' by the calling instance.
[in]tdWatchNotifyModeThe activated monitoring mode.
[in]eDeepModeThe monitoring depth mode for keeping the individual DependentObjsWithDeepMode objects apart.

◆ unsetWatch()

int glo::WatchNotifyManager::ObjectWatch::unsetWatch ( const CommunicatorCallBackIndex & rCommunicatorCallBackIndex,
std::stack< ObjID > *& prWNM_ReadDependObjIdStack,
std::stack< ObjID > *& prWNM_WriteDependObjIdStack,
std::stack< ObjID > *& prWNM_DeleteDependObjIdStack,
std::stack< ObjID > *& prWNM_LockDependObjIdStack,
std::stack< ObjID > *& prWNM_UnlockDependObjIdStack,
TdWatchNotifyMode tdWatchNotifyMode,
EnDeepMode eDeepMode,
bool bSimulate = false )

Deregisters a monitoring for its object with any dependent objects.

Parameters
[in]rCommunicatorCallBackIndexThe client communicator that has monitored.
[in,out]prWNM_ReadDependObjIdStackThe dependent objects that were 'co-monitored' with WNM_READ and must also be 'unregistered' if parameter bSimulate == false.
[in,out]prWNM_WriteDependObjIdStackThe dependent objects that were 'also monitored' with WNM_WRITE and must also be 'deregistered' if parameter bSimulate == false.
[in,out]prWNM_DeleteDependObjIdStackThe dependent objects that were 'monitored' with WNM_DELETE and must also be 'deregistered' if parameter bSimulate == false.
[in,out]prWNM_LockDependObjIdStackThe dependent objects that were 'monitored' with WNM_LOCK and must also be 'unregistered' if parameter bSimulate == false.
[in,out]prWNM_UnlockDependObjIdStackThe dependent objects that were 'co-monitored' with WNM_UNLOCK and must also be 'deregistered' if parameter bSimulate == false.
[in]tdWatchNotifyModeThe suspended monitoring mode.
[in]eDeepModeThe monitoring depth mode for keeping the individual DependentObjsWithDeepMode objects apart.
[in]bSimulateIf true, only simulation is performed, no value is set, but a result or error is returned.
Returns
A return value > 0 indicates that the monitoring mode was switched off; however, there are still as many monitoring modes as specified in the return value.
A return == 0 indicates that the monitoring mode has been switched off and there are no further monitoring modes!
A return value < 0 indicates an error.

Member Data Documentation

◆ m_CommunicatorObjNotifyModesMap

std::map< CommunicatorCallBackIndex, CommunicatorObjNotifyModes *, std::less<CommunicatorCallBackIndex> > glo::WatchNotifyManager::ObjectWatch::m_CommunicatorObjNotifyModesMap
private

The individual CommunicatorObjNotifyModes of the monitored object with the CommunicatorCallBackIndex as index in a map.

◆ m_ObjID

ObjID glo::WatchNotifyManager::ObjectWatch::m_ObjID
private

The object ID of the object to be monitored.


The documentation for this class was generated from the following file: