GammaLib  2.1.0.dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GTime.hpp File Reference

Time class interface definition. More...

#include <string>
#include "GBase.hpp"
#include "GTools.hpp"
#include "GTimeReference.hpp"

Go to the source code of this file.

Classes

class  GTime
 Time class. More...
 

Functions

GTime operator+ (const GTime &time, const double &seconds)
 Add seconds to time. More...
 
GTime operator+ (const double &seconds, const GTime &time)
 Add seconds to time. More...
 
GTime operator- (const GTime &time, const double &seconds)
 Subtract seconds from time. More...
 
double operator- (const GTime &a, const GTime &b)
 Subtract times. More...
 
bool operator== (const GTime &a, const GTime &b)
 Check if times are equal. More...
 
bool operator!= (const GTime &a, const GTime &b)
 Check if times are not equal. More...
 
bool operator< (const GTime &a, const GTime &b)
 Check if time is smaller than other time. More...
 
bool operator<= (const GTime &a, const GTime &b)
 Check if time is smaller than or equal to other time. More...
 
bool operator> (const GTime &a, const GTime &b)
 Check if time is larger than other time. More...
 
bool operator>= (const GTime &a, const GTime &b)
 Check if time is larger than or equal to other time. More...
 

Detailed Description

Time class interface definition.

Author
Juergen Knoedlseder

Definition in file GTime.hpp.

Function Documentation

bool operator!= ( const GTime a,
const GTime b 
)
inline

Check if times are not equal.

Parameters
[in]aFirst time.
[in]bSecond time.
Returns
True if a is not equal to b.

Definition at line 356 of file GTime.hpp.

References GTime::m_time.

GTime operator+ ( const GTime time,
const double &  seconds 
)
inline

Add seconds to time.

Parameters
[in]timeTime.
[in]secondsSeconds.
Returns
Time.

Adds seconds to the time.

Definition at line 274 of file GTime.hpp.

References GTime::m_time.

GTime operator+ ( const double &  seconds,
const GTime time 
)
inline

Add seconds to time.

Parameters
[in]secondsSeconds.
[in]timeTime.
Returns
Time.

Adds seconds to the time.

Definition at line 292 of file GTime.hpp.

References GTime::m_time.

GTime operator- ( const GTime time,
const double &  seconds 
)
inline

Subtract seconds from time.

Parameters
[in]timeTime.
[in]secondsSeconds.
Returns
Time.

Subtracts seconds from the time.

Definition at line 310 of file GTime.hpp.

References GTime::m_time.

double operator- ( const GTime a,
const GTime b 
)
inline

Subtract times.

Parameters
[in]aFirst time.
[in]bSecond time.
Returns
Time difference in seconds.

Subtracts time b from time a and returns the difference in seconds.

Definition at line 328 of file GTime.hpp.

References GTime::m_time.

bool operator< ( const GTime a,
const GTime b 
)
inline

Check if time is smaller than other time.

Parameters
[in]aFirst time.
[in]bSecond time.
Returns
True if a is smaller than b.

Definition at line 370 of file GTime.hpp.

References GTime::m_time.

bool operator<= ( const GTime a,
const GTime b 
)
inline

Check if time is smaller than or equal to other time.

Parameters
[in]aFirst time.
[in]bSecond time.
Returns
True if a is smaller than or equal to b.

Definition at line 384 of file GTime.hpp.

References GTime::m_time.

bool operator== ( const GTime a,
const GTime b 
)
inline

Check if times are equal.

Parameters
[in]aFirst time.
[in]bSecond time.
Returns
True if a equals b.

Definition at line 342 of file GTime.hpp.

References GTime::m_time.

bool operator> ( const GTime a,
const GTime b 
)
inline

Check if time is larger than other time.

Parameters
[in]aFirst time.
[in]bSecond time.
Returns
True if a is larger than b.

Definition at line 398 of file GTime.hpp.

References GTime::m_time.

bool operator>= ( const GTime a,
const GTime b 
)
inline

Check if time is larger than or equal to other time.

Parameters
[in]aFirst time.
[in]bSecond time.
Returns
True if a is larger than or equal to b.

Definition at line 412 of file GTime.hpp.

References GTime::m_time.