xentara-plugin v2.0.4
The Xentara Plugin Framework
Loading...
Searching...
No Matches
xentara::memory::ReadSentinel< Bit > Class Referencefinal

A sentinel that protects read access to memory containing a bit field. More...

#include <xentara/memory/ReadSentinel_Bit.hpp>

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

Public Member Functions

 ReadSentinel (const BitHandle &handle)
 Constructor for a handle.
 
internal auto get () const noexcept -> bool
 Gets the bits.
 
auto operator* () const noexcept -> bool
 Gets the bits.
 
auto end () -> void
 Ends reading prematurely.
 

Detailed Description

A sentinel that protects read access to memory containing a bit field.

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

Constructor & Destructor Documentation

◆ ReadSentinel()

xentara::memory::ReadSentinel< Bit >::ReadSentinel ( const BitHandle handle)

Constructor for a handle.

Parameters
handleThe handle you wish to read from

Member Function Documentation

◆ end()

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

Ends reading prematurely.

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

◆ get()

internal auto xentara::memory::ReadSentinel< Bit >::get ( ) const -> bool
noexcept

Gets the bits.

Returns
The bits

◆ operator*()

auto xentara::memory::ReadSentinel< Bit >::operator* ( ) const -> bool
noexcept

Gets the bits.

Returns
The bits