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. Compares values only. 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
 Is instant value equal to val within (SMALL) rounding? More...
 
template<class T2 >
bool equal (const Instant< T2 > &other) const noexcept
 Is instant value equal to other within (SMALL) rounding? More...
 
bool less_equal (scalar val) const noexcept
 Is instant less-equal than val within (SMALL) rounding? More...
 
template<class T2 >
bool less_equal (const Instant< T2 > &other) const noexcept
 Is instant less-equal than other within (SMALL) rounding? More...
 
bool greater_equal (scalar val) const noexcept
 Is instant greater-equal than val within (SMALL) rounding? More...
 
template<class T2 >
bool greater_equal (const Instant< T2 > &other) const noexcept
 Is instant greater-equal than other within (SMALL) rounding? More...
 
bool operator<= (scalar val) const noexcept
 Is instant less-equal than val within (SMALL) rounding? More...
 
template<class T2 >
bool operator<= (const Instant< T2 > &other) const noexcept
 Is instant less-equal than other within (SMALL) rounding? More...
 
bool operator>= (scalar val) const noexcept
 Is instant greater-equal than val within (SMALL) rounding? More...
 
template<class T2 >
bool operator>= (const Instant< T2 > &other) const noexcept
 Is instant greater-equal than other within (SMALL) rounding? More...
 

Static Public Member Functions

static constexpr bool equal_to (scalar a, scalar b) noexcept
 Are values equal within (SMALL) rounding tolerance? More...
 
static constexpr bool less_equal (scalar a, scalar b) noexcept
 Are values less-equal within (SMALL) rounding tolerance? More...
 
static constexpr bool greater_equal (scalar a, scalar b) noexcept
 Are values greater_equal within (SMALL) rounding tolerance? 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 109 of file Instant.H.

◆ Instant() [4/5]

Instant ( scalar  val,
const T key 
)
inline

Copy construct from components.

Definition at line 118 of file Instant.H.

◆ Instant() [5/5]

Instant ( scalar  val,
T &&  key 
)
inline

Move construct from components.

Definition at line 127 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]

◆ value() [2/2]

scalar& value ( )
inlinenoexcept

The value (non-const access)

Definition at line 144 of file Instant.H.

◆ name() [1/2]

const T& name ( ) const
inlinenoexcept

The name/key (const access)

Definition at line 149 of file Instant.H.

Referenced by seriesWriter::append(), Foam::operator>>(), 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 154 of file Instant.H.

◆ equal_to()

static constexpr bool equal_to ( scalar  a,
scalar  b 
)
inlinestaticnoexcept

Are values equal within (SMALL) rounding tolerance?

Definition at line 162 of file Instant.H.

Referenced by Instant< word >::equal().

Here is the caller graph for this function:

◆ less_equal() [1/3]

static constexpr bool less_equal ( scalar  a,
scalar  b 
)
inlinestaticnoexcept

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

Definition at line 170 of file Instant.H.

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

Here is the caller graph for this function:

◆ greater_equal() [1/3]

static constexpr bool greater_equal ( scalar  a,
scalar  b 
)
inlinestaticnoexcept

Are values greater_equal within (SMALL) rounding tolerance?

Definition at line 178 of file Instant.H.

Referenced by Instant< word >::operator>=().

Here is the caller graph for this function:

◆ equal() [1/2]

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]

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]

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]

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]

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]

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]

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]

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]

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]

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: