10 #ifndef _EMBEDDED_RPC__MANUALLY_CONSTRUCTED_H_ 11 #define _EMBEDDED_RPC__MANUALLY_CONSTRUCTED_H_ 52 T *
get(void) {
return reinterpret_cast<T *
>(&
m_storage); }
53 const T *
get(void)
const {
return reinterpret_cast<const T *
>(&
m_storage); }
54 T *operator->(
void) {
return get(); }
55 const T *operator->(
void)
const {
return get(); }
56 T &operator*(
void) {
return *
get(); }
57 const T &operator*(
void)
const {
return *
get(); }
58 operator T *(void) {
return get(); }
59 operator const T *(void)
const {
return get(); }
64 void construct(
void) {
new (
m_storage) T; }
65 template <
typename A1>
66 void construct(
const A1 &a1)
71 template <
typename A1,
typename A2>
72 void construct(
const A1 &a1,
const A2 &a2)
77 template <
typename A1,
typename A2,
typename A3>
78 void construct(
const A1 &a1,
const A2 &a2,
const A3 &a3)
83 template <
typename A1,
typename A2,
typename A3,
typename A4>
84 void construct(
const A1 &a1,
const A2 &a2,
const A3 &a3,
const A4 &a4)
89 template <
typename A1,
typename A2,
typename A3,
typename A4,
typename A5>
90 void construct(
const A1 &a1,
const A2 &a2,
const A3 &a3,
const A4 &a4,
const A5 &a5)
109 uint64_t
m_storage[(
sizeof(T) +
sizeof(uint64_t) - 1) /
sizeof(uint64_t)];
116 #endif // _EMBEDDED_RPC__MANUALLY_CONSTRUCTED_H_ uint64_t m_storage[(sizeof(T)+sizeof(uint64_t)-1)/sizeof(uint64_t)]
Storage for the object.
Definition: erpc_manually_constructed.h:109
Definition: erpc_arbitrated_client_manager.h:25
void destroy(void)
Invoke the object's destructor.
Definition: erpc_manually_constructed.h:101
Allocates static storage for an object.
Definition: erpc_manually_constructed.h:47