iffl  1.3.4
Implements Intrusive Flat Forward List container
Public Member Functions | Static Public Attributes | List of all members
iffl::range_with_alighment< ALIGNMENT_V > Class Template Reference

Vocabulary type that describes a sub-buffer in a larger buffer and portion of that sub-buffer actually used by the data. More...

#include <iffl_common.h>

Inheritance diagram for iffl::range_with_alighment< ALIGNMENT_V >:
iffl::range

Public Member Functions

constexpr size_t data_end_aligned () const noexcept
 
constexpr size_t buffer_end_aligned () const noexcept
 
constexpr size_t data_size_padded () const noexcept
 
constexpr size_t required_data_padding () const noexcept
 
constexpr size_t required_buffer_padding () const noexcept
 
constexpr size_t buffer_size_padded () const noexcept
 
- Public Member Functions inherited from iffl::range
constexpr size_t begin () const
 Offset of the element buffer begin in a larger buffer. More...
 
constexpr void verify () const noexcept
 Fail fast if range invariants are broken.
 
constexpr size_t data_size () const noexcept
 Data size. More...
 
constexpr size_t buffer_size () const noexcept
 Buffer size. More...
 
constexpr size_t unused_capacity () const noexcept
 Size of unused buffer. More...
 
void fill_unused_capacity_data_ptr (char *data_ptr, int fill_byte) const noexcept
 Fills unused part of buffer with fill_byte. More...
 
void zero_unused_capacity_data_ptr (char *data_ptr) const noexcept
 Zeros unused part of buffer. More...
 
void fill_unused_capacity_container_ptr (char *container_ptr, int fill_byte) const noexcept
 Fills unused part of buffer with fill_byte. More...
 
void zero_unused_capacity_container_ptr (char *container_ptr) const noexcept
 Zeros unused part of buffer. More...
 
constexpr bool buffer_contains (size_t position) const noexcept
 Tells if position falls into the buffer. More...
 
constexpr bool data_contains (size_t position) const noexcept
 Tells if position falls into the data buffer. More...
 

Static Public Attributes

static constexpr size_t const alignment { ALIGNMENT_V }
 

Additional Inherited Members

- Public Attributes inherited from iffl::range
size_t buffer_begin { 0 }
 Starting offset of element in a buffer Element always starts at the beginning of the buffer.
 
size_t data_end { 0 }
 Offset in the buffer where data end.
 
size_t buffer_end { 0 }
 Offset of the end of the buffer Next element of the flat list starts at this offset.
 

Detailed Description

template<size_t ALIGNMENT_V>
class iffl::range_with_alighment< ALIGNMENT_V >

Vocabulary type that describes a sub-buffer in a larger buffer and portion of that sub-buffer actually used by the data.

This type extends range with template parameter that specifies element's type alignment requirements

Template Parameters
ALIGNMENT_V- alignment requirements of the element's type

Member Function Documentation

◆ buffer_end_aligned()

template<size_t ALIGNMENT_V>
constexpr size_t iffl::range_with_alighment< ALIGNMENT_V >::buffer_end_aligned ( ) const
inlinenoexcept
Returns
Offset of the end of the buffer padded to element type alignment

◆ buffer_size_padded()

template<size_t ALIGNMENT_V>
constexpr size_t iffl::range_with_alighment< ALIGNMENT_V >::buffer_size_padded ( ) const
inlinenoexcept
Returns
Buffer size padded to element type alignment

◆ data_end_aligned()

template<size_t ALIGNMENT_V>
constexpr size_t iffl::range_with_alighment< ALIGNMENT_V >::data_end_aligned ( ) const
inlinenoexcept
Returns
Offset of the end of the data padded to element type alignment

◆ data_size_padded()

template<size_t ALIGNMENT_V>
constexpr size_t iffl::range_with_alighment< ALIGNMENT_V >::data_size_padded ( ) const
inlinenoexcept
Returns
Data size padded to element type alignment

◆ required_buffer_padding()

template<size_t ALIGNMENT_V>
constexpr size_t iffl::range_with_alighment< ALIGNMENT_V >::required_buffer_padding ( ) const
inlinenoexcept
Returns
Buffer padding size

◆ required_data_padding()

template<size_t ALIGNMENT_V>
constexpr size_t iffl::range_with_alighment< ALIGNMENT_V >::required_data_padding ( ) const
inlinenoexcept
Returns
Data padding size

Member Data Documentation

◆ alignment

template<size_t ALIGNMENT_V>
constexpr size_t const iffl::range_with_alighment< ALIGNMENT_V >::alignment { ALIGNMENT_V }
static

Element's type alignment requirements


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