Instant< T > Class Template Reference

A tuple of 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 >:
[legend]

Classes

struct  less
 Less function for sorting. More...
 

Public Member Functions

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

Detailed Description

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

A tuple of 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.

Source files

Definition at line 53 of file Instant.H.

Constructor & Destructor Documentation

◆ Instant() [1/5]

Instant ( )

Construct null, with value = 0.

Definition at line 33 of file Instant.C.

◆ Instant() [2/5]

Instant ( scalar  val,
const T key 
)

Copy construct from components.

◆ Instant() [3/5]

Instant ( scalar  val,
T &&  key 
)

Move construct from components.

◆ Instant() [4/5]

Instant ( const Instant< T > &  )
default

Copy construct.

◆ Instant() [5/5]

Instant ( Instant< T > &&  )
default

Move construct.

Member Function Documentation

◆ value() [1/2]

scalar value ( ) const
inline

The value (const access)

Definition at line 99 of file Instant.H.

Referenced by seriesWriter::append(), Instant< word >::equal(), noiseModel::findStartTimeIndex(), seriesWriter::load(), ensightCase::nextTime(), seriesLess::operator()(), Instant< T >::less::operator()(), Foam::operator<(), Foam::operator>(), seriesWriter::removeNewer(), timeSelector::selected(), ensightCase::setTime(), and Time::setTime().

Here is the caller graph for this function:

◆ value() [2/2]

scalar& value ( )
inline

The value (non-const access)

Definition at line 105 of file Instant.H.

◆ name() [1/2]

const T& name ( ) const
inline

The name/key (const access)

Definition at line 111 of file Instant.H.

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

Here is the caller graph for this function:

◆ name() [2/2]

T& name ( )
inline

The name/key (non-const access)

Definition at line 117 of file Instant.H.

◆ equal() [1/2]

bool equal ( scalar  val) const

True if values are equal (includes SMALL for rounding)

Definition at line 59 of file Instant.C.

Referenced by masterUncollatedFileOperation::findInstancePath(), Time::findInstancePath(), Foam::operator!=(), Foam::operator==(), and masterUncollatedFileOperation::readObjects().

Here is the caller graph for this function:

◆ equal() [2/2]

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

True if values are equal (includes SMALL for rounding)

Definition at line 67 of file Instant.C.

◆ operator=() [1/2]

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

Copy assignment.

◆ operator=() [2/2]

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

Move assignment.


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