instant Class Reference

An instant of time. Contains the time value and name. Uses Foam::Time when formatting the name. More...

Inheritance diagram for instant:
[legend]
Collaboration diagram for instant:
[legend]

Public Member Functions

 instant ()=default
 Default construct, with value = 0 and empty name. More...
 
 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 (scalar timeValue)
 Construct from timeValue, auto generating the name. More...
 
 instant (const word &timeName)
 Copy construct from timeName, parsing timeName for a value. More...
 
 instant (word &&timeName)
 Move construct from timeName, parsing timeName for a value. More...
 
- Public Member Functions inherited from Instant< word >
 Instant (const Instant &)=default
 Copy construct. More...
 
 Instant (Instant &&)=default
 Move construct. More...
 
 Instant ()
 Default construct, with value = 0 and empty name. More...
 
 Instant (scalar val, const word &key)
 Copy construct from components. More...
 
 Instant (scalar val, word &&key)
 Move construct from components. More...
 
Instantoperator= (const Instant &)=default
 Copy assignment. More...
 
Instantoperator= (Instant &&)=default
 Move assignment. More...
 
scalar value () const noexcept
 The value (const access) More...
 
scalar & value () noexcept
 The value (non-const access) More...
 
const wordname () const noexcept
 The name/key (const access) More...
 
wordname () noexcept
 The name/key (non-const access) More...
 
bool equal (scalar val) const noexcept
 True if values are equal (includes SMALL for rounding) More...
 
bool equal (const Instant< T2 > &other) const noexcept
 True if values are equal (includes SMALL for rounding) More...
 

Static Public Attributes

static const char *const typeName = "instant"
 The type name (eg, for pTraits) More...
 

Detailed Description

An instant of time. Contains the time value and name. Uses Foam::Time when formatting the name.

Source files

Definition at line 53 of file instant.H.

Constructor & Destructor Documentation

◆ instant() [1/6]

instant ( )
default

Default construct, with value = 0 and empty name.

◆ instant() [2/6]

instant ( const instant )
default

Copy construct.

◆ instant() [3/6]

instant ( instant &&  )
default

Move construct.

◆ instant() [4/6]

instant ( scalar  timeValue)
explicit

Construct from timeValue, auto generating the name.

Definition at line 41 of file instant.C.

◆ instant() [5/6]

instant ( const word timeName)
explicit

Copy construct from timeName, parsing timeName for a value.

Definition at line 47 of file instant.C.

References Instant< word >::name(), and Instant< word >::value().

Here is the call graph for this function:

◆ instant() [6/6]

instant ( word &&  timeName)
explicit

Move construct from timeName, parsing timeName for a value.

Definition at line 55 of file instant.C.

References Instant< word >::name(), and Instant< word >::value().

Here is the call graph for this function:

Member Function Documentation

◆ operator=() [1/2]

instant & operator= ( const instant )
default

Copy assignment.

◆ operator=() [2/2]

instant & operator= ( instant &&  )
default

Move assignment.

Member Data Documentation

◆ typeName

const char *const typeName = "instant"
static

The type name (eg, for pTraits)

Definition at line 62 of file instant.H.


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