xentara-plugin v1.2.1
The Xentara Plugin Framework
Loading...
Searching...
No Matches
xentara::memory::ReadSentinel< RawMemory > Class Referencefinal

A sentinel that protects read access to a raw memory. More...

#include <memory/ReadSentinel_RawMemory.hpp>

+ Inheritance diagram for xentara::memory::ReadSentinel< RawMemory >:

Public Member Functions

 ReadSentinel (const RawMemoryBlock &block)
 Constructor for a memory block.
 
 ReadSentinel (const RawMemoryHandle &handle)
 Constructor for a handle.
 
internal auto end () -> void
 Ends reading prematurely.
 
auto placement () const noexcept -> const void *
 Gets the placement of the containing data.
 

Detailed Description

A sentinel that protects read access to a raw memory.

Note
Objects of this class can be moved, but not copied.

Constructor & Destructor Documentation

◆ ReadSentinel() [1/2]

xentara::memory::ReadSentinel< RawMemory >::ReadSentinel ( const RawMemoryBlock block)

Constructor for a memory block.

Parameters
blockThe memory block you wish to read from

◆ ReadSentinel() [2/2]

xentara::memory::ReadSentinel< RawMemory >::ReadSentinel ( const RawMemoryHandle handle)

Constructor for a handle.

Parameters
handleThe handle you wish to read from

Member Function Documentation

◆ end()

internal auto xentara::memory::ReadSentinel< RawMemory >::end ( ) -> void

Ends reading prematurely.

Warning
Do not access the data after you have called end()!

◆ placement()

auto xentara::memory::ReadSentinel< RawMemory >::placement ( ) const -> const void *
noexcept

Gets the placement of the containing data.

Returns