ROOT  6.06/08
Reference Guide
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | Private Member Functions | List of all members
TGLLockable Class Reference

Simple locking interface used by viewer and scene.

Definition at line 17 of file TGLLockable.h.

Classes

class  TUnlocker
 

Public Types

enum  ELock { kUnlocked, kDrawLock, kSelectLock, kModifyLock }
 

Public Member Functions

 TGLLockable ()
 
virtual ~TGLLockable ()
 
virtual const char * LockIdStr () const
 
Bool_t TakeLock (ELock lock) const
 Lock the object in mode 'lock'. More...
 
Bool_t ReleaseLock (ELock lock) const
 Release current lock, make sure it the same as the 'lock' argument. More...
 
Bool_t IsLocked () const
 
ELock CurrentLock () const
 
Bool_t IsDrawOrSelectLock () const
 

Static Public Member Functions

static const char * LockName (ELock lock)
 Return name-string for given lock-type. More...
 
static Bool_t LockValid (ELock lock)
 Test if lock is a valid type to take/release. More...
 

Protected Attributes

ELock fLock
 

Private Member Functions

 TGLLockable (const TGLLockable &)
 
TGLLockableoperator= (const TGLLockable &)
 

#include <TGLLockable.h>

+ Inheritance diagram for TGLLockable:

Member Enumeration Documentation

§ ELock

Enumerator
kUnlocked 
kDrawLock 
kSelectLock 
kModifyLock 

Definition at line 20 of file TGLLockable.h.

Constructor & Destructor Documentation

§ TGLLockable() [1/2]

TGLLockable::TGLLockable ( const TGLLockable )
private

§ TGLLockable() [2/2]

TGLLockable::TGLLockable ( )

Definition at line 22 of file TGLLockable.cxx.

Referenced by TGLLockable::TUnlocker::~TUnlocker().

§ ~TGLLockable()

virtual TGLLockable::~TGLLockable ( )
inlinevirtual

Definition at line 54 of file TGLLockable.h.

Member Function Documentation

§ CurrentLock()

ELock TGLLockable::CurrentLock ( ) const
inline

§ IsDrawOrSelectLock()

Bool_t TGLLockable::IsDrawOrSelectLock ( ) const
inline

Definition at line 63 of file TGLLockable.h.

Referenced by TGLSceneBase::PreDraw(), and TGLViewer::SwapBuffers().

§ IsLocked()

Bool_t TGLLockable::IsLocked ( ) const
inline

§ LockIdStr()

virtual const char* TGLLockable::LockIdStr ( ) const
inlinevirtual

Reimplemented in TGLViewerBase, and TGLSceneBase.

Definition at line 56 of file TGLLockable.h.

Referenced by ReleaseLock(), and TakeLock().

§ LockName()

const char * TGLLockable::LockName ( ELock  lock)
static

§ LockValid()

Bool_t TGLLockable::LockValid ( ELock  lock)
static

Test if lock is a valid type to take/release.

kUnlocked is never valid in these cases.

Definition at line 85 of file TGLLockable.cxx.

Referenced by IsDrawOrSelectLock(), ReleaseLock(), and TakeLock().

§ operator=()

TGLLockable& TGLLockable::operator= ( const TGLLockable )
private

§ ReleaseLock()

Bool_t TGLLockable::ReleaseLock ( ELock  lock) const

Release current lock, make sure it the same as the 'lock' argument.

Returns TRUE on success, FALSE on failure.

Definition at line 51 of file TGLLockable.cxx.

Referenced by TGLViewer::DoDraw(), TGLViewer::DoOverlaySelect(), TGLViewer::DoSecondarySelect(), TGLViewer::DoSelect(), TGLScene::EndUpdate(), LockIdStr(), TGLViewerBase::PostRender(), TGLViewerBase::PreRender(), TGLScene::~TGLScene(), and TGLLockable::TUnlocker::~TUnlocker().

§ TakeLock()

Bool_t TGLLockable::TakeLock ( ELock  lock) const

Member Data Documentation

§ fLock

ELock TGLLockable::fLock
mutableprotected

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