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

#include <cThreadLockRef.h>

Inheritance diagram for Gray::cThreadLockRef< TYPE >:
Gray::cRefPtr< cThreadLockableRef > Gray::cPtrFacade< TYPE >

Additional Inherited Members

- Public Member Functions inherited from Gray::cRefPtr< cThreadLockableRef >
 cRefPtr () noexcept
 
 cRefPtr (const cThreadLockableRef *p2)
 
 cRefPtr (const THIS_t &ref)
 
 cRefPtr (const cThreadLockableRef *p2, TIMESYSD_t dwWaitMS)
 
 ~cRefPtr ()
 
bool isValidPtr () const
 
bool isCorruptPtr () const
 
void put_Ptr (cThreadLockableRef *p)
 
void ReleasePtr ()
 
int get_RefCount () const
 
THIS_toperator= (const cThreadLockableRef *p2)
 
THIS_toperator= (const THIS_t &ref)
 
 operator cRefPtr< _TYPE_2 > () const
 
- Public Member Functions inherited from Gray::cPtrFacade< TYPE >
 cPtrFacade (TYPE *p=nullptr) noexcept
 
 cPtrFacade (THIS_t &&ref) noexcept
 
bool isValidPtr () const noexcept
 
TYPE ** get_PPtr ()
 
TYPEget_Ptr () const noexcept
 
void put_Ptr (TYPE *p) noexcept
 
void ReleasePtr () noexcept
 
void AttachPtr (TYPE *p) noexcept
 
TYPEDetachPtr () noexcept
 
THIS_toperator= (TYPE *p) noexcept
 
THIS_toperator= (THIS_t &&ref) noexcept
 
 operator TYPE * () const noexcept
 
TYPEget_Ref () const
 
TYPEoperator* () const
 
TYPEoperator-> () const
 
bool operator! () const noexcept
 Comparison ops. More...
 
bool operator!= (TYPE *p2) const noexcept
 
bool operator== (TYPE *p2) const noexcept
 
- Protected Member Functions inherited from Gray::cRefPtr< cThreadLockableRef >
void IncRefFirst ()
 
- Protected Attributes inherited from Gray::cPtrFacade< TYPE >
TYPEm_p
 Pointer to some object of TYPE. More...
 

Detailed Description

template<class TYPE = cThreadLockableRef>
class Gray::cThreadLockRef< TYPE >

a cRefPtr (inc ref count for delete protection) that also thread locks the object. (like cLockerT) Similar to the MFC CMultiLock or CSingleLock and cRefPtr

Note
TYPE we are referring to MUST be based on cThreadLockableRef Thread Lock an object for as long as 'this' object persists. May wait if some other thread has the object locked.
there must also be a non thread locking smart pointer ref to the object. always thread locking an object for its whole life makes no sense.

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