GammaLib  1.7.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 "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 325 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 243 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 261 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 279 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 297 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 339 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 353 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 311 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 367 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 381 of file GTime.hpp.

References GTime::m_time.