sttcl
v0.9c
STTCL C++ template state machine framework
|
#include <SttclTime.h>
Public Types | |
typedef Implementation::NativeTimeDuration | NativeTimeDuration |
Public Member Functions | |
TimeDuration (unsigned int argHours=0, unsigned int argMinutes=0, unsigned int argSeconds=0, unsigned int argMilliSeconds=0, unsigned long argMicroSeconds=0, unsigned long argNanoSeconds=0) | |
TimeDuration (const TimeDuration< Implementation > &rhs) | |
TimeDuration (const NativeTimeDuration &nativeTimeDuration) | |
~TimeDuration () | |
TimeDuration< Implementation > & | operator= (const TimeDuration< Implementation > &rhs) |
TimeDuration< Implementation > & | operator= (const NativeTimeDuration &nativeTimeDuration) |
bool | operator== (const TimeDuration< Implementation > &rhs) const |
bool | operator!= (const TimeDuration< Implementation > &rhs) const |
bool | operator< (const TimeDuration< Implementation > &rhs) const |
bool | operator<= (const TimeDuration< Implementation > &rhs) const |
bool | operator> (const TimeDuration< Implementation > &rhs) const |
bool | operator>= (const TimeDuration< Implementation > &rhs) const |
TimeDuration< Implementation > & | operator+= (const TimeDuration< Implementation > &rhs) |
TimeDuration< Implementation > & | operator-= (const TimeDuration< Implementation > &rhs) |
TimeDuration< Implementation > & | operator*= (int factor) |
TimeDuration< Implementation > & | operator/= (int divider) |
long | hours () const |
long | minutes () const |
long | seconds () const |
long | milliseconds () const |
long | microseconds () const |
long | nanoseconds () const |
void | hours (int newHours) |
void | minutes (int newMinutes) |
void | seconds (int newSeconds) |
const NativeTimeDuration & | getNativeValue () const |
Static Public Attributes | |
static const TimeDuration < Implementation > | Zero = sttcl::TimeDuration<Implementation>() |
Adapter class for a (OS-)specific "real"-time duration representation implementation.
Implementation | Selects a (OS-)specific "real"-time duration representation implementation. |
typedef Implementation::NativeTimeDuration sttcl::TimeDuration< Implementation >::NativeTimeDuration |
The class type of the native "real"-time duration representation.
|
inline |
Constructor for class TimeDuration.
argHours | The hours represented in this instance. |
argMinutes | The minutes represented in this instance. |
argSeconds | The seconds represented in this instance. |
argMilliSeconds | The milliseconds represented in this instance. |
argMicroSeconds | The microseconds represented in this instance. |
argNanoSeconds | The nanoseconds represented in this instance. |
|
inline |
Copy constructor for class TimeDuration.
rhs | Another instance of TimeDuration. |
|
inline |
Constructor for class TimeDuration.
nativeTimeDuration | An instance of the NativeTimeDuration value. |
|
inline |
Destructor for class TimeDuration.
|
inline |
Sets the milliseconds represented in this instance. Sets the microseconds represented in this instance. Sets the nanoseconds represented in this instance. Gets the native "real"-time duration representation.
|
inline |
Gets the hours represented in this instance.
|
inline |
Sets the hours represented in this instance.
|
inline |
Gets the microseconds represented in this instance.
|
inline |
Gets the milliseconds represented in this instance.
|
inline |
Gets the minutes represented in this instance.
|
inline |
Sets the minutes represented in this instance.
|
inline |
Gets the nanoseconds represented in this instance.
|
inline |
Inequality comparison operator for class TimeDuration.
rhs | Another instance of TimeDuration. |
true
if rhs time duration doesn't equal this instance, false
otherwise.
|
inline |
Multiplies the time duration from of this instance with factor.
factor | The multiplication factor. |
|
inline |
Adds the rhs time duration to this instance.
rhs | Another instance of TimeDuration. |
|
inline |
Substracts the rhs time duration from this instance.
rhs | Another instance of TimeDuration. |
|
inline |
Divides the time duration from of this instance by divider.
divider | The divider. |
|
inline |
Less comparison operator for class TimeDuration.
rhs | Another instance of TimeDuration. |
true
if rhs time duration is less than this instance, false
otherwise.
|
inline |
Less or equality comparison operator for class TimeDuration.
rhs | Another instance of TimeDuration. |
true
if rhs time duration is less than or equals this instance, false
otherwise.
|
inline |
Assignment operator for class TimeDuration.
rhs | Another instance of TimeDuration. |
|
inline |
Assignment operator for class TimeDuration.
nativeTimeDuration | An instance of the NativeTimeDuration value. |
|
inline |
Equality comparison operator for class TimeDuration.
rhs | Another instance of TimeDuration. |
true
if rhs time duration equals this instance, false
otherwise.
|
inline |
Greater comparison operator for class TimeDuration.
rhs | Another instance of TimeDuration. |
true
if rhs time duration is greater than this instance, false
otherwise.
|
inline |
Greater or equality comparison operator for class TimeDuration.
rhs | Another instance of TimeDuration. |
true
if rhs time duration is greater than or equals this instance, false
otherwise.
|
inline |
Gets the seconds represented in this instance.
|
inline |
Sets the seconds represented in this instance.
|
static |
Represents a zero time duration.