- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Types | Public Member Functions

# QSharedMemory Class Reference

Search for all occurrences

## Detailed Description

Definition at line 57 of file qsharedmemory.h.

`#include <qsharedmemory.h>`

Inheritance diagram for QSharedMemory:
[legend]

List of all members.

## Public Types
enum | AccessMode { ReadOnly, ReadWrite }
enum | SharedMemoryError { NoError, PermissionDenied, InvalidSize, KeyError, AlreadyExists, NotFound, LockError, OutOfResources, UnknownError }
## Public Member Functions
| QSharedMemory (QObject *parent=0)
| QSharedMemory (const QString &key, QObject *parent=0)
| ~QSharedMemory ()
void | setKey (const QString &key)
QString | key () const
bool | create (int size, AccessMode mode=ReadWrite)
int | size () const
bool | attach (AccessMode mode=ReadWrite)
bool | isAttached () const
bool | detach ()
void * | data ()
const void * | constData () const
const void * | data () const
bool | lock ()
bool | unlock ()
SharedMemoryError | error () const
QString | errorString () const

## Member Enumeration Documentation

enum AccessMode

Search for all occurrences

Enumerator:

  ReadOnly | Search for all occurrences
  ReadWrite | Search for all occurrences

Definition at line 63 of file qsharedmemory.h.

        {
            ReadOnly,
            ReadWrite
        };

enum SharedMemoryError

Search for all occurrences

Enumerator:

  NoError | Search for all occurrences
  PermissionDenied | Search for all occurrences
  InvalidSize | Search for all occurrences
  KeyError | Search for all occurrences
  AlreadyExists | Search for all occurrences
  NotFound | Search for all occurrences
  LockError | Search for all occurrences
  OutOfResources | Search for all occurrences
  UnknownError | Search for all occurrences

Definition at line 69 of file qsharedmemory.h.

        {
            NoError,
            PermissionDenied,
            InvalidSize,
            KeyError,
            AlreadyExists,
            NotFound,
            LockError,
            OutOfResources,
            UnknownError
        };

## Constructor & Destructor Documentation

QSharedMemory | ( | QObject * | parent = `0` | ) |

QSharedMemory | ( | const QString & | key,
|  | QObject * | parent = `0`
| ) |  |

~QSharedMemory | ( |  | ) |

## Member Function Documentation

void setKey | ( | const QString & | key | ) |

Search for all occurrences

QString key | ( |  | ) | const

Search for all occurrences

bool create | ( | int | size,
|  | AccessMode | mode = `ReadWrite`
| ) |  |

Search for all occurrences

int size | ( |  | ) | const

Search for all occurrences

bool attach | ( | AccessMode | mode = `ReadWrite` | ) |

Search for all occurrences

bool isAttached | ( |  | ) | const

Search for all occurrences

bool detach | ( |  | ) |

Search for all occurrences

void* data | ( |  | ) |

Search for all occurrences

const void* constData | ( |  | ) | const

Search for all occurrences

const void* data | ( |  | ) | const

Search for all occurrences

bool lock | ( |  | ) |

Search for all occurrences

bool unlock | ( |  | ) |

Search for all occurrences

SharedMemoryError error | ( |  | ) | const

Search for all occurrences

QString errorString | ( |  | ) | const

Search for all occurrences

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

- QtCore/qsharedmemory.h

QSharedMemory QSharedMemory QSharedMemory QSharedMemory QSharedMemory QSharedMemory QSharedMemory QSharedMemory QSharedMemory QSharedMemory
QSharedMemory QSharedMemory QSharedMemory QSharedMemory QSharedMemory QSharedMemory QSharedMemory QSharedMemory QSharedMemory QSharedMemory