Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
GrayLib::cSharedContext Class Reference

#include <cSharedMemory.h>

Inheritance diagram for GrayLib::cSharedContext:
Gray::cSingleton< cSharedContext > Gray::cSingletonStatic< TYPE > Gray::cSingletonRegister Gray::CObject Gray::cHeapObject Gray::IHeapObject

Public Member Functions

 cSharedContext ()
 
virtual ~cSharedContext ()
 
bool isLockedByMe () const noexcept
 
- Public Member Functions inherited from Gray::CObject
virtual ~CObject ()
 
virtual bool isValidCheck () const noexcept
 < memory allocation and structure definitions are valid. More...
 
virtual void AssertValid () const
 < memory allocation and structure definitions are valid. More...
 
virtual void Serialize (cArchive &a)
 
- Public Member Functions inherited from Gray::cHeapObject
 cHeapObject ()
 
virtual ~cHeapObject ()
 
bool IsValidInsideN (INT_PTR index) const
 
bool IsValidInsidePtr (void const *pTest) const
 
virtual size_t GetHeapStatsThis (OUT ITERATE_t &iAllocCount) const
 
virtual bool isValidCheck () const noexcept
 

Public Attributes

const PROCESSID_t m_Id
 My id. More...
 
cSharedMemorym_pMem
 The shared memory we all use. Created by master. More...
 
cThreadLockMutex m_Mutex
 Wait on this to signal read. More...
 

Static Public Attributes

static const GChar_t *const k_pszMutexName = _GT(GRAY_NAMES "SharedMutex")
 Signal that there is data to be read. (by someone) More...
 
- Static Public Attributes inherited from Gray::cSingletonRegister
static cThreadLockFast sm_LockSingle
 common lock for all cSingleton. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Gray::cSingleton< cSharedContext >
static cSharedContext *__stdcall get_Single ()
 
static TYPE2 *__stdcall get_SingleT ()
 
static cSharedContext &__stdcall I ()
 
- Static Public Member Functions inherited from Gray::cSingletonStatic< TYPE >
static bool isSingleCreated () noexcept
 
static TYPEget_SingleU () noexcept
 
static TYPEget_Single ()
 
template<class TYPE2 >
static TYPE2 *__stdcall get_SingleCast ()
 
static TYPEI () noexcept
 
- Static Public Member Functions inherited from Gray::cSingletonRegister
static void __stdcall ReleaseModule (HMODULE hMod)
 
- Protected Member Functions inherited from Gray::cSingleton< cSharedContext >
 cSingleton (cSharedContext *pObject, const TYPEINFO_t &rAddrCode=typeid(cSharedContext)) noexcept
 
virtual ~cSingleton ()
 
- Protected Member Functions inherited from Gray::cSingletonStatic< TYPE >
 cSingletonStatic (TYPE *pObject) noexcept
 
virtual ~cSingletonStatic () noexcept
 
- Protected Member Functions inherited from Gray::cSingletonRegister
 cSingletonRegister (const TYPEINFO_t &rAddrCode) noexcept
 
virtual ~cSingletonRegister ()
 
void RegisterSingleton ()
 
- Protected Member Functions inherited from Gray::cHeapObject
const void * get_HeapPtr () const noexcept override
 Get the top level (outermost, freeable) class pointer. I can delete get_HeapPtr(). More...
 
- Protected Attributes inherited from Gray::cSingletonRegister
HMODULE m_hModuleLoaded
 What modules loaded this ? So singletons can be destroyed if DLL/SO unloads. More...
 
- Static Protected Attributes inherited from Gray::cSingletonStatic< TYPE >
static TYPEsm_pThe = nullptr
 pointer to the one and only object of this TYPE. ASSUME automatically init to = nullptr. More...
 

Detailed Description

Singleton handle to Mutex for locking reader or writer.

Constructor & Destructor Documentation

◆ cSharedContext()

GrayLib::cSharedContext::cSharedContext ( )

◆ ~cSharedContext()

GrayLib::cSharedContext::~cSharedContext ( )
virtual

Member Function Documentation

◆ isLockedByMe()

bool GrayLib::cSharedContext::isLockedByMe ( ) const
inlinenoexcept

is write locked by me!?

Member Data Documentation

◆ k_pszMutexName

const GChar_t *const GrayLib::cSharedContext::k_pszMutexName = _GT(GRAY_NAMES "SharedMutex")
static

Signal that there is data to be read. (by someone)

◆ m_Id

const PROCESSID_t GrayLib::cSharedContext::m_Id

My id.

◆ m_Mutex

cThreadLockMutex GrayLib::cSharedContext::m_Mutex

Wait on this to signal read.

◆ m_pMem

cSharedMemory* GrayLib::cSharedContext::m_pMem

The shared memory we all use. Created by master.


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