A class that wraps XSI (System V) shared memory. More...
#include <xsi_shared_memory.hpp>
Public Member Functions | |
| xsi_shared_memory () | |
| Default constructor.  More... | |
| xsi_shared_memory (open_only_t, int shmid) | |
| Initializes *this with a shmid previously obtained (possibly from another process) This lower-level initializer allows shared memory mapping without having a key.  More... | |
| xsi_shared_memory (create_only_t, const xsi_key &key, std::size_t size, const permissions &perm=permissions()) | |
| Creates a new XSI shared memory from 'key', with size "size" and permissions "perm".  More... | |
| xsi_shared_memory (open_or_create_t, const xsi_key &key, std::size_t size, const permissions &perm=permissions()) | |
| Opens an existing shared memory with identifier 'key' or creates a new XSI shared memory from identifier 'key', with size "size" and permissions "perm".  More... | |
| xsi_shared_memory (open_only_t, const xsi_key &key) | |
| Tries to open a XSI shared memory with identifier 'key' If the shared memory does not previously exist, it throws an error.  More... | |
| xsi_shared_memory (BOOST_RV_REF(xsi_shared_memory) moved) | |
| Moves the ownership of "moved"'s shared memory object to *this.  More... | |
| xsi_shared_memory & | operator= (BOOST_RV_REF(xsi_shared_memory) moved) | 
| Moves the ownership of "moved"'s shared memory to *this.  More... | |
| void | swap (xsi_shared_memory &other) | 
| Swaps two xsi_shared_memorys. Does not throw.  More... | |
| ~xsi_shared_memory () | |
| Destroys *this.  More... | |
| int | get_shmid () const | 
| Returns the shared memory ID that identifies the shared memory.  More... | |
| mapping_handle_t | get_mapping_handle () const | 
| Returns the mapping handle.  More... | |
Static Public Member Functions | |
| static bool | remove (int shmid) | 
| Erases the XSI shared memory object identified by shmid from the system.  More... | |
A class that wraps XSI (System V) shared memory.
Unlike shared_memory_object, xsi_shared_memory needs a valid xsi_key to identify a shared memory object.
Warning: XSI shared memory and interprocess portable shared memory (boost::interprocess::shared_memory_object) can't communicate between them.
      
  | 
  inline | 
Default constructor.
Represents an empty xsi_shared_memory.
      
  | 
  inline | 
Initializes *this with a shmid previously obtained (possibly from another process) This lower-level initializer allows shared memory mapping without having a key.
      
  | 
  inline | 
Creates a new XSI shared memory from 'key', with size "size" and permissions "perm".
If the shared memory previously exists, throws an error.
References boost::interprocess::ipcdetail::DoCreate.
      
  | 
  inline | 
Opens an existing shared memory with identifier 'key' or creates a new XSI shared memory from identifier 'key', with size "size" and permissions "perm".
References boost::interprocess::ipcdetail::DoOpenOrCreate.
      
  | 
  inline | 
Tries to open a XSI shared memory with identifier 'key' If the shared memory does not previously exist, it throws an error.
References boost::interprocess::ipcdetail::DoOpen, and boost::filesystem::detail::permissions().
      
  | 
  inline | 
Moves the ownership of "moved"'s shared memory object to *this.
After the call, "moved" does not represent any shared memory object. Does not throw
References swap().
      
  | 
  inline | 
Destroys *this.
The shared memory won't be destroyed, just this connection to it. Use remove() to destroy the shared memory.
      
  | 
  inline | 
Returns the mapping handle.
Never throws
      
  | 
  inline | 
Returns the shared memory ID that identifies the shared memory.
      
  | 
  inline | 
Moves the ownership of "moved"'s shared memory to *this.
After the call, "moved" does not represent any shared memory. Does not throw
References boost::move(), and swap().
      
  | 
  inlinestatic | 
Erases the XSI shared memory object identified by shmid from the system.
Returns false on error. Never throws
      
  | 
  inline | 
Swaps two xsi_shared_memorys. Does not throw.
References boost::swap.
Referenced by operator=(), and xsi_shared_memory().