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

Monitoring class for AllSets. More...

Public Member Functions

 ClassWatch (unsigned long ulClassID)
 
 ~ClassWatch ()
 
void deleteAllWatches (Communicator *pCommunicator)
 
unsigned long getClassID () const
 
std::size_t getCommunicatorClassNotifyModesMapCount () const
 
std::size_t getObjectWatchMapCount () const
 
bool hasWatches () const
 
void setWatch (const CommunicatorCallBackIndex &rCommunicatorCallBackIndex, const ObjID &rObjID, std::stack< ObjID > *pDependObjIdStack, TdWatchNotifyMode tdWatchNotifyMode, EnDeepMode eDeepMode)
 
void setWatch (const CommunicatorCallBackIndex &rCommunicatorCallBackIndex, TdWatchNotifyMode tdWatchNotifyMode)
 
int unsetWatch (const CommunicatorCallBackIndex &rCommunicatorCallBackIndex, const ObjID &rObjID, 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)
 
int unsetWatch (const CommunicatorCallBackIndex &rCommunicatorCallBackIndex, TdWatchNotifyMode tdWatchNotifyMode, bool bSimulate=false)
 

Protected Member Functions

 ClassWatch ()
 
void clearCommunicatorClassNotifyModesMap ()
 
void ClearObjectWatchMap ()
 

Private Attributes

std::map< CommunicatorCallBackIndex, CommunicatorClassNotifyModes *, std::less< CommunicatorCallBackIndex > > m_CommunicatorClassNotifyModesMap
 
std::map< ObjID, ObjectWatch *, std::less< ObjID > > m_ObjectWatchMap
 
unsigned long m_ulClassID
 

Detailed Description

Monitoring class for AllSets.

Author
Helmut Jakoby

Constructor & Destructor Documentation

◆ ClassWatch() [1/2]

glo::WatchNotifyManager::ClassWatch::ClassWatch ( )
protected

The standard constructor is not available.

◆ ClassWatch() [2/2]

glo::WatchNotifyManager::ClassWatch::ClassWatch ( unsigned long ulClassID)

Constructor with parameter passing.

Parameters
[in]ulClassIDThe class ID of the AllSet to be monitored.

◆ ~ClassWatch()

glo::WatchNotifyManager::ClassWatch::~ClassWatch ( )

Destructor.

Member Function Documentation

◆ clearCommunicatorClassNotifyModesMap()

void glo::WatchNotifyManager::ClassWatch::clearCommunicatorClassNotifyModesMap ( )
protected

Removes all monitoring of the AllSet.

◆ ClearObjectWatchMap()

void glo::WatchNotifyManager::ClassWatch::ClearObjectWatchMap ( )
protected

Removes all monitoring of the objects.

◆ deleteAllWatches()

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

Removes all monitoring of the transferred client communicator.

Parameters
[in]pCommunicatorThe client communicator.

◆ getClassID()

unsigned long glo::WatchNotifyManager::ClassWatch::getClassID ( ) const

Returns the class ID of the AllSet to be monitored.

Returns
The class ID of the AllSet to be monitored.

◆ getCommunicatorClassNotifyModesMapCount()

std::size_t glo::WatchNotifyManager::ClassWatch::getCommunicatorClassNotifyModesMapCount ( ) const

Returns the number of AllSet monitors.

Returns
The number of CommunicatorClassNotifyModes.

◆ getObjectWatchMapCount()

std::size_t glo::WatchNotifyManager::ClassWatch::getObjectWatchMapCount ( ) const

Returns the number of object monitors.

Returns
The number of object monitors.

◆ hasWatches()

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

Checks if AllSet monitors are set.

Returns
Returns true if any supervision is set.

◆ setWatch() [1/2]

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

Registers a monitoring for an object with possibly dependent objects.

Parameters
[in]rCommunicatorCallBackIndexThe client communicator that wants to monitor.
[in]rObjIDThe object ID for which the monitoring is to be registered.
[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.

◆ setWatch() [2/2]

void glo::WatchNotifyManager::ClassWatch::setWatch ( const CommunicatorCallBackIndex & rCommunicatorCallBackIndex,
TdWatchNotifyMode tdWatchNotifyMode )

Registers a monitoring for its AllSet.

Parameters
[in]rCommunicatorCallBackIndexThe client communicator that wants to monitor.
[in]tdWatchNotifyModeThe activated monitoring mode.

◆ unsetWatch() [1/2]

int glo::WatchNotifyManager::ClassWatch::unsetWatch ( const CommunicatorCallBackIndex & rCommunicatorCallBackIndex,
const ObjID & rObjID,
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 an object with any dependent objects.

Parameters
[in]rCommunicatorCallBackIndexThe client communicator that has monitored.
[in]rObjIDThe object ID for which the monitoring is to be registered.
[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.

◆ unsetWatch() [2/2]

int glo::WatchNotifyManager::ClassWatch::unsetWatch ( const CommunicatorCallBackIndex & rCommunicatorCallBackIndex,
TdWatchNotifyMode tdWatchNotifyMode,
bool bSimulate = false )

Deregisters a monitoring for its AllSet.

Parameters
[in]rCommunicatorCallBackIndexThe client communicator that has monitored.
[in]tdWatchNotifyModeThe suspended monitoring mode.
[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_CommunicatorClassNotifyModesMap

std::map< CommunicatorCallBackIndex, CommunicatorClassNotifyModes *, std::less<CommunicatorCallBackIndex> > glo::WatchNotifyManager::ClassWatch::m_CommunicatorClassNotifyModesMap
private

The individual CommunicatorClassNotifyModes of the monitored AllSet with the CommunicatorCallBackIndex as index in a map.

◆ m_ObjectWatchMap

std::map< ObjID, ObjectWatch *, std::less<ObjID> > glo::WatchNotifyManager::ClassWatch::m_ObjectWatchMap
private

The object surveillance with the ObjID as index in a map.

◆ m_ulClassID

unsigned long glo::WatchNotifyManager::ClassWatch::m_ulClassID
private

The class ID of the AllSet to be monitored.


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