Class hal::static_list::item
ClassList > hal > static_list > item
Item/node within the static linked list. More...
#include <static_list.hpp>
Public Functions
Type | Name |
---|---|
auto & | get () |
const auto & | get () const |
constexpr | item (static_list * p_list, const Object & p_object) |
constexpr | item (static_list * p_list, Object && p_object) |
constexpr | item (item & p_other) = delete |
constexpr | item (item && p_other) |
const auto * | list () const |
auto & | operator* () |
const auto & | operator* () const |
constexpr item & | operator= (item & p_other) = delete |
constexpr item & | operator= (item && p_other) |
~item () |
Detailed Description
This object does not allow copies. When moved, the object will determine its new location in memory, and will update the linked list to the new location and invalidate the old location. This ensures that this item's position in memory, if whether returned from a function or relocated in some other way, is always tracked by the list.
An item can only be removed from the list if it is no longer accessible (goes out of scope) or is destructed explicitly (DO NOT DO THIS).
The return value of push_back MUST be saved to a variable. Failing to do so will result in the object being destructed and removed from the list due to it being inaccessible.
Public Functions Documentation
function get [1/2]
inline auto & hal::static_list::item::get ()
function get [2/2]
inline const auto & hal::static_list::item::get () const
function item [1/4]
inline constexpr hal::static_list::item::item (
static_list * p_list,
const Object & p_object
)
function item [2/4]
inline constexpr hal::static_list::item::item (
static_list * p_list,
Object && p_object
)
function item [3/4]
constexpr hal::static_list::item::item (
item & p_other
) = delete
function item [4/4]
inline constexpr hal::static_list::item::item (
item && p_other
)
function list
inline const auto * hal::static_list::item::list () const
function operator*
inline auto & hal::static_list::item::operator* ()
function operator*
inline const auto & hal::static_list::item::operator* () const
function operator=
constexpr item & hal::static_list::item::operator= (
item & p_other
) = delete
function operator=
inline constexpr item & hal::static_list::item::operator= (
item && p_other
)
function ~item
inline hal::static_list::item::~item ()
Friends Documentation
friend item_iterator
class hal::static_list::item::item_iterator (
item_iterator
)
friend static_list
class hal::static_list::item::static_list (
static_list
)
The documentation for this class was generated from the following file libraries/include/libhal-util/static_list.hpp