Simple++
Powerfull and lightning fast C++ Library
Public Member Functions | List of all members
Time::Duration< ratio > Class Template Reference

Class representing a time duration, ratio fractional number representing the number of seconds of one unit in this object. More...

#include <Duration.h>

Public Member Functions

 Duration ()
 
template<class ratio2 >
 Duration (const Duration< ratio2 > &d)
 
 Duration (TimeT d)
 
 Duration (const Tick &ticks)
 
template<class ratio2 >
bool operator== (const Duration< ratio2 > &d) const
 
template<class ratio2 >
bool operator!= (const Duration< ratio2 > &d) const
 
template<class ratio2 >
bool operator>= (const Duration< ratio2 > &d) const
 
template<class ratio2 >
bool operator<= (const Duration< ratio2 > &d) const
 
template<class ratio2 >
bool operator< (const Duration< ratio2 > &d) const
 
template<class ratio2 >
bool operator> (const Duration< ratio2 > &d) const
 
bool operator== (TimeT d) const
 
bool operator!= (TimeT d) const
 
bool operator>= (TimeT d) const
 
bool operator<= (TimeT d) const
 
bool operator< (TimeT d) const
 
bool operator> (TimeT d) const
 
template<class ratio2 >
Duration< ratio > & operator= (const Duration< ratio2 > &d)
 
template<class ratio2 >
Duration< ratio > & operator+= (const Duration< ratio2 > &d)
 
template<class ratio2 >
Duration< ratio > & operator-= (const Duration< ratio2 > &d)
 
Duration< ratio > & operator= (TimeT d)
 
Duration< ratio > & operator+= (TimeT d)
 
Duration< ratio > & operator-= (TimeT d)
 
template<typename T >
Duration< ratio > & operator*= (const T &d)
 
template<typename T >
Duration< ratio > & operator/= (const T &d)
 
unsigned long long getMilliSeconds () const
 get the number of milliseconds of this duration More...
 
unsigned long long getSeconds () const
 get the number of seconds of this duration More...
 
unsigned long long getMinutes () const
 get the number of Minutes of this duration More...
 
unsigned long long getHours () const
 get the number of Hours of this duration More...
 
unsigned long long getDays () const
 get the number of Days of this duration More...
 
TimeT getValue () const
 Get the value of this duration without any conversion. More...
 

Detailed Description

template<class ratio = Math::Ratio<1, 1>>
class Time::Duration< ratio >

Class representing a time duration, ratio fractional number representing the number of seconds of one unit in this object.

Constructor & Destructor Documentation

template<class ratio >
Time::Duration< ratio >::Duration ( )
template<class ratio >
template<class ratio2 >
Time::Duration< ratio >::Duration ( const Duration< ratio2 > &  d)
template<class ratio >
Time::Duration< ratio >::Duration ( TimeT  d)
template<class ratio >
Time::Duration< ratio >::Duration ( const Tick ticks)

Member Function Documentation

template<class ratio >
unsigned long long Time::Duration< ratio >::getDays ( ) const

get the number of Days of this duration

Returns
duration in days
template<class ratio >
unsigned long long Time::Duration< ratio >::getHours ( ) const

get the number of Hours of this duration

Returns
hours
template<class ratio >
unsigned long long Time::Duration< ratio >::getMilliSeconds ( ) const

get the number of milliseconds of this duration

Returns
duration in milliseconds
template<class ratio >
unsigned long long Time::Duration< ratio >::getMinutes ( ) const

get the number of Minutes of this duration

Returns
minutes
template<class ratio >
unsigned long long Time::Duration< ratio >::getSeconds ( ) const

get the number of seconds of this duration

Returns
seconds
template<class ratio >
TimeT Time::Duration< ratio >::getValue ( ) const

Get the value of this duration without any conversion.

Returns
number of unit of time of this duration
template<class ratio >
template<class ratio2 >
bool Time::Duration< ratio >::operator!= ( const Duration< ratio2 > &  d) const
template<class ratio >
bool Time::Duration< ratio >::operator!= ( TimeT  d) const
template<class ratio >
template<typename T >
Duration< ratio > & Time::Duration< ratio >::operator*= ( const T &  d)
template<class ratio >
template<class ratio2 >
Duration< ratio > & Time::Duration< ratio >::operator+= ( const Duration< ratio2 > &  d)
template<class ratio >
Duration< ratio > & Time::Duration< ratio >::operator+= ( TimeT  d)
template<class ratio >
template<class ratio2 >
Duration< ratio > & Time::Duration< ratio >::operator-= ( const Duration< ratio2 > &  d)
template<class ratio >
Duration< ratio > & Time::Duration< ratio >::operator-= ( TimeT  d)
template<class ratio >
template<typename T >
Duration< ratio > & Time::Duration< ratio >::operator/= ( const T &  d)
template<class ratio >
template<class ratio2 >
bool Time::Duration< ratio >::operator< ( const Duration< ratio2 > &  d) const
template<class ratio >
bool Time::Duration< ratio >::operator< ( TimeT  d) const
template<class ratio >
template<class ratio2 >
bool Time::Duration< ratio >::operator<= ( const Duration< ratio2 > &  d) const
template<class ratio >
bool Time::Duration< ratio >::operator<= ( TimeT  d) const
template<class ratio >
template<class ratio2 >
Duration< ratio > & Time::Duration< ratio >::operator= ( const Duration< ratio2 > &  d)
template<class ratio >
Duration< ratio > & Time::Duration< ratio >::operator= ( TimeT  d)
template<class ratio >
template<class ratio2 >
bool Time::Duration< ratio >::operator== ( const Duration< ratio2 > &  d) const
template<class ratio >
bool Time::Duration< ratio >::operator== ( TimeT  d) const
template<class ratio >
template<class ratio2 >
bool Time::Duration< ratio >::operator> ( const Duration< ratio2 > &  d) const
template<class ratio >
bool Time::Duration< ratio >::operator> ( TimeT  d) const
template<class ratio >
template<class ratio2 >
bool Time::Duration< ratio >::operator>= ( const Duration< ratio2 > &  d) const
template<class ratio >
bool Time::Duration< ratio >::operator>= ( TimeT  d) const

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