
Public Member Functions | |
| QSharedMemory () | |
| ctor | |
| virtual | ~QSharedMemory () |
| dtor | |
| const QError & | GetError () const |
| get QError generated in the last operation | |
Protected Member Functions | |
| virtual bool | Init (bool owner, int shmId)=0 |
| bool | IsOwner () const |
| void *const | GetShmPointer () |
| get pointer to shared memory segment | |
| bool | InitInternal (bool owner, int shmId, int shmSize) |
| perform shared memory intialization | |
Protected Attributes | |
| QError | fError |
Private Attributes | |
| int | fHandle |
| bool | fOwner |
| void * | fPointer |
| QSharedMemory::~QSharedMemory | ( | ) | [virtual] |
| virtual bool QSharedMemory::Init | ( | bool | owner, | |
| int | shmId | |||
| ) | [protected, pure virtual] |
In this method the child classes should perform a cast from void* to the true type of the object that will be stored in the shared memory
Implemented in QGuiSharedMemory.
| void* const QSharedMemory::GetShmPointer | ( | ) | [inline, protected] |
get pointer to shared memory segment
Used to perform proper casting in the child classes
References fPointer.
Referenced by QGuiSharedMemory::Init().
| bool QSharedMemory::InitInternal | ( | bool | owner, | |
| int | shmId, | |||
| int | shmSize | |||
| ) | [protected] |
perform shared memory intialization
| owner | whether this object is the owner of the shared memory | |
| shmId | the id of the target shared memory | |
| shmSize | size of the shared memory segment in bytes |
References fHandle, fOwner, fPointer, and QError::Set().
Referenced by QGuiSharedMemory::Init().
int QSharedMemory::fHandle [private] |
shared memory handler
Referenced by InitInternal(), and ~QSharedMemory().
bool QSharedMemory::fOwner [private] |
whether this object is the owner of the shared memory
Referenced by InitInternal(), and ~QSharedMemory().
void* QSharedMemory::fPointer [private] |
pointer to shared memory segment
Referenced by GetShmPointer(), InitInternal(), and ~QSharedMemory().
1.5.6