FastArduino  v1.9 alpha
C++ library to build fast but small Arduino/AVR projects
lifecycle Namespace Reference

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...
 

Detailed Description

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:

In 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.

Function Documentation

◆ make_proxy() [1/2]

template<typename T >
Proxy<T> lifecycle::make_proxy ( const T &  dest)

Utility template function to create a Proxy<T> from dest without the need to speicify T.

Template Parameters
Tthe type of proxied instance
Parameters
destthe instance to proxify
Returns
a Proxy to dest
See also
Proxy

Definition at line 593 of file lifecycle.h.

◆ make_proxy() [2/2]

template<typename T >
Proxy<T> lifecycle::make_proxy ( const LifeCycle< T > &  dest)

Utility template function to create a Proxy<T> from dest without the need to speicify T.

Template Parameters
Tthe type of proxied instance
Parameters
destthe instance to proxify, wrapped in LifeCycle
Returns
a Proxy to dest
See also
Proxy

Definition at line 606 of file lifecycle.h.

◆ make_light_proxy() [1/2]

template<typename T >
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.

Template Parameters
Tthe type of proxied instance
Parameters
destthe instance to proxify
Returns
a LightProxy to dest
See also
LightProxy

Definition at line 781 of file lifecycle.h.

◆ make_light_proxy() [2/2]

template<typename T >
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.

Template Parameters
Tthe type of proxied instance
Parameters
destthe instance to proxify, wrapped in a LifeCycle
Returns
a LightProxy to dest
See also
LightProxy

Definition at line 794 of file lifecycle.h.

◆ make_direct_proxy()

template<typename T >
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.

Template Parameters
Tthe type of proxied instance
Parameters
destthe instance to proxify
Returns
a DirectProxy to dest
See also
DirectProxy

Definition at line 905 of file lifecycle.h.