CppSerdes  1.0
A serialization/deserialization library designed with embedded systems in mind
serdes::sized_pointer< T_array > Struct Template Reference

Holds a pointer to an array (with its type information) with a constant size. More...

#include <bitcpy_sized_pointer.h>

Public Member Functions

 sized_pointer (T_array *const v, const size_t N) noexcept
 Construct a new sized pointer object from a raw pointer and a passed size. More...
 
template<size_t N>
 sized_pointer (T_array(&v)[N]) noexcept
 Construct a new sized pointer object from the array itself. More...
 
size_t bit_capacity () const noexcept
 returns the number of bits in the array
 

Public Attributes

T_array *const value
 the underlying pointer
 
const size_t size
 size of the array
 

Detailed Description

template<typename T_array>
struct serdes::sized_pointer< T_array >

Holds a pointer to an array (with its type information) with a constant size.

Template Parameters
T_arraythe element type for the pointer

Constructor & Destructor Documentation

template<typename T_array>
serdes::sized_pointer< T_array >::sized_pointer ( T_array *const  v,
const size_t  N 
)
inlinenoexcept

Construct a new sized pointer object from a raw pointer and a passed size.

Parameters
v: raw pointer to the head of the array
N: size of the array
template<typename T_array>
template<size_t N>
serdes::sized_pointer< T_array >::sized_pointer ( T_array(&)  v[N])
inlinenoexcept

Construct a new sized pointer object from the array itself.

Template Parameters
N: size of the array
Parameters
v: pointer to the head of the array

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