World Ocean Simulation System (WOSS) library
time-definitions.h File Reference

Definitions and library for woss::Time, woss::SimTime, woss::TimeReference and woss::TimeReferenceTcl classes. More...

Go to the source code of this file.

Classes

class  woss::TimeReference
 Class for simulation time reference purposes. More...
 
class  woss::Time
 a class for time date manipulation More...
 
struct  woss::SimTime
 Struct that stores start and end Time. More...
 

Functions

double woss::operator- (const Time &left, const Time &right)
 
bool woss::operator== (const Time &left, const Time &right)
 
bool woss::operator!= (const Time &left, const Time &right)
 
bool woss::operator> (const Time &left, const Time &right)
 
bool woss::operator< (const Time &left, const Time &right)
 
bool woss::operator<= (const Time &left, const Time &right)
 
bool woss::operator>= (const Time &left, const Time &right)
 
std::ostream & woss::operator<< (std::ostream &os, const Time &time)
 
const Time woss::operator+ (const Time &left, const time_t right)
 
const Time woss::operator- (const Time &left, const time_t right)
 
Timewoss::operator+= (Time &left, time_t right)
 
Timewoss::operator-= (Time &left, time_t right)
 

Detailed Description

Definitions and library for woss::Time, woss::SimTime, woss::TimeReference and woss::TimeReferenceTcl classes.

Author
Federico Guerra

Definitions and library for woss::Time, woss::SimTime, woss::TimeReference and woss::TimeReferenceTcl classes

Function Documentation

◆ operator!=()

bool woss::operator!= ( const Time left,
const Time right 
)
inline

Inequality operator

Parameters
leftleft operand const reference
rightright operand const reference
Returns
true if left != right, false otherwise

◆ operator+()

const Time woss::operator+ ( const Time left,
const time_t  right 
)
inline

Sum operator

Parameters
leftleft operand const reference
rightright operand const reference
Returns
a new const instance holding the operation result

◆ operator+=()

Time & woss::operator+= ( Time left,
time_t  right 
)

Compound assignment sum operator

Parameters
leftleft operand reference
rightright operand const time_t representing seconds
Returns
left reference after the operation

References woss::operator+=(), woss::Time::raw_time, and woss::Time::timeinfo.

Here is the call graph for this function:

◆ operator-() [1/2]

double woss::operator- ( const Time left,
const Time right 
)

Subtraction operator

Parameters
leftleft operand const reference
rightright operand const reference
Returns
time difference in seconds

References woss::operator-(), and woss::Time::timeinfo.

Here is the call graph for this function:

◆ operator-() [2/2]

const Time woss::operator- ( const Time left,
const time_t  right 
)
inline

Subtraction operator

Parameters
leftleft operand const reference
rightright operand const reference
Returns
a new const instance holding the operation result

◆ operator-=()

Time & woss::operator-= ( Time left,
time_t  right 
)

Compound assignment subtraction operator

Parameters
leftleft operand reference
rightright operand const time_t representing seconds
Returns
left reference after the operation

References woss::operator-=(), woss::Time::raw_time, and woss::Time::timeinfo.

Here is the call graph for this function:

◆ operator<()

bool woss::operator< ( const Time left,
const Time right 
)
inline

Less than operator

Parameters
leftleft operand const reference
rightright operand const reference
Returns
true if left < right, false otherwise

◆ operator<=()

bool woss::operator<= ( const Time left,
const Time right 
)
inline

Less than or equal to operator

Parameters
leftleft operand const reference
rightright operand const reference
Returns
true if left <= right, false otherwise

◆ operator==()

bool woss::operator== ( const Time left,
const Time right 
)
inline

Equality operator

Parameters
leftleft operand const reference
rightright operand const reference
Returns
true if left == right, false otherwise

◆ operator>()

bool woss::operator> ( const Time left,
const Time right 
)
inline

Greater than operator

Parameters
leftleft operand const reference
rightright operand const reference
Returns
true if left > right, false otherwise

◆ operator>=()

bool woss::operator>= ( const Time left,
const Time right 
)
inline

Greater than or equal to operator

Parameters
leftleft operand const reference
rightright operand const reference
Returns
true if left >= right, false otherwise