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

The abstract base class of all LifeCycle<T>. More...

#include <fastarduino/lifecycle.h>

Inheritance diagram for lifecycle::AbstractLifeCycle:

Public Member Functions

uint8_t id () const
 The unique identifier of this lifecycle-managed instance, as provided by the LifeCycleManager it was registered with. More...
 
AbstractLifeCycleManagermanager () const
 A pointer to the AbstractLifeCycleManager handling this instance. More...
 

Friends

class AbstractLifeCycleManager
 

Detailed Description

The abstract base class of all LifeCycle<T>.

Once registered with a LifeCycleManager, it holds a unique id and the reference to its LifeCycleManager.

You shall normally never use this class directly, but only its template subclass LifeCycle<T>.

See also
LifeCycle
AbstractLifeCycleManager.register_()

Definition at line 67 of file lifecycle.h.

Member Function Documentation

◆ id()

uint8_t lifecycle::AbstractLifeCycle::id ( ) const
inline

The unique identifier of this lifecycle-managed instance, as provided by the LifeCycleManager it was registered with.

When 0, it means this instance has not been registered yet, or it has been unregistered since.

Note
any registered instance may be implicitly unregistered after being "moved" to another instance (through usage of its move-constructor or move-assignment operator).
See also
AbstractLifeCycleManager.register_()
AbstractLifeCycleManager.unregister_()
std::move()

Definition at line 94 of file lifecycle.h.

◆ manager()

AbstractLifeCycleManager* lifecycle::AbstractLifeCycle::manager ( ) const
inline

A pointer to the AbstractLifeCycleManager handling this instance.

When nullptr, it means this instance has not been registered yet, or it has been unregistered since.

Note
any registered instance may be implicitly unregistered after being "moved" to another instance (through usage of its move-constructor or move-assignment operator).
See also
AbstractLifeCycleManager.register_()
AbstractLifeCycleManager.unregister_()
std::move()

Definition at line 112 of file lifecycle.h.


The documentation for this class was generated from the following file: