|
siplasplas
A library for C++ reflection and introspection
|
Implements a non owning storage. More...
#include <siplasplas/typeerasure/anystorage/nonowning.hpp>
Public Member Functions | |
| NonOwningStorage (void *object) | |
| Initializes the storage pointing it to the given object. More... | |
| void | rebind (void *object) |
| Reassigns the storage to reference another object. More... | |
| void * | storage (cpp::typeerasure::TypeInfo typeInfo) const |
| Returns a pointer to the storage memory space. More... | |
Implements a non owning storage.
A non owning storage stores a reference to an existing object instead of hosting it. Size of non owning storages is always sizeof(void*).
|
inline |
Initializes the storage pointing it to the given object.
| object | Pointer to the object to reference |
|
inline |
Reassigns the storage to reference another object.
| object | Pointer to the new object to reference |
|
inline |
Returns a pointer to the storage memory space.
| alignment | Required storage alignment. Byte boundary by default |