Data Structures | Public Member Functions | Static Public Attributes | Private Attributes | Friends
instant Class Reference

An instant of time. Contains the time value and name. More...

Collaboration diagram for instant:
Collaboration graph
[legend]

Data Structures

class  less
 Less function class used in sorting instants. More...
 

Public Member Functions

 instant ()
 Construct null. More...
 
 instant (const scalar, const word &)
 Construct from components. More...
 
 instant (const scalar)
 Construct from time value. More...
 
 instant (const word &)
 Construct from word. More...
 
scalar value () const
 Value (const access) More...
 
scalar & value ()
 Value (non-const access) More...
 
const wordname () const
 Name (const access) More...
 
wordname ()
 Name (non-const access) More...
 
bool equal (const scalar) const
 Comparison used for instants to be equal. More...
 

Static Public Attributes

static const char *const typeName = "instant"
 

Private Attributes

scalar value_
 
word name_
 

Friends

bool operator== (const instant &, const instant &)
 
bool operator!= (const instant &, const instant &)
 
Istreamoperator>> (Istream &, instant &)
 
Ostreamoperator<< (Ostream &, const instant &)
 

Detailed Description

An instant of time. Contains the time value and name.

Source files

Definition at line 64 of file instant.H.

Constructor & Destructor Documentation

◆ instant() [1/4]

instant ( )

Construct null.

Definition at line 35 of file instant.C.

◆ instant() [2/4]

instant ( const scalar  val,
const word tname 
)

Construct from components.

Definition at line 38 of file instant.C.

◆ instant() [3/4]

instant ( const scalar  val)
explicit

Construct from time value.

Definition at line 44 of file instant.C.

◆ instant() [4/4]

instant ( const word tname)
explicit

Construct from word.

Definition at line 50 of file instant.C.

Member Function Documentation

◆ value() [1/2]

scalar value ( ) const
inline

Value (const access)

Definition at line 112 of file instant.H.

References instant::value_.

Referenced by instant::less::operator()(), timeSelector::selected(), and Time::setTime().

Here is the caller graph for this function:

◆ value() [2/2]

scalar& value ( )
inline

Value (non-const access)

Definition at line 118 of file instant.H.

References instant::value_.

◆ name() [1/2]

const word& name ( ) const
inline

Name (const access)

Definition at line 124 of file instant.H.

References instant::name_.

Referenced by Time::setTime().

Here is the caller graph for this function:

◆ name() [2/2]

word& name ( )
inline

Name (non-const access)

Definition at line 130 of file instant.H.

References instant::name_.

◆ equal()

bool equal ( const scalar  b) const

Comparison used for instants to be equal.

Definition at line 59 of file instant.C.

References Foam::constant::physicoChemical::b.

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

Here is the caller graph for this function:

Friends And Related Function Documentation

◆ operator==

bool operator== ( const instant ,
const instant  
)
friend

◆ operator!=

bool operator!= ( const instant ,
const instant  
)
friend

◆ operator>>

Istream& operator>> ( Istream ,
instant  
)
friend

◆ operator<<

Ostream& operator<< ( Ostream ,
const instant  
)
friend

Field Documentation

◆ value_

scalar value_
private

Definition at line 68 of file instant.H.

Referenced by instant::value().

◆ name_

word name_
private

Definition at line 69 of file instant.H.

Referenced by instant::name().

◆ typeName

const char *const typeName = "instant"
static

Definition at line 89 of file instant.H.


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