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

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

#include <memory/ReadSentinel_BitField.hpp>

+ Inheritance diagram for xentara::memory::ReadSentinel< BitField< Type > >:

Public Types

using BitField = memory::BitField< Type >
 The bit field type describing the structure.
 
using BaseType = typename BitField::BaseType
 The unsigned integer type that holds the bits.
 

Public Member Functions

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

Detailed Description

template<utils::tools::UnsignedIntegral Type>
class xentara::memory::ReadSentinel< BitField< Type > >

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

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

Member Typedef Documentation

◆ BaseType

template<utils::tools::UnsignedIntegral Type>
using xentara::memory::ReadSentinel< BitField< Type > >::BaseType = typename BitField::BaseType

The unsigned integer type that holds the bits.

◆ BitField

template<utils::tools::UnsignedIntegral Type>
using xentara::memory::ReadSentinel< BitField< Type > >::BitField = memory::BitField<Type>

The bit field type describing the structure.

Constructor & Destructor Documentation

◆ ReadSentinel()

template<utils::tools::UnsignedIntegral Type>
xentara::memory::ReadSentinel< BitField< Type > >::ReadSentinel ( const BitFieldHandle< Type > &  handle)

Constructor for a handle.

Parameters
handleThe handle you wish to read from

Member Function Documentation

◆ end()

template<utils::tools::UnsignedIntegral Type>
auto xentara::memory::ReadSentinel< BitField< Type > >::end ( ) -> void

Ends reading prematurely.

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

◆ get()

template<utils::tools::UnsignedIntegral Type>
internal auto xentara::memory::ReadSentinel< BitField< Type > >::get ( ) const -> Type
noexcept

Gets the bits.

Returns
The bits

◆ operator*()

template<utils::tools::UnsignedIntegral Type>
auto xentara::memory::ReadSentinel< BitField< Type > >::operator* ( ) const -> Type
noexcept

Gets the bits.

Returns
The bits