Instant< T > Class Template Reference

A tuple of scalar value and key. The value often corresponds to a time value, thus the naming of the class. The key will usually be a time name or a file name etc. More...

Inheritance diagram for Instant< T >:

Classes

struct  less
 Less function for sorting. More...
 

Public Member Functions

 Instant (const Instant &)=default
 Copy construct. More...
 
 Instant (Instant &&)=default
 Move construct. More...
 
Instantoperator= (const Instant &)=default
 Copy assignment. More...
 
Instantoperator= (Instant &&)=default
 Move assignment. More...
 
 Instant ()
 Default construct, with value = 0 and empty name. More...
 
 Instant (scalar val, const T &key)
 Copy construct from components. More...
 
 Instant (scalar val, T &&key)
 Move construct from components. More...
 
scalar value () const noexcept
 The value (const access) More...
 
scalar & value () noexcept
 The value (non-const access) More...
 
const Tname () const noexcept
 The name/key (const access) More...
 
Tname () noexcept
 The name/key (non-const access) More...
 
bool equal (scalar val) const noexcept
 True if values are equal (includes SMALL for rounding) More...
 
template<class T2 >
bool equal (const Instant< T2 > &other) const noexcept
 True if values are equal (includes SMALL for rounding) More...
 

Detailed Description

template<class T>
class Foam::Instant< T >

A tuple of scalar value and key. The value often corresponds to a time value, thus the naming of the class. The key will usually be a time name or a file name etc.

Definition at line 45 of file Instant.H.

Constructor & Destructor Documentation

◆ Instant() [1/5]

Instant ( const Instant< T > &  )
default

Copy construct.

◆ Instant() [2/5]

Instant ( Instant< T > &&  )
default

Move construct.

◆ Instant() [3/5]

Instant ( )
inline

Default construct, with value = 0 and empty name.

Definition at line 104 of file Instant.H.

◆ Instant() [4/5]

Instant ( scalar  val,
const T key 
)
inline

Copy construct from components.

Definition at line 113 of file Instant.H.

◆ Instant() [5/5]

Instant ( scalar  val,
T &&  key 
)
inline

Move construct from components.

Definition at line 122 of file Instant.H.

Member Function Documentation

◆ operator=() [1/2]

Instant& operator= ( const Instant< T > &  )
default

Copy assignment.

◆ operator=() [2/2]

Instant& operator= ( Instant< T > &&  )
default

Move assignment.

◆ value() [1/2]

scalar value ( ) const
inlinenoexcept

◆ value() [2/2]

scalar& value ( )
inlinenoexcept

The value (non-const access)

Definition at line 139 of file Instant.H.

◆ name() [1/2]

const T& name ( ) const
inlinenoexcept

The name/key (const access)

Definition at line 144 of file Instant.H.

Referenced by seriesWriter::append(), seriesWriter::load(), seriesLess::operator()(), Foam::operator>>(), boundaryDataSurfaceReader::readField(), seriesWriter::removeNewer(), and Time::setTime().

Here is the caller graph for this function:

◆ name() [2/2]

T& name ( )
inlinenoexcept

The name/key (non-const access)

Definition at line 149 of file Instant.H.

◆ equal() [1/2]

bool equal ( scalar  val) const
inlinenoexcept

True if values are equal (includes SMALL for rounding)

Definition at line 155 of file Instant.H.

Referenced by masterUncollatedFileOperation::findInstancePath(), Time::findInstancePath(), and masterUncollatedFileOperation::readObjects().

Here is the caller graph for this function:

◆ equal() [2/2]

bool equal ( const Instant< T2 > &  other) const
inlinenoexcept

True if values are equal (includes SMALL for rounding)

Definition at line 164 of file Instant.H.


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