From def5c50960eea4c112647f88361a3ae7155901a8 Mon Sep 17 00:00:00 2001 From: egor-tensin Date: Tue, 4 Jul 2023 00:48:00 +0000 Subject: =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20egor-tensin/wina?= =?UTF-8?q?pi-common@0c196cbe8b4927c78c02b2c7312fc69a507db845=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- classwinapi_1_1SharedObject.html | 279 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 279 insertions(+) create mode 100644 classwinapi_1_1SharedObject.html (limited to 'classwinapi_1_1SharedObject.html') diff --git a/classwinapi_1_1SharedObject.html b/classwinapi_1_1SharedObject.html new file mode 100644 index 0000000..786f40d --- /dev/null +++ b/classwinapi_1_1SharedObject.html @@ -0,0 +1,279 @@ + + + + + + + +winapi_common: winapi::SharedObject< T > Class Template Reference + + + + + + + + + +
+
+ + + + + + +
+
winapi_common +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
winapi::SharedObject< T > Class Template Reference
+
+
+ +

Easy way to represent a C++ object as a shared memory region. + More...

+ + + + +

+Public Types

+typedef std::aligned_storage< sizeof(T), __alignof(T)>::type AlignedType
 
+ + + + + + + + + + + + + + + +

+Public Member Functions

SharedObject (SharedObject &&other) noexcept=default
 
+SharedObjectoperator= (const SharedObject &other) noexcept=default
 
SharedObject (const SharedObject &)=delete
 
T * ptr () const
 
T & get () const
 
+T * operator-> () const
 
+T & operator* () const
 
+ + + + + + +

+Static Public Member Functions

template<typename... Args>
static SharedObject create (const std::string &name, Args &&... args)
 
static SharedObject open (const std::string &name)
 
+

Detailed Description

+

template<typename T>
+class winapi::SharedObject< T >

+ +

Easy way to represent a C++ object as a shared memory region.

+ +

Definition at line 53 of file shmem.hpp.

+

Member Function Documentation

+ +

◆ create()

+ +
+
+
+template<typename T >
+
+template<typename... Args>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
static SharedObject winapi::SharedObject< T >::create (const std::string & name,
Args &&... args 
)
+
+inlinestatic
+
+

Create the object & construct a shared memory region to store it.

Parameters
+ + + +
nameUTF-8 string, name of the shared memory region.
argsArguments to construct the object.
+
+
+ +

Definition at line 63 of file shmem.hpp.

+ +
+
+ +

◆ open()

+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
static SharedObject winapi::SharedObject< T >::open (const std::string & name)
+
+inlinestatic
+
+

Open a shared memory region that stores the object.

Parameters
+ + +
nameUTF-8 string, name of the shared memory region.
+
+
+ +

Definition at line 74 of file shmem.hpp.

+ +
+
+ +

◆ ptr()

+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + +
T* winapi::SharedObject< T >::ptr () const
+
+inline
+
+

Get pointer to the object.

+ +

Definition at line 90 of file shmem.hpp.

+ +
+
+ +

◆ get()

+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + +
T& winapi::SharedObject< T >::get () const
+
+inline
+
+

Get reference to the object.

+ +

Definition at line 92 of file shmem.hpp.

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + -- cgit v1.2.3