libtime++: Date and time calculation
libtime::TRelativeTime Class Reference

class to contain relative times More...

#include <libtime++.h>

Inheritance diagram for libtime::TRelativeTime:
Collaboration diagram for libtime::TRelativeTime:

Public Member Functions

 TRelativeTime (const std::string &Itimestring)
 
 TRelativeTime (const char *Itimestring)
 
 TRelativeTime (const time_kernel::time_Ts &Itime_Ts)
 
 TRelativeTime (const int &days=0, const int &hour=0, const int &minute=0, const int &second=0, const int &milsec=0, const int &micsec=0)
 
timeint days () const
 
std::string hierarchicalstring () const
 
void nfit (const TRelativeTime &delta, timeint &n, TRelativeTime &full) const
 
void div (const timeint &n, TRelativeTime &frac, timeint &rest) const
 
bool operator== (const TRelativeTime &A) const
 
bool operator!= (const TRelativeTime &A) const
 
bool operator<= (const TRelativeTime &A) const
 
bool operator>= (const TRelativeTime &A) const
 
bool operator< (const TRelativeTime &A) const
 
bool operator> (const TRelativeTime &A) const
 
TRelativeTimeoperator+= (const TRelativeTime &A)
 
TRelativeTimeoperator-= (const TRelativeTime &A)
 
TRelativeTime operator+ (const TRelativeTime &A) const
 
TRelativeTime operator- (const TRelativeTime &A) const
 
TAbsoluteTime operator+ (TAbsoluteTime A) const
 
TAbsoluteTime operator- (TAbsoluteTime A) const
 
TRelativeTimeoperator*= (const timeint &n)
 
TRelativeTimeoperator/= (const timeint &n)
 
TRelativeTimeoperator%= (const timeint &n)
 
TRelativeTime operator* (const timeint &n) const
 
TRelativeTime operator/ (const timeint &n) const
 
TRelativeTime operator% (const timeint &n) const
 
timeint operator/ (const TRelativeTime &A) const
 
TRelativeTime operator% (const TRelativeTime &A) const
 
TRelativeTimeoperator= (const time_kernel::time_Ts &A)
 
TRelativeTimeoperator= (const std::string &timestring)
 
TRelativeTimeoperator= (const char *timestring)
 
std::string timestring () const
 
timeint hour () const
 
timeint minute () const
 
timeint second () const
 
timeint milsec () const
 
timeint micsec () const
 
double float_second () const
 
 operator time_kernel::time_Ts () const
 
 operator std::string () const
 

Protected Member Functions

void string_read (const std::string &timestring)
 
void char_read (const char *timestring)
 
void norm ()
 

Protected Attributes

time_kernel::time_Ts Mtime_Ts
 

Friends

class TAbsoluteTime
 

Detailed Description

class to contain relative times

For time differences only positive values are accepted. Accidentally the library appears to handle negative value too. However, since the underlying Fortran code is designed to handle positive values only, functions should throw an exception upon negative values being passed.

Definition at line 201 of file libtime++.h.


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