#include <tsharedmemory.h>
The TSharedMemory class provides access to a shared memory segment.
◆ TSharedMemory()
TSharedMemory::TSharedMemory |
( |
const QString & |
name | ) |
|
Constructs a shared memory object with the given name.
◆ ~TSharedMemory()
TSharedMemory::~TSharedMemory |
( |
| ) |
|
◆ attach()
bool TSharedMemory::attach |
( |
| ) |
|
Attach to the shared memory segment identified by the name that was passed to the constructor.
◆ create()
bool TSharedMemory::create |
( |
size_t |
size | ) |
|
Creates a shared memory segment of size bytes with the name passed to the constructor.
◆ data() [1/2]
void * TSharedMemory::data |
( |
| ) |
|
Returns a pointer to the contents of the shared memory segment, if one is attached.
◆ data() [2/2]
const void * TSharedMemory::data |
( |
| ) |
const |
◆ detach()
bool TSharedMemory::detach |
( |
| ) |
|
Detaches from the shared memory segment.
◆ lockForRead()
bool TSharedMemory::lockForRead |
( |
| ) |
|
Locks the shared memory segment for reading by this process.
◆ lockForWrite()
bool TSharedMemory::lockForWrite |
( |
| ) |
|
Locks the shared memory segment for writing by this process.
◆ name()
QString TSharedMemory::name |
( |
| ) |
const |
Returns the name to this shared memory.
◆ size()
size_t TSharedMemory::size |
( |
| ) |
const |
◆ unlink()
void TSharedMemory::unlink |
( |
| ) |
|
Attempts to unlink the shared memory with the name passed to the constructor.
◆ unlock()
bool TSharedMemory::unlock |
( |
| ) |
|
Releases the lock on the shared memory segment.
The documentation for this class was generated from the following files: