MXL : Media eXchange Layer
MXL
Loading...
Searching...
No Matches
mxl::lib::SharedMemorySegment Struct Reference

#include <SharedMemory.hpp>

Inheritance diagram for mxl::lib::SharedMemorySegment:
Collaboration diagram for mxl::lib::SharedMemorySegment:

Public Member Functions

constexpr void const * cdata () const noexcept
constexpr void const * data () const noexcept
constexpr void * data () noexcept
SharedMemorySegment & operator= (SharedMemorySegment other) noexcept
constexpr SharedMemorySegment () noexcept
 SharedMemorySegment (char const *path, AccessMode mode, std::size_t payloadSize, LockMode lockMode)
constexpr SharedMemorySegment (SharedMemorySegment &&other) noexcept
constexpr void swap (SharedMemorySegment &other) noexcept
Public Member Functions inherited from mxl::lib::SharedMemoryBase
constexpr AccessMode accessMode () const noexcept
constexpr bool created () const noexcept
constexpr bool isValid () const noexcept
constexpr std::size_t mappedSize () const noexcept
constexpr operator bool () const noexcept
constexpr void swap (SharedMemoryBase &other) noexcept
void touch ()

Additional Inherited Members

Protected Member Functions inherited from mxl::lib::SharedMemoryBase
constexpr void const * cdata () const noexcept
constexpr void const * data () const noexcept
constexpr void * data () noexcept
constexpr bool isExclusive () const
bool makeExclusive ()
constexpr SharedMemoryBase () noexcept
 SharedMemoryBase (char const *path, AccessMode mode, std::size_t payloadSize, LockMode lockMode)
constexpr SharedMemoryBase (SharedMemoryBase &&other) noexcept
 SharedMemoryBase (SharedMemoryBase const &other)=delete
 ~SharedMemoryBase ()

Detailed Description

Definition at line 149 of file SharedMemory.hpp.

Constructor & Destructor Documentation

◆ SharedMemorySegment() [1/3]

mxl::lib::SharedMemorySegment::SharedMemorySegment ( )
constexprnoexcept

Definition at line 293 of file SharedMemory.hpp.

295 {}
constexpr SharedMemoryBase() noexcept

◆ SharedMemorySegment() [2/3]

mxl::lib::SharedMemorySegment::SharedMemorySegment ( SharedMemorySegment && other)
constexprnoexcept

Definition at line 297 of file SharedMemory.hpp.

298 : SharedMemoryBase{std::move(other)}
299 {}

◆ SharedMemorySegment() [3/3]

mxl::lib::SharedMemorySegment::SharedMemorySegment ( char const * path,
AccessMode mode,
std::size_t payloadSize,
LockMode lockMode )
inline

Definition at line 301 of file SharedMemory.hpp.

302 : SharedMemoryBase{path, mode, payloadSize, lockMode}
303 {}

Member Function Documentation

◆ cdata()

void const * mxl::lib::SharedMemoryBase::cdata ( ) const
constexprnoexcept

Accessor for the mapped data

Returns
the mapped data, or the null pointer if this instance does not currently represent a mapped segment.

Definition at line 106 of file SharedMemory.hpp.

284 {
285 return _data;
286 }

◆ data() [1/2]

void const * mxl::lib::SharedMemoryBase::data ( ) const
constexprnoexcept

Accessor for the mapped data

Returns
the mapped data, or the null pointer if this instance does not currently represent a mapped segment.

Definition at line 99 of file SharedMemory.hpp.

279 {
280 return _data;
281 }

◆ data() [2/2]

void * mxl::lib::SharedMemoryBase::data ( )
constexprnoexcept

Accessor for the mapped data

Returns
the mapped data, or the null pointer if this instance does not currently represent a mapped segment.

Definition at line 92 of file SharedMemory.hpp.

274 {
275 return _data;
276 }

◆ operator=()

SharedMemorySegment & mxl::lib::SharedMemorySegment::operator= ( SharedMemorySegment other)
inlinenoexcept

Definition at line 305 of file SharedMemory.hpp.

306 {
307 swap(other);
308 return *this;
309 }
constexpr void swap(SharedMemorySegment &other) noexcept

◆ swap()

void mxl::lib::SharedMemorySegment::swap ( SharedMemorySegment & other)
constexprnoexcept

Definition at line 311 of file SharedMemory.hpp.

312 {
313 static_cast<SharedMemoryBase*>(this)->swap(other);
314 }

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