Medical Imaging Interaction Toolkit  2023.12.00
Medical Imaging Interaction Toolkit
berry::LockListener Class Reference

#include <berryLockListener.h>

Inheritance diagram for berry::LockListener:
Collaboration diagram for berry::LockListener:

Public Member Functions

virtual bool AboutToWait (Poco::Thread *lockOwner)
 
virtual void AboutToRelease ()
 
- Public Member Functions inherited from berry::Object
virtual QString GetClassName () const
 
virtual Reflection::TypeInfo GetTypeInfo () const
 
virtual QList< Reflection::TypeInfoGetSuperclasses () const
 
virtual void Delete ()
 
QDebug Print (QDebug os, Indent Indent=0) const
 
virtual QString ToString () const
 
virtual uint HashCode () const
 
virtual bool operator< (const Object *) const
 
void Register () const
 
void UnRegister (bool del=true) const
 
int GetReferenceCount () const
 
void SetReferenceCount (int)
 
void AddDestroyListener (const MessageAbstractDelegate<> &delegate) const
 
void RemoveDestroyListener (const MessageAbstractDelegate<> &delegate) const
 
virtual bool operator== (const Object *) const
 

Protected Member Functions

bool IsLockOwnerThread () const
 
- Protected Member Functions inherited from berry::Object
 Object ()
 
virtual ~Object ()
 
virtual QDebug PrintSelf (QDebug os, Indent indent) const
 
virtual QDebug PrintHeader (QDebug os, Indent indent) const
 
virtual QDebug PrintTrailer (QDebug os, Indent indent) const
 

Additional Inherited Members

- Public Types inherited from berry::Object
typedef Object Self
 
typedef berry::SmartPointer< SelfPointer
 
typedef berry::SmartPointer< const SelfConstPointer
 
typedef berry::WeakPointer< SelfWeakPtr
 
typedef berry::WeakPointer< const SelfConstWeakPtr
 
- Static Public Member Functions inherited from berry::Object
static const char * GetStaticClassName ()
 
static Reflection::TypeInfo GetStaticTypeInfo ()
 
static QList< Reflection::TypeInfoGetStaticSuperclasses ()
 
- Protected Attributes inherited from berry::Object
QAtomicInt m_ReferenceCount
 
QMutex m_ReferenceCountLock
 

Detailed Description

A lock listener is notified whenever a thread is about to wait on a lock, and when a thread is about to release a lock.

This class is for internal use by the platform-related plug-ins. Clients outside of the base platform should not reference or subclass this class.

See also
IJobManager::SetLockListener(LockListener::Pointer)

Definition at line 33 of file berryLockListener.h.

Member Function Documentation

◆ AboutToRelease()

virtual void berry::LockListener::AboutToRelease ( )
inlinevirtual

Notification that a thread is about to release a lock.

This default implementation does nothing. Subclasses may override.

Definition at line 65 of file berryLockListener.h.

◆ AboutToWait()

virtual bool berry::LockListener::AboutToWait ( Poco::Thread *  lockOwner)
inlinevirtual

Notification that a thread is about to block on an attempt to acquire a lock. Returns whether the thread should be granted immediate access to the lock.

This default implementation always returns false. Subclasses may override.

Parameters
lockOwnerthe thread that currently owns the lock this thread is waiting for, or null if unknown.
Returns
true if the thread should be granted immediate access, and false if it should wait for the lock to be available

Definition at line 55 of file berryLockListener.h.

◆ IsLockOwnerThread()

bool berry::LockListener::IsLockOwnerThread ( ) const
inlineprotected

Returns whether this thread currently owns any locks

Returns
true if this thread owns any locks, and false otherwise.

Definition at line 77 of file berryLockListener.h.


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