Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
Gray::cLockerT< TYPE > Class Template Reference

#include <cLocker.h>

Inheritance diagram for Gray::cLockerT< TYPE >:
Gray::cPtrFacade< cLockableBase > Gray::cHookSwapLock Gray::cHookSwapChain

Public Member Functions

 cLockerT (TYPE *pLock, bool bLockSuccess) noexcept
 
 cLockerT (TYPE &rLock)
 
 ~cLockerT ()
 
- Public Member Functions inherited from Gray::cPtrFacade< cLockableBase >
 cPtrFacade (cLockableBase *p=nullptr) noexcept
 
 cPtrFacade (THIS_t &&ref) noexcept
 
bool isValidPtr () const noexcept
 
cLockableBase ** get_PPtr ()
 
cLockableBaseget_Ptr () const noexcept
 
void put_Ptr (cLockableBase *p) noexcept
 
void ReleasePtr () noexcept
 
void AttachPtr (cLockableBase *p) noexcept
 
cLockableBaseDetachPtr () noexcept
 
THIS_toperator= (cLockableBase *p) noexcept
 
THIS_toperator= (THIS_t &&ref) noexcept
 
 operator cLockableBase * () const noexcept
 
cLockableBaseget_Ref () const
 
cLockableBaseoperator* () const
 
cLockableBaseoperator-> () const
 
bool operator! () const noexcept
 Comparison ops. More...
 
bool operator!= (cLockableBase *p2) const noexcept
 
bool operator== (cLockableBase *p2) const noexcept
 

Additional Inherited Members

- Protected Attributes inherited from Gray::cPtrFacade< cLockableBase >
cLockableBasem_p
 Pointer to some object of TYPE. More...
 

Detailed Description

template<class TYPE = cLockableBase>
class Gray::cLockerT< TYPE >

Lock/Unlock something for the life span of this object. Stack only based guard. Used for: cThreadLockMutex, cThreadLockCrit, cThreadLockFast, ... Might be used for: cDXSurfaceLock, cSemaphoreLock, cWinHeap, cDXMesh, cDXBuffer TYPE must support Unlock() and probably Lock() or be based on cLockableBase* m_p = the lock we are locking. Similar to ATL CCritSecLock

Constructor & Destructor Documentation

◆ cLockerT() [1/2]

template<class TYPE = cLockableBase>
Gray::cLockerT< TYPE >::cLockerT ( TYPE pLock,
bool  bLockSuccess 
)
inlineexplicitnoexcept

◆ cLockerT() [2/2]

template<class TYPE = cLockableBase>
Gray::cLockerT< TYPE >::cLockerT ( TYPE rLock)
inlineexplicit

◆ ~cLockerT()

template<class TYPE = cLockableBase>
Gray::cLockerT< TYPE >::~cLockerT ( )
inline

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