ROSE  0.11.145.0
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 130 of file IndexedList.h.

#include <util/Sawyer/IndexedList.h>

Public Member Functions

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

Member Function Documentation

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 143 of file IndexedList.h.

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 151 of file IndexedList.h.

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

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 152 of file IndexedList.h.

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 153 of file IndexedList.h.

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 154 of file IndexedList.h.

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 155 of file IndexedList.h.

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 156 of file IndexedList.h.


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