![]() |
eRPC API Reference
Rev. 1.7.2
NXP Semiconductors
|
Allocates static storage for an object. More...
#include <erpc_manually_constructed.h>
Public Member Functions | |
void | destroy (void) |
Invoke the object's destructor. More... | |
Object access | |
T * | get (void) |
const T * | get (void) const |
T * | operator-> (void) |
const T * | operator-> (void) const |
T & | operator* (void) |
const T & | operator* (void) const |
operator T * (void) | |
operator const T * (void) const | |
Explicit construction methods | |
void | construct (void) |
template<typename A1 > | |
void | construct (const A1 &a1) |
template<typename A1 , typename A2 > | |
void | construct (const A1 &a1, const A2 &a2) |
template<typename A1 , typename A2 , typename A3 > | |
void | construct (const A1 &a1, const A2 &a2, const A3 &a3) |
template<typename A1 , typename A2 , typename A3 , typename A4 > | |
void | construct (const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4) |
template<typename A1 , typename A2 , typename A3 , typename A4 , typename A5 > | |
void | construct (const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5) |
Protected Attributes | |
uint64_t | m_storage [(sizeof(T)+sizeof(uint64_t)-1)/sizeof(uint64_t)] |
Storage for the object. More... | |
Allocates static storage for an object.
This template class defines storage of the template class' size. Then it gives the user explicit control over construction and destruction of the object residing in that storage. This is useful for placing objects in unions, or other situations where you need static storage but want to delay the actual construction of the object.
Objects of this class will act as a pointer to the template argument class type. Of course, if the object has not yet been constructed then the behavior is undefined if the pointer to it is used.
Note that there is not a constructor or deconstructor. This is because members of unions cannot have constructors or deconstructors.
Instances of this template class are aligned to 8 bytes.
|
inline |
Invoke the object's destructor.
Behavior is undefined if the objected was not previously initialized.
|
protected |
Storage for the object.
An array of uint64 is used to get 8-byte alignment.