container for handling byte arrays
#include <bytes.h>
|
|
constexpr | byte_array () |
| | Default Constructor.
|
| |
| constexpr | byte_array (void *arr, size_t n) |
| | Buffer Constructor.
|
| |
| constexpr | byte_array (const void *arr, size_t n) |
| | Const Buffer Constructor.
|
| |
| template<typename T , size_t n> |
| constexpr | byte_array (T(&arr)[n]) |
| | Buffer Constructor.
|
| |
| template<typename T , size_t n> |
| constexpr | byte_array (const T(&arr)[n]) |
| | Const Buffer Constructor.
|
| |
| constexpr size_t | size () const |
| |
| constexpr byte_t & | operator[] (int i) |
| | Array Access Operator.
|
| |
| constexpr byte_t | operator[] (int i) const |
| | Const Array Access Operator.
|
| |
| template<typename T > |
| constexpr T * | cast () |
| | Cast Function.
|
| |
| template<typename T > |
| constexpr const T * | cast () const |
| | Const Cast Function.
|
| |
◆ byte_array() [1/4]
| constexpr fennec::byte_array::byte_array |
( |
void * |
arr, |
|
|
size_t |
n |
|
) |
| |
|
inlineconstexpr |
- Parameters
-
| arr | the buffer to wrap |
| n | the size of the buffer in bytes |
◆ byte_array() [2/4]
| constexpr fennec::byte_array::byte_array |
( |
const void * |
arr, |
|
|
size_t |
n |
|
) |
| |
|
inlineconstexpr |
- Parameters
-
| arr | the buffer to wrap |
| n | the size of the buffer in bytes |
◆ byte_array() [3/4]
template<typename T ,
size_t n>
| constexpr fennec::byte_array::byte_array |
( |
T(&) |
arr[n] | ) |
|
|
inlineconstexpr |
- Parameters
-
- Template Parameters
-
| n | the size of the buffer in elements |
◆ byte_array() [4/4]
template<typename T ,
size_t n>
| constexpr fennec::byte_array::byte_array |
( |
const T(&) |
arr[n] | ) |
|
|
inlineconstexpr |
- Parameters
-
- Template Parameters
-
| n | the size of the buffer in elements |
◆ size()
| constexpr size_t fennec::byte_array::size |
( |
| ) |
const |
|
inlineconstexpr |
- Returns
- The size of the array in bytes
◆ operator[]() [1/2]
| constexpr byte_t & fennec::byte_array::operator[] |
( |
int |
i | ) |
|
|
inlineconstexpr |
- Parameters
-
- Returns
- a reference to the byte at
i
◆ operator[]() [2/2]
| constexpr byte_t fennec::byte_array::operator[] |
( |
int |
i | ) |
const |
|
inlineconstexpr |
- Parameters
-
- Returns
- a copy of the byte at
i
◆ cast() [1/2]
template<typename T >
| constexpr T * fennec::byte_array::cast |
( |
| ) |
|
|
inlineconstexpr |
- Template Parameters
-
- Returns
- a pointer to the underlying buffer interpreted as an array of
T
◆ cast() [2/2]
template<typename T >
| constexpr const T * fennec::byte_array::cast |
( |
| ) |
const |
|
inlineconstexpr |
- Template Parameters
-
- Returns
- a pointer to the underlying buffer interpreted as an array of
T
The documentation for this struct was generated from the following file: