ROSE 0.11.145.192
Public Member Functions | List of all members
Sawyer::Container::IndexedList< T, Alloc >::Node Class Reference

Description

template<class T, class Alloc = DefaultAllocator>
class Sawyer::Container::IndexedList< T, Alloc >::Node

Combination user-defined value and ID number.

This class represents the user-defined value and an ID number and serves as the type of object stored by the underlying list.

Definition at line 127 of file IndexedList.h.

#include <Sawyer/IndexedList.h>

Public Member Functions

const size_t & id () const
 Unique identification number.
 
Valuevalue ()
 Accessor for user-defined value.
 
const Valuevalue () const
 Accessor for user-defined value.
 
Valueoperator* ()
 Accessor for user-defined value.
 
const Valueoperator* () const
 Accessor for user-defined value.
 
Valueoperator-> ()
 Accessor for user-defined value.
 
const Valueoperator-> () const
 Accessor for user-defined value.
 

Member Function Documentation

◆ id()

template<class T , class Alloc = DefaultAllocator>
const size_t & Sawyer::Container::IndexedList< T, Alloc >::Node::id ( ) const
inline

Unique identification number.

Obtains the unique (within this container) identification number for a storage node. Identification numbers are zero through the size of the list (exclusive) but not necessarily in the same order as the nodes of the list. IDs are stable across insertion but not erasure. When a node is erased from the list, the node that had the highest ID number (if not the one being erased) is renumbered to fill the gap left by the one that was erased.

Definition at line 140 of file IndexedList.h.

◆ value() [1/2]

template<class T , class Alloc = DefaultAllocator>
Value & Sawyer::Container::IndexedList< T, Alloc >::Node::value ( )
inline

Accessor for user-defined value.

The user defined value can be accessed by this method, which returns either a reference to a const value or a reference to a mutable value depending on whether this container is const or mutable.

Definition at line 148 of file IndexedList.h.

Referenced by Sawyer::Container::IndexedList< T, Alloc >::backValue(), Sawyer::Container::IndexedList< T, Alloc >::backValue(), Sawyer::Container::IndexedList< T, Alloc >::frontValue(), Sawyer::Container::IndexedList< T, Alloc >::frontValue(), Sawyer::Container::IndexedList< T, Alloc >::indexedValue(), and Sawyer::Container::IndexedList< T, Alloc >::indexedValue().

◆ value() [2/2]

template<class T , class Alloc = DefaultAllocator>
const Value & Sawyer::Container::IndexedList< T, Alloc >::Node::value ( ) const
inline

Accessor for user-defined value.

The user defined value can be accessed by this method, which returns either a reference to a const value or a reference to a mutable value depending on whether this container is const or mutable.

Definition at line 149 of file IndexedList.h.

◆ operator*() [1/2]

template<class T , class Alloc = DefaultAllocator>
Value & Sawyer::Container::IndexedList< T, Alloc >::Node::operator* ( )
inline

Accessor for user-defined value.

The user defined value can be accessed by this method, which returns either a reference to a const value or a reference to a mutable value depending on whether this container is const or mutable.

Definition at line 150 of file IndexedList.h.

◆ operator*() [2/2]

template<class T , class Alloc = DefaultAllocator>
const Value & Sawyer::Container::IndexedList< T, Alloc >::Node::operator* ( ) const
inline

Accessor for user-defined value.

The user defined value can be accessed by this method, which returns either a reference to a const value or a reference to a mutable value depending on whether this container is const or mutable.

Definition at line 151 of file IndexedList.h.

◆ operator->() [1/2]

template<class T , class Alloc = DefaultAllocator>
Value * Sawyer::Container::IndexedList< T, Alloc >::Node::operator-> ( )
inline

Accessor for user-defined value.

The user defined value can be accessed by this method, which returns either a reference to a const value or a reference to a mutable value depending on whether this container is const or mutable.

Definition at line 152 of file IndexedList.h.

◆ operator->() [2/2]

template<class T , class Alloc = DefaultAllocator>
const Value * Sawyer::Container::IndexedList< T, Alloc >::Node::operator-> ( ) const
inline

Accessor for user-defined value.

The user defined value can be accessed by this method, which returns either a reference to a const value or a reference to a mutable value depending on whether this container is const or mutable.

Definition at line 153 of file IndexedList.h.


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