CppCommon
1.0.4.1
C++ Common Library
|
Shared memory type. More...
#include <shared_type.h>
Public Member Functions | |
SharedType (const std::string &name) | |
Create a new or open existing shared memory type with a given name. More... | |
SharedType (const SharedType< T > &)=delete | |
SharedType (SharedType< T > &&)=delete | |
~SharedType ()=default | |
SharedType< T > & | operator= (const SharedType< T > &)=delete |
SharedType< T > & | operator= (SharedType< T > &&)=delete |
operator bool () const | |
Check if the shared memory type is valid. More... | |
T & | operator* () |
Dereference shared memory type. More... | |
const T & | operator* () const |
Dereference constant shared memory type. More... | |
T * | operator-> () |
Dereference shared memory type member. More... | |
const T * | operator-> () const |
Dereference constant shared memory type member. More... | |
const std::string & | name () const noexcept |
Get the shared memory type name. More... | |
size_t | size () const noexcept |
Get the shared memory type size. More... | |
T * | ptr () |
Get the shared memory type pointer. More... | |
const T * | ptr () const |
Get the constant shared memory type pointer. More... | |
T & | ref () |
Get the shared memory type reference. More... | |
const T & | ref () const |
Get the constant shared memory type reference. More... | |
bool | owner () const |
Get the shared memory type owner flag (true if the new one was created, false if the existing one was opened) More... | |
Shared memory type.
Shared memory type allows to create an instance of the given type in a shared memory and access to the instance from multiple processes using the given name.
Not thread-safe.
Definition at line 27 of file shared_type.h.
|
inlineexplicit |
Create a new or open existing shared memory type with a given name.
name | - Shared memory type name |
Definition at line 12 of file shared_type.inl.
|
delete |
|
delete |
|
default |
|
inlinenoexcept |
Get the shared memory type name.
Definition at line 56 of file shared_type.h.
|
inlineexplicit |
Check if the shared memory type is valid.
Definition at line 43 of file shared_type.h.
|
inline |
Dereference shared memory type.
Definition at line 46 of file shared_type.h.
|
inline |
Dereference constant shared memory type.
Definition at line 48 of file shared_type.h.
|
inline |
Dereference shared memory type member.
Definition at line 51 of file shared_type.h.
|
inline |
Dereference constant shared memory type member.
Definition at line 53 of file shared_type.h.
|
delete |
|
delete |
|
inline |
Get the shared memory type owner flag (true if the new one was created, false if the existing one was opened)
Definition at line 71 of file shared_type.h.
|
inline |
Get the shared memory type pointer.
Definition at line 61 of file shared_type.h.
|
inline |
Get the constant shared memory type pointer.
Definition at line 63 of file shared_type.h.
|
inline |
Get the shared memory type reference.
Definition at line 66 of file shared_type.h.
|
inline |
Get the constant shared memory type reference.
Definition at line 68 of file shared_type.h.
|
inlinenoexcept |
Get the shared memory type size.
Definition at line 58 of file shared_type.h.