libjmmcg  build_2783
A C++ library containing an eclectic mix of useful, advanced components.
jmmcg::NTUtils::ManagedSharedMemory< contents > Class Template Referenceabstract

#include <SharedMemory.hpp>

Inheritance diagram for jmmcg::NTUtils::ManagedSharedMemory< contents >:
[legend]
Collaboration diagram for jmmcg::NTUtils::ManagedSharedMemory< contents >:
[legend]

Classes

struct  allocated_data_block_info
 
struct  private_data_block_type
 

Public Member Functions

 ManagedSharedMemory (const std::string &mgr_name, const HeapID &details, const DWORD protection=PAGE_READWRITE, HANDLE file=INVALID_HANDLE_VALUE)
 
virtual ~ManagedSharedMemory ()
 
contents * Allocate (const unsigned long n, const void *const hint)
 
void Construct (contents *const ptr, const contents &val)
 
void Deallocate (const contents *const p, const unsigned long n)
 
- Public Member Functions inherited from jmmcg::NTUtils::RawSharedMemory< contents >
 RawSharedMemory (const HeapID &details, const DWORD protection=PAGE_READWRITE, HANDLE file=INVALID_HANDLE_VALUE)
 
virtual ~RawSharedMemory (void)
 
const std::string & Name (void) const noexcept(true)
 
virtual unsigned long Capacity (void) const noexcept(true)
 
virtual bool Capacity (const unsigned long sz, const DWORD protection=PAGE_READWRITE, HANDLE file=INVALID_HANDLE_VALUE)
 
bool IsCreator (void) const noexcept(true)
 
 operator const contents * () const
 
 operator contents * ()
 
jmmcg::NTUtils::Mutex & Lock (void) noexcept(true)
 
virtual std::ostream & operator<< (std::ostream &strm) const
 
virtual std::istream & operator>> (std::istream &strm)
 
unsigned long UsageCount (void) const noexcept(true)
 

Protected Member Functions

 ManagedSharedMemory (const unsigned long p, const std::string &mgr_name, const HeapID &details, const DWORD protection=PAGE_READWRITE, HANDLE file=INVALID_HANDLE_VALUE)
 
virtual contents * BaseAllocate (const unsigned long n, const void *const hint)=0
 
virtual unsigned long BaseDeallocate (const contents *const p, const unsigned long n)=0
 
- Protected Member Functions inherited from jmmcg::NTUtils::RawSharedMemory< contents >
 RawSharedMemory (const unsigned long p, const HeapID &details, const DWORD protection=PAGE_READWRITE, HANDLE file=INVALID_HANDLE_VALUE)
 
contents * MapDataPtr (HANDLE file, const DWORD access, const DWORD hi_offset, const DWORD low_offset, const unsigned long size)
 
void UnmapDataPtr (const contents *)
 

Static Protected Member Functions

static unsigned long GetEndPrivateDataBlock (void) noexcept(true)
 
- Static Protected Member Functions inherited from jmmcg::NTUtils::RawSharedMemory< contents >
static unsigned long GetEndPrivateDataBlock (void) noexcept(true)
 

Additional Inherited Members

- Public Types inherited from jmmcg::NTUtils::RawSharedMemory< contents >
typedef contents contents_type
 
- Protected Attributes inherited from jmmcg::NTUtils::RawSharedMemory< contents >
const jmmcg::NTUtils::SecuritySettings *const ss
 
jmmcg::NTUtils::Mutex mutex
 
HANDLE rw_pub_mapping
 
HANDLE ro_pub_mapping
 
contents * rw_raw_data
 
contents * rw_pub_data
 
const contents * ro_pub_data
 

Detailed Description

template<class contents>
class jmmcg::NTUtils::ManagedSharedMemory< contents >

Definition at line 163 of file SharedMemory.hpp.

Constructor & Destructor Documentation

◆ ManagedSharedMemory() [1/2]

template<class contents >
jmmcg::NTUtils::ManagedSharedMemory< contents >::ManagedSharedMemory ( const std::string &  mgr_name,
const HeapID details,
const DWORD  protection = PAGE_READWRITE,
HANDLE  file = INVALID_HANDLE_VALUE 
)
inline

Definition at line 502 of file SharedMemory.hpp.

◆ ~ManagedSharedMemory()

template<class contents >
jmmcg::NTUtils::ManagedSharedMemory< contents >::~ManagedSharedMemory ( void  )
inlinevirtual

Definition at line 513 of file SharedMemory.hpp.

◆ ManagedSharedMemory() [2/2]

template<class contents >
jmmcg::NTUtils::ManagedSharedMemory< contents >::ManagedSharedMemory ( const unsigned long  p,
const std::string &  mgr_name,
const HeapID details,
const DWORD  protection = PAGE_READWRITE,
HANDLE  file = INVALID_HANDLE_VALUE 
)
inlineprotected

Definition at line 557 of file SharedMemory.hpp.

Member Function Documentation

◆ Allocate()

template<class contents >
contents * jmmcg::NTUtils::ManagedSharedMemory< contents >::Allocate ( const unsigned long  n,
const void *const  hint 
)
inline

Definition at line 516 of file SharedMemory.hpp.

◆ BaseAllocate()

template<class contents>
virtual contents* jmmcg::NTUtils::ManagedSharedMemory< contents >::BaseAllocate ( const unsigned long  n,
const void *const  hint 
)
inlineprotectedpure virtual

◆ BaseDeallocate()

template<class contents>
virtual unsigned long jmmcg::NTUtils::ManagedSharedMemory< contents >::BaseDeallocate ( const contents *const  p,
const unsigned long  n 
)
inlineprotectedpure virtual

◆ Construct()

template<class contents>
void jmmcg::NTUtils::ManagedSharedMemory< contents >::Construct ( contents *const  ptr,
const contents &  val 
)
inline

Definition at line 531 of file SharedMemory.hpp.

◆ Deallocate()

template<class contents>
void jmmcg::NTUtils::ManagedSharedMemory< contents >::Deallocate ( const contents *const  p,
const unsigned long  n 
)
inline

Definition at line 524 of file SharedMemory.hpp.

◆ GetEndPrivateDataBlock()

template<class contents >
unsigned long jmmcg::NTUtils::ManagedSharedMemory< contents >::GetEndPrivateDataBlock ( void  )
inlinestaticprotectednoexcept

Definition at line 568 of file SharedMemory.hpp.


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