FastArduino
v1.9 alpha
C++ library to build fast but small Arduino/AVR projects
|
Contains the API around LifeCycle management implementation. More...
Classes | |
class | AbstractLifeCycle |
The abstract base class of all LifeCycle<T> . More... | |
class | AbstractLifeCycleManager |
The abstract base class of all LifeCycleManager. More... | |
class | LifeCycleManager |
An actual LifeCycleManager implementation, based on AbstractLifeCycleManager , adding static storage for it. More... | |
class | LifeCycle |
A mixin class allowing lifecycle management of any object of any type T . More... | |
class | Proxy |
A proxy class that encapsulates access to a fixed T instance, or to a dynamic LifeCycle<T> instance. More... | |
class | LightProxy |
A light proxy class that encapsulates access to a fixed T instance, or to a dynamic LifeCycle<T> instance. More... | |
class | DirectProxy |
A kind of proxy class that encapsulates access to a fixed T instance. More... | |
Functions | |
template<typename T > | |
Proxy< T > | make_proxy (const T &dest) |
Utility template function to create a Proxy<T> from dest without the need to speicify T . More... | |
template<typename T > | |
Proxy< T > | make_proxy (const LifeCycle< T > &dest) |
Utility template function to create a Proxy<T> from dest without the need to speicify T . More... | |
template<typename T > | |
LightProxy< T > | make_light_proxy (const T &dest) |
Utility template function to create a LightProxy<T> from dest without the need to speicify T . More... | |
template<typename T > | |
LightProxy< T > | make_light_proxy (const LifeCycle< T > &dest) |
Utility template function to create a LightProxy<T> from dest without the need to speicify T . More... | |
template<typename T > | |
DirectProxy< T > | make_direct_proxy (const T &dest) |
Utility template function to create a DirectProxy<T> from dest without the need to speicify T . More... | |
Contains the API around LifeCycle management implementation.
This concept is here to be extended with concrete needs (e.g. Futures). The API is based on the following:
LifeCycle<T>
that manages a T instance; lifecycle allows to move an object across memory location but always have its associated LifeCycleManager keep its latest locationLifeCycle<T>
instance is registered with a LifeCycleManagerLifeCycle<T>
instance is destroyed or explicitly deregistered from its LifeCycleManagerIn addition, two template Proxy and LightProxy classes can be used as a proxy to either a static instance or a lifecycle-managed instance in a consistent way.
Proxy<T> lifecycle::make_proxy | ( | const T & | dest | ) |
Utility template function to create a Proxy<T> from dest
without the need to speicify T
.
T | the type of proxied instance |
dest | the instance to proxify |
dest
Definition at line 593 of file lifecycle.h.
Utility template function to create a Proxy<T> from dest
without the need to speicify T
.
T | the type of proxied instance |
dest | the instance to proxify, wrapped in LifeCycle |
dest
Definition at line 606 of file lifecycle.h.
LightProxy<T> lifecycle::make_light_proxy | ( | const T & | dest | ) |
Utility template function to create a LightProxy<T> from dest
without the need to speicify T
.
T | the type of proxied instance |
dest | the instance to proxify |
dest
Definition at line 781 of file lifecycle.h.
LightProxy<T> lifecycle::make_light_proxy | ( | const LifeCycle< T > & | dest | ) |
Utility template function to create a LightProxy<T> from dest
without the need to speicify T
.
T | the type of proxied instance |
dest | the instance to proxify, wrapped in a LifeCycle |
dest
Definition at line 794 of file lifecycle.h.
DirectProxy<T> lifecycle::make_direct_proxy | ( | const T & | dest | ) |
Utility template function to create a DirectProxy<T> from dest
without the need to speicify T
.
T | the type of proxied instance |
dest | the instance to proxify |
dest
Definition at line 905 of file lifecycle.h.