Embedded Template Library 1.0
|
#include <mem_cast.h>
Public Member Functions | |
mem_cast_ptr () | |
Default constructor. | |
mem_cast_ptr (char *pbuffer_, size_t buffer_size_=Undefined_Size) | |
Construct with pointer to buffer and optional size. | |
mem_cast_ptr (const mem_cast_ptr &other) | |
Copy construct. | |
mem_cast_ptr & | operator= (const mem_cast_ptr &rhs) |
Assignment operator. | |
template<typename T > | |
void | assign (const T &value) |
Assign from value. | |
template<typename T > | |
void | assign_at_offset (size_t offset, const T &value) |
Assign from value at offset. | |
template<typename T , size_t Offset> | |
void | assign_at_offset (const T &value) |
Assign from value at offset. | |
template<typename T > | |
ETL_NODISCARD T & | ref () |
Get a reference to T. | |
template<typename T > | |
ETL_NODISCARD const T & | ref () const |
Get a const reference to T. | |
template<typename T > | |
ETL_NODISCARD T & | ref_at_offset (size_t offset) |
Get a reference to T at offset (dynamic) | |
template<typename T > | |
ETL_NODISCARD const T & | ref_at_offset (size_t offset) const |
Get a const reference to T at offset (dynamic) | |
template<typename T , size_t Offset> | |
ETL_NODISCARD T & | ref_at_offset () |
Get a reference to T at offset (static) | |
template<typename T , size_t Offset> | |
ETL_NODISCARD const T & | ref_at_offset () const |
Get a const reference to T at offset (static) | |
ETL_NODISCARD size_t | size () const |
Get the size of the buffer. | |
ETL_NODISCARD size_t | alignment () const |
Get the alignment of the buffer. | |
void | data (char *pbuffer_, size_t buffer_size_=Undefined_Size) |
Set the pointer to the external buffer. | |
ETL_NODISCARD char * | data () |
Get a pointer to the external buffer. | |
ETL_NODISCARD const char * | data () const |
Get const a pointer to the external buffer. | |
Static Public Attributes | |
static ETL_CONSTANT size_t | Undefined_Size = etl::integral_limits<size_t>::max |