UniformList< Type > Class Template Reference

A single value that is represented as a list with an operator[] to access the value. This can be useful for templated operations expecting a list accessor. More...

Inheritance diagram for UniformList< Type >:

Public Member Functions

 UniformList (const Type &val) noexcept
 Construct from given value. More...
 
 UniformList (Type &&val) noexcept
 Move construct from given value. More...
 
const Type & value () const noexcept
 Return the value. More...
 
Type & value () noexcept
 Non-const access to the value. More...
 
 operator const Type & () const noexcept
 Implicit cast to the value. More...
 
const Type & operator[] (const label) const noexcept
 Return the value. More...
 

Detailed Description

template<class Type>
class Foam::UniformList< Type >

A single value that is represented as a list with an operator[] to access the value. This can be useful for templated operations expecting a list accessor.

Note
The list currently has no sizing associated with it.

Definition at line 48 of file UniformList.H.

Constructor & Destructor Documentation

◆ UniformList() [1/2]

UniformList ( const Type &  val)
inlineexplicitnoexcept

Construct from given value.

Definition at line 64 of file UniformList.H.

◆ UniformList() [2/2]

UniformList ( Type &&  val)
inlineexplicitnoexcept

Move construct from given value.

Definition at line 72 of file UniformList.H.

Member Function Documentation

◆ value() [1/2]

const Type& value ( ) const
inlinenoexcept

Return the value.

Definition at line 83 of file UniformList.H.

Referenced by Foam::max(), and Foam::min().

Here is the caller graph for this function:

◆ value() [2/2]

Type& value ( )
inlinenoexcept

Non-const access to the value.

Definition at line 91 of file UniformList.H.

◆ operator const Type &()

operator const Type & ( ) const
inlinenoexcept

Implicit cast to the value.

Definition at line 102 of file UniformList.H.

◆ operator[]()

const Type& operator[] ( const label  ) const
inlinenoexcept

Return the value.

Definition at line 110 of file UniformList.H.


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