36 #ifndef _EMBEDDED_RPC__MANUALLY_CONSTRUCTED_H_ 37 #define _EMBEDDED_RPC__MANUALLY_CONSTRUCTED_H_ 78 T *
get(void) {
return reinterpret_cast<T *
>(&
m_storage); }
79 const T *
get(void)
const {
return reinterpret_cast<const T *
>(&
m_storage); }
80 T *operator->(
void) {
return get(); }
81 const T *operator->(
void)
const {
return get(); }
82 T &operator*(
void) {
return *
get(); }
83 const T &operator*(
void)
const {
return *
get(); }
84 operator T *(void) {
return get(); }
85 operator const T *(void)
const {
return get(); }
90 void construct(
void) {
new (
m_storage) T; }
91 template <
typename A1>
92 void construct(
const A1 &a1)
97 template <
typename A1,
typename A2>
98 void construct(
const A1 &a1,
const A2 &a2)
103 template <
typename A1,
typename A2,
typename A3>
104 void construct(
const A1 &a1,
const A2 &a2,
const A3 &a3)
109 template <
typename A1,
typename A2,
typename A3,
typename A4>
110 void construct(
const A1 &a1,
const A2 &a2,
const A3 &a3,
const A4 &a4)
115 template <
typename A1,
typename A2,
typename A3,
typename A4,
typename A5>
116 void construct(
const A1 &a1,
const A2 &a2,
const A3 &a3,
const A4 &a4,
const A5 &a5)
135 uint64_t
m_storage[(
sizeof(T) +
sizeof(uint64_t) - 1) /
sizeof(uint64_t)];
142 #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:135
Definition: erpc_arbitrated_client_manager.h:51
void destroy(void)
Invoke the object's destructor.
Definition: erpc_manually_constructed.h:127
Allocates static storage for an object.
Definition: erpc_manually_constructed.h:73