winapi_common
Classes | Public Member Functions | Static Public Member Functions | List of all members
winapi::SharedMemory Class Reference

Named shared memory region. More...

Public Member Functions

void * get () const
 
void * ptr () const
 

Static Public Member Functions

static SharedMemory create (const std::string &name, std::size_t nb)
 
static SharedMemory open (const std::string &name)
 

Detailed Description

Named shared memory region.

Definition at line 19 of file shmem.hpp.

Member Function Documentation

◆ create()

SharedMemory winapi::SharedMemory::create ( const std::string &  name,
std::size_t  nb 
)
static

Creates a shared memory region.

Parameters
nameUTF-8 string.
nbNumber of bytes.

Definition at line 40 of file shmem.cpp.

◆ open()

SharedMemory winapi::SharedMemory::open ( const std::string &  name)
static

Opens a shared memory region.

Parameters
nameUTF-8 string.

Definition at line 59 of file shmem.cpp.

◆ get()

void* winapi::SharedMemory::get ( ) const
inline

Get pointer to the data.

Definition at line 34 of file shmem.hpp.

◆ ptr()

void* winapi::SharedMemory::ptr ( ) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 36 of file shmem.hpp.


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