A container with an integer index that can be attached to any item. The index may be useful for sorting or storing additional information. More...
#include <LabelledItem.H>


Public Member Functions | |
| LabelledItem () | |
| Default construct item, with index = -1. | |
| LabelledItem (const T &item) | |
| Copy construct item, with index = -1. | |
| LabelledItem (T &&item) | |
| Move construct item, with index = -1. | |
| LabelledItem (const T &item, label idx) | |
| Construct from components. | |
| LabelledItem (Istream &is) | |
| Construct from Istream. | |
| label | index () const noexcept |
| Return the index. | |
| label & | index () noexcept |
| Non-const access to the index. | |
| void | setIndex (const label idx) noexcept |
| Set the index. | |
| bool | operator== (const LabelledItem< T > &rhs) const |
| Test for equality of components. | |
| bool | operator!= (const LabelledItem< T > &rhs) const |
| Test for inequality of components. | |
Friends | |
| Istream & | operator>> (Istream &, LabelledItem< T > &) |
| Ostream & | operator<< (Ostream &, const LabelledItem< T > &) |
A container with an integer index that can be attached to any item. The index may be useful for sorting or storing additional information.
Definition at line 58 of file LabelledItem.H.
|
inline |
Default construct item, with index = -1.
Definition at line 78 of file LabelledItem.H.
References Foam::T().
Referenced by operator!=(), operator<<, operator==(), and operator>>.


Copy construct item, with index = -1.
Definition at line 87 of file LabelledItem.H.
References Foam::T().

Move construct item, with index = -1.
Definition at line 96 of file LabelledItem.H.
References Foam::T().

Construct from components.
Definition at line 105 of file LabelledItem.H.
References Foam::T().

Construct from Istream.
Definition at line 114 of file LabelledItem.H.
|
inlinenoexcept |
|
inlinenoexcept |
Non-const access to the index.
Definition at line 133 of file LabelledItem.H.
References Foam::noexcept.
|
inlinenoexcept |
Set the index.
Definition at line 141 of file LabelledItem.H.
|
inline |
Test for equality of components.
Definition at line 152 of file LabelledItem.H.
References LabelledItem(), Foam::rhs(), and Foam::T().

|
inline |
Test for inequality of components.
Definition at line 164 of file LabelledItem.H.
References LabelledItem(), and Foam::rhs().

|
friend |
References LabelledItem(), and Foam::T().
|
friend |
References LabelledItem().