EpcTools
An event based multi-threaded C++ development framework.
Classes | Public Member Functions | List of all members
ESharedMemory Class Reference

The shared memory access class. More...

#include <eshmem.h>

Public Member Functions

 ESharedMemory ()
 Default constructor. More...
 
 ESharedMemory (cpStr file, Int id, Int size)
 Class constructor. More...
 
 ~ESharedMemory ()
 Class destructor. More...
 
Void init (cpStr file, Int id, Int size)
 Initializes this shared memory object. This method is called by the parameterized constructor. More...
 
pVoid getDataPtr ()
 Retrieves a pointer to the first location of the shated memory. More...
 
virtual Void onDestroy ()
 Called when teh shared memory is destroyed. More...
 
Int getUsageCount ()
 Retrieves the number of clients accessing the shared memory. More...
 

Detailed Description

The shared memory access class.

Constructor & Destructor Documentation

◆ ESharedMemory() [1/2]

ESharedMemory::ESharedMemory ( )

Default constructor.

◆ ESharedMemory() [2/2]

ESharedMemory::ESharedMemory ( cpStr  file,
Int  id,
Int  size 
)

Class constructor.

Parameters
filethe file name associated with the shared memory.
idthe identifier for the shared memory.
sizethe amount of memory to allocate for this shared memory object.

◆ ~ESharedMemory()

ESharedMemory::~ESharedMemory ( )

Class destructor.

Member Function Documentation

◆ getDataPtr()

pVoid ESharedMemory::getDataPtr ( )
inline

Retrieves a pointer to the first location of the shated memory.

Returns
a pointer to the first location of the shated memory.

◆ getUsageCount()

Int ESharedMemory::getUsageCount ( )

Retrieves the number of clients accessing the shared memory.

◆ init()

Void ESharedMemory::init ( cpStr  file,
Int  id,
Int  size 
)

Initializes this shared memory object. This method is called by the parameterized constructor.

Parameters
filethe file name associated with the shared memory.
idthe identifier for the shared memory.
sizethe amount of memory to allocate for this shared memory object.

◆ onDestroy()

virtual Void ESharedMemory::onDestroy ( )
inlinevirtual

Called when teh shared memory is destroyed.


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