|
FastArduino v1.10
C++ library to build fast but small Arduino/AVR projects
|
A wrapper for items stored in a LinkedList.
More...
#include <fastarduino/linked_list.h>


Public Types | |
| using | T = T_ |
| The type of item wrapped by this class. More... | |
| using | TREF = TREF_ |
| The reference type of item wrapped by this class. More... | |
| using | CTREF = CTREF_ |
| The constant reference type of item wrapped by this class. More... | |
Public Member Functions | |
| LinkWrapper (const LinkWrapper &)=delete | |
| LinkWrapper & | operator= (const LinkWrapper &)=delete |
| LinkWrapper (CTREF item) | |
Create a wrapper, usable in a LinkedList, for item. More... | |
| TREF | item () |
| Return a reference to the wrapped item. More... | |
| CTREF | item () const |
| Return a constant reference to the wrapped item. More... | |
Friends | |
| class | LinkedList< TYPE > |
| template<class T , class B > | |
| struct | types_traits::derives_from |
A wrapper for items stored in a LinkedList.
Contrarily to Link class, you may wrap any existing type (even a simple type such as bool, uint16_t, char...)
The follwoing snippet shows how to use this class:
| T_ | the type of item wrapped by this class |
| TREF_ | the default reference type to T_ |
| TREF_ | the reference type of items wrapped; this is T_& by default, but this may be changed, for small size types (one or two bytes long) to T_ itself, in order to avoid additional code to handle reference extraction of an item. |
| CTREF_ | the constant reference type of items wrapped; this is const T_& by default, but this may be changed, for small size types (one or two bytes long) to T_ itself, in order to avoid additional code to handle reference extraction of an item. |
Definition at line 218 of file linked_list.h.
| using containers::LinkWrapper< T_, TREF_, CTREF_ >::T = T_ |
The type of item wrapped by this class.
Definition at line 225 of file linked_list.h.
| using containers::LinkWrapper< T_, TREF_, CTREF_ >::TREF = TREF_ |
The reference type of item wrapped by this class.
Definition at line 228 of file linked_list.h.
| using containers::LinkWrapper< T_, TREF_, CTREF_ >::CTREF = CTREF_ |
The constant reference type of item wrapped by this class.
Definition at line 231 of file linked_list.h.
|
inline |
Create a wrapper, usable in a LinkedList, for item.
Definition at line 236 of file linked_list.h.
|
inline |
Return a reference to the wrapped item.
Definition at line 241 of file linked_list.h.
|
inline |
Return a constant reference to the wrapped item.
Definition at line 249 of file linked_list.h.
|
friend |
Definition at line 262 of file linked_list.h.
|
friend |
Definition at line 265 of file linked_list.h.