Loading...
Searching...
No Matches
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...

#include <Instant.H>

Inheritance diagram for Instant< T >:

Classes

struct  less
 Less function for sorting. Compares values only. More...

Public Member Functions

 Instant (const Instant &)=default
 Copy construct.
 Instant (Instant &&)=default
 Move construct.
Instantoperator= (const Instant &)=default
 Copy assignment.
Instantoperator= (Instant &&)=default
 Move assignment.
 Instant ()
 Default construct, with value = 0 and empty name.
 Instant (scalar val, const T &key)
 Copy construct from components.
 Instant (scalar val, T &&key)
 Move construct from components.
scalar value () const noexcept
 The value (const access).
scalar & value () noexcept
 The value (non-const access).
const Tname () const noexcept
 The name/key (const access).
Tname () noexcept
 The name/key (non-const access).
bool equal (scalar val) const noexcept
 Is instant value equal to val within (SMALL) rounding?
template<class T2>
bool equal (const Instant< T2 > &other) const noexcept
 Is instant value equal to other within (SMALL) rounding?
bool less_equal (scalar val) const noexcept
 Is instant less-equal than val within (SMALL) rounding?
template<class T2>
bool less_equal (const Instant< T2 > &other) const noexcept
 Is instant less-equal than other within (SMALL) rounding?
bool greater_equal (scalar val) const noexcept
 Is instant greater-equal than val within (SMALL) rounding?
template<class T2>
bool greater_equal (const Instant< T2 > &other) const noexcept
 Is instant greater-equal than other within (SMALL) rounding?
bool operator<= (scalar val) const noexcept
 Is instant less-equal than val within (SMALL) rounding?
template<class T2>
bool operator<= (const Instant< T2 > &other) const noexcept
 Is instant less-equal than other within (SMALL) rounding?
bool operator>= (scalar val) const noexcept
 Is instant greater-equal than val within (SMALL) rounding?
template<class T2>
bool operator>= (const Instant< T2 > &other) const noexcept
 Is instant greater-equal than other within (SMALL) rounding?

Static Public Member Functions

static constexpr bool equal_to (scalar a, scalar b) noexcept
 Are values equal within (SMALL) rounding tolerance?
static constexpr bool less_equal (scalar a, scalar b) noexcept
 Are values less-equal within (SMALL) rounding tolerance?
static constexpr bool greater_equal (scalar a, scalar b) noexcept
 Are values greater_equal within (SMALL) rounding tolerance?

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]

template<class T>
Instant ( const Instant< T > & )
default

Copy construct.

Referenced by Instant< T >::less::operator()().

Here is the caller graph for this function:

◆ Instant() [2/5]

template<class T>
Instant ( Instant< T > && )
default

Move construct.

◆ Instant() [3/5]

template<class T>
Instant ( )
inline

Default construct, with value = 0 and empty name.

Definition at line 109 of file Instant.H.

◆ Instant() [4/5]

template<class T>
Instant ( scalar val,
const T & key )
inline

Copy construct from components.

Definition at line 118 of file Instant.H.

◆ Instant() [5/5]

template<class T>
Instant ( scalar val,
T && key )
inline

Move construct from components.

Definition at line 127 of file Instant.H.

Member Function Documentation

◆ operator=() [1/2]

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

Copy assignment.

◆ operator=() [2/2]

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

Move assignment.

◆ value() [1/2]

◆ value() [2/2]

template<class T>
scalar & value ( )
inlinenoexcept

The value (non-const access).

Definition at line 144 of file Instant.H.

◆ name() [1/2]

template<class T>
const T & name ( ) const
inlinenoexcept

The name/key (const access).

Definition at line 149 of file Instant.H.

Referenced by seriesWriter::append(), Foam::operator<<(), Foam::operator>>(), and Time::setTime().

Here is the caller graph for this function:

◆ name() [2/2]

template<class T>
T & name ( )
inlinenoexcept

The name/key (non-const access).

Definition at line 154 of file Instant.H.

◆ equal_to()

template<class T>
constexpr bool equal_to ( scalar a,
scalar b )
inlinestaticconstexprnoexcept

Are values equal within (SMALL) rounding tolerance?

Definition at line 162 of file Instant.H.

Referenced by Instant< fileName >::equal(), and Instant< fileName >::equal().

Here is the caller graph for this function:

◆ less_equal() [1/3]

template<class T>
constexpr bool less_equal ( scalar a,
scalar b )
inlinestaticconstexprnoexcept

Are values less-equal within (SMALL) rounding tolerance?

Definition at line 170 of file Instant.H.

Referenced by Instant< fileName >::greater_equal(), Instant< fileName >::greater_equal(), Instant< fileName >::less_equal(), Instant< fileName >::less_equal(), Instant< fileName >::operator<=(), and Instant< fileName >::operator<=().

Here is the caller graph for this function:

◆ greater_equal() [1/3]

template<class T>
constexpr bool greater_equal ( scalar a,
scalar b )
inlinestaticconstexprnoexcept

Are values greater_equal within (SMALL) rounding tolerance?

Definition at line 178 of file Instant.H.

Referenced by Instant< fileName >::operator>=(), and Instant< fileName >::operator>=().

Here is the caller graph for this function:

◆ equal() [1/2]

template<class T>
bool equal ( scalar val) const
inlinenoexcept

Is instant value equal to val within (SMALL) rounding?

Definition at line 189 of file Instant.H.

Referenced by TimePaths::findInstancePath().

Here is the caller graph for this function:

◆ equal() [2/2]

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

Is instant value equal to other within (SMALL) rounding?

Definition at line 198 of file Instant.H.

◆ less_equal() [2/3]

template<class T>
bool less_equal ( scalar val) const
inlinenoexcept

Is instant less-equal than val within (SMALL) rounding?

Definition at line 206 of file Instant.H.

◆ less_equal() [3/3]

template<class T>
template<class T2>
bool less_equal ( const Instant< T2 > & other) const
inlinenoexcept

Is instant less-equal than other within (SMALL) rounding?

Definition at line 215 of file Instant.H.

◆ greater_equal() [2/3]

template<class T>
bool greater_equal ( scalar val) const
inlinenoexcept

Is instant greater-equal than val within (SMALL) rounding?

Definition at line 223 of file Instant.H.

◆ greater_equal() [3/3]

template<class T>
template<class T2>
bool greater_equal ( const Instant< T2 > & other) const
inlinenoexcept

Is instant greater-equal than other within (SMALL) rounding?

Definition at line 232 of file Instant.H.

◆ operator<=() [1/2]

template<class T>
bool operator<= ( scalar val) const
inlinenoexcept

Is instant less-equal than val within (SMALL) rounding?

Definition at line 243 of file Instant.H.

◆ operator<=() [2/2]

template<class T>
template<class T2>
bool operator<= ( const Instant< T2 > & other) const
inlinenoexcept

Is instant less-equal than other within (SMALL) rounding?

Definition at line 252 of file Instant.H.

◆ operator>=() [1/2]

template<class T>
bool operator>= ( scalar val) const
inlinenoexcept

Is instant greater-equal than val within (SMALL) rounding?

Definition at line 260 of file Instant.H.

◆ operator>=() [2/2]

template<class T>
template<class T2>
bool operator>= ( const Instant< T2 > & other) const
inlinenoexcept

Is instant greater-equal than other within (SMALL) rounding?

Definition at line 269 of file Instant.H.


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