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

Holds a pointer to a void array (with type information stored as a runtime element size paramenter) with a constant size. More...

#include <bitcpy_sized_pointer.h>

Public Member Functions

template<typename T >
 sized_pointer (T *const v, const size_t N) noexcept
 Construct a new sized pointer object from a raw pointer and a passed size. More...
 
template<typename T , size_t N>
 sized_pointer (T(&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

void *const value
 the underlying pointer reinterpreted as a void* type
 
const size_t size
 size of the array
 
const uint_fast8_t element_size
 Number of bytes per element of the original array type, same as sizeof(T_original)
 

Detailed Description

template<>
struct serdes::sized_pointer< void >

Holds a pointer to a void array (with type information stored as a runtime element size paramenter) with a constant size.

Constructor & Destructor Documentation

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

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

Template Parameters
Toriginal type of pointer
Parameters
vpointer to the head of the array
Nsize of the array
template<typename T , size_t N>
serdes::sized_pointer< void >::sized_pointer ( T(&)  v[N])
inlinenoexcept

Construct a new sized pointer object from the array itself.

Template Parameters
Toriginal type of pointer
Nsize of the array
Parameters
vpointer to the head of the array

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