![]() |
MDSTk Libraries
1.1.0
Medical Data Segmentation Toolkit
|
Class encapsulating access to the shared memory. More...
#include <mdsSharedMem.h>

Public Types | |
| enum | { CLASS_OBJECT } |
| Templates that require members of the CObject class can use this enum to check the existence. More... | |
| enum | { HEAP_OBJECT = 0x70616568 } |
| Signature used to recognize objects on the heap. More... | |
Public Member Functions | |
| CSharedMem (const std::string &sName, int iSize, bool bWriteAccess=true, bool *pbAlreadyExists=NULL) | |
| Constructor. | |
| void * | getData () |
| Returns pointer to the shared memory area. | |
| std::string & | getName () |
| Returns name of the shared memory. | |
| int | getReferencesCount () const |
| Returns the number of references. | |
| int | getSize () |
| Returns size of the shared memory area. | |
| bool | isOnHeap () const |
| Returns true if the object is allocated on the heap. | |
| MDS_SHAREDPTR (CSharedMem) | |
| Smart pointer type. | |
| virtual | ~CSharedMem () |
| Destructor. | |
Static Public Member Functions | |
| static void * | operator new (std::size_t Size) |
| Allocates a new object on the heap. | |
Protected Member Functions | |
| void | addReference () const |
| Increase the reference counter. | |
| bool | delReference () const |
| Decrease the reference counter. | |
Protected Attributes | |
| int | m_iHeapObject |
| Flag initialized if the object is on the heap. | |
| int | m_iReferences |
| The number of references to the object. | |
| int | m_iSize |
| Size of the shared area. | |
| void * | m_pData |
| Pointer to the shared area. | |
| std::string | m_sName |
| Name of the shared area. | |
Class encapsulating access to the shared memory.
anonymous enum [inherited] |
Templates that require members of the CObject class can use this enum to check the existence.
| mds::sys::CSharedMem::CSharedMem | ( | const std::string & | sName, |
| int | iSize, | ||
| bool | bWriteAccess = true, |
||
| bool * | pbAlreadyExists = NULL |
||
| ) |
Constructor.
| virtual mds::sys::CSharedMem::~CSharedMem | ( | ) | [virtual] |
Destructor.
| void mds::base::CObject::addReference | ( | ) | const [protected, inherited] |
Increase the reference counter.
| bool mds::base::CObject::delReference | ( | ) | const [protected, inherited] |
Decrease the reference counter.
| void* mds::sys::CSharedMem::getData | ( | ) |
Returns pointer to the shared memory area.
| std::string& mds::sys::CSharedMem::getName | ( | ) |
Returns name of the shared memory.
| int mds::base::CObject::getReferencesCount | ( | ) | const [inherited] |
Returns the number of references.
Returns size of the shared memory area.
| bool mds::base::CObject::isOnHeap | ( | ) | const [inherited] |
Returns true if the object is allocated on the heap.
Smart pointer type.
| static void* mds::base::CObject::operator new | ( | std::size_t | Size | ) | [static, inherited] |
Allocates a new object on the heap.
int mds::base::CObject::m_iHeapObject [mutable, protected, inherited] |
Flag initialized if the object is on the heap.
int mds::base::CObject::m_iReferences [mutable, protected, inherited] |
The number of references to the object.
int mds::sys::CSharedMem::m_iSize [protected] |
Size of the shared area.
void* mds::sys::CSharedMem::m_pData [protected] |
Pointer to the shared area.
std::string mds::sys::CSharedMem::m_sName [protected] |
Name of the shared area.
1.7.6.1