#include <ipcplus.h>
Inheritance diagram for IPC::Shm::
Public Methods | |
Shm (const unsigned int key, const size_t size) | |
Constructor. More... | |
virtual | ~Shm () |
Destructor. More... | |
virtual bool | destroy () |
Destroy the actual IPC shared memory segment. More... | |
Public Attributes | |
void * | pMem |
A pointer to the attached shared memory segment. | |
Protected Attributes | |
int | mid |
The Sys V IPC memory id. |
This class is intended to be a base class. See the test program for a sample derived class.
|
Constructor. The constructor simply creates the specified shared memory segment if it doesn't exist or attaches to the existing segment if it does. The pMem member will be NULL if the constructor failed.
|
|
Destructor. The destructor will only detach the shared memory segment. Use destroy() to de-allocate the shared memory segment. |
|
Destroy the actual IPC shared memory segment.
|