#include <acstimeDurationHelper.h>
List of all members.
Detailed Description
DurationHelper is derived from TimeUtil and provides the developer with an easy means of manipulating Durations (difference in time between two epochs).
TODO:
- doxygen comments for private methods. These were taken directly from the Control subsystem without any modifications.
Constructor & Destructor Documentation
DurationHelper::DurationHelper |
( |
const acstime::Duration & |
duration |
) |
|
Constructor
- Parameters:
-
| duration | Duration this helper class will utilize. |
DurationHelper::DurationHelper |
( |
|
) |
|
DurationHelper::DurationHelper |
( |
long double |
seconds |
) |
|
Constructor
- Parameters:
-
| MJDSeconds | Modified Julian Date in seconds this helper class is based on. |
DurationHelper::DurationHelper |
( |
const ACS::TimeInterval & |
duration |
) |
|
Constructor
- Parameters:
-
| duration | Time interval this helper class will utilize. |
virtual DurationHelper::~DurationHelper |
( |
|
) |
[inline, virtual] |
Destructor - nothing to delete!
Member Function Documentation
void DurationHelper::add |
( |
const acstime::Duration & |
duration |
) |
|
Adds the given Duration to this Duration.
- Parameters:
-
| duration | Duration to be added |
- Exceptions:
-
| ACSTimeError::OverflowOrUnderflowExImpl |
|
acstime::TimeComparison DurationHelper::compare |
( |
const acstime::Duration & |
duration |
) |
|
Compares this Duration with the given Duration and returns the relation.
DWF-should this be replaced completely by operators? ? ?
- Parameters:
-
| duration | Duration to be compared
|
CORBA::Long DurationHelper::day |
( |
|
) |
|
Returns the current value of the day.
- Returns:
- day
void DurationHelper::day |
( |
const CORBA::Long & |
|
) |
|
Sets the current value of the day.
- Parameters:
-
void DurationHelper::divide |
( |
const CORBA::ULong & |
divider |
) |
|
Divides this Duration by the given integer value.
- Parameters:
-
| divider | divide duration by this value
|
void DurationHelper::fromString |
( |
const char * |
duration |
) |
|
Sets this Duration's value from the given String.
- Parameters:
-
| duration | use this duration to set object's value |
- Exceptions:
-
| ACSTimeError::ArgErrorExImpl |
|
CORBA::Long DurationHelper::hour |
( |
|
) |
|
Returns the current value of the hour.
- Returns:
- hour
void DurationHelper::hour |
( |
const CORBA::Long & |
|
) |
|
Sets the current value of the hour.
- Parameters:
-
void DurationHelper::m_microSec |
( |
std::ostringstream & |
|
) |
[private] |
void DurationHelper::m_toAttributes |
( |
|
) |
[private] |
void DurationHelper::m_toValue |
( |
|
) |
[private] |
- Exceptions:
-
| ACSTimeError::OverflowOrUnderflowExImpl | |
void DurationHelper::microSecond |
( |
const CORBA::ULong & |
|
) |
|
Sets the current value of the microsecond.
- Parameters:
-
CORBA::ULong DurationHelper::microSecond |
( |
|
) |
|
Returns the current value of the microsecond.
- Returns:
- microsecond
CORBA::Long DurationHelper::minute |
( |
|
) |
|
Returns the current value of the minute.
- Returns:
- minute
void DurationHelper::minute |
( |
const CORBA::Long & |
|
) |
|
Sets the current value of the minute.
- Parameters:
-
void DurationHelper::modulo |
( |
const acstime::Duration & |
duration |
) |
|
Modulos this Duration by the given Duration.
- Parameters:
-
| duration | modulo duration by this Duration
|
void DurationHelper::multiply |
( |
const CORBA::ULong & |
multiplier |
) |
|
Multiplies this Duration by the integer value.
- Parameters:
-
| multiplier | multiply duration by this value |
- Exceptions:
-
| ACSTimeError::OverflowOrUnderflowExImpl |
|
CORBA::Boolean DurationHelper::normalize |
( |
|
) |
|
Returns the Normalize or out-of-range flag.
When this flag is set FALSE the interface causes an exception when any out-of-range attribute value is set. normalize is set to FALSE initially and after a reset().
When this flag is set TRUE the interface accepts out-of-range values for hour, minute, second, or microSecond. An out-of-range value causes all attributes to be normalized.
- Returns:
- bool
void DurationHelper::normalize |
( |
const CORBA::Boolean & |
|
) |
|
Sets the Normalize or out-of-range flag.
When this flag is set FALSE the interface causes an exception when any out-of-range attribute value is set. normalize is set to FALSE initially and after a reset().
When this flag is set TRUE the interface accepts out-of-range values for hour, minute, second, or microSecond. An out-of-range value causes all attributes to be normalized.
- Parameters:
-
DurationHelper& DurationHelper::operator%= |
( |
const acstime::Duration & |
duration |
) |
|
Modulos this Duration by the given Duration.
- Parameters:
-
| duration | modulo duration by this Duration
|
DurationHelper& DurationHelper::operator*= |
( |
const CORBA::ULong & |
multiplier |
) |
|
Multiplies this Duration by the integer value.
- Parameters:
-
| multiplier | multiply duration by this value
|
DurationHelper& DurationHelper::operator+= |
( |
const acstime::Duration & |
duration |
) |
|
Adds the given Duration to this Duration.
- Parameters:
-
| duration | Duration to be added
|
DurationHelper& DurationHelper::operator-= |
( |
const acstime::Duration & |
duration |
) |
|
Subtracts the given Duration from this Duration.
- Parameters:
-
| duration | Duration to be subtracted
|
DurationHelper& DurationHelper::operator/= |
( |
const CORBA::ULong & |
divider |
) |
|
Divides this Duration by the given integer value.
- Parameters:
-
| divider | divide duration by this value
|
CORBA::Boolean DurationHelper::operator< |
( |
const acstime::Duration & |
duration |
) |
const |
CORBA::Boolean DurationHelper::operator<= |
( |
const acstime::Duration & |
duration |
) |
const |
CORBA::Boolean DurationHelper::operator== |
( |
const acstime::Duration & |
duration |
) |
const |
CORBA::Boolean DurationHelper::operator> |
( |
const acstime::Duration & |
duration |
) |
const |
CORBA::Boolean DurationHelper::operator>= |
( |
const acstime::Duration & |
duration |
) |
const |
void DurationHelper::positive |
( |
const CORBA::Boolean & |
|
) |
|
Sets Duration's sign, TRUE => positive, FALSE => negative. positive is set TRUE initially and after a reset()..
- Parameters:
-
CORBA::Boolean DurationHelper::positive |
( |
|
) |
|
Returns Duration's sign, TRUE => positive, FALSE => negative. positive is set TRUE initially and after a reset().
- Returns:
- bool
void DurationHelper::reset |
( |
|
) |
|
Sets all numeral attributes to zero, and normalize to FALSE. This facilities reuse of the object.
CORBA::Long DurationHelper::second |
( |
|
) |
|
Returns the current value of the second.
- Returns:
- second
void DurationHelper::second |
( |
const CORBA::Long & |
|
) |
|
Sets the current value of the second.
- Parameters:
-
void DurationHelper::subtract |
( |
const acstime::Duration & |
duration |
) |
|
Subtracts the given Duration from this Duration.
- Parameters:
-
| duration | Duration to be subtracted |
- Exceptions:
-
| ACSTimeError::OverflowOrUnderflowExImpl |
|
long double DurationHelper::toSeconds |
( |
|
) |
|
Returns this Duration's value as the equivalent value in seconds (fractional).
- Note:
- This method was requested by CORR but there was no request to take the values of the array2TAI and TAI2UTC properties into account.
- Returns:
- The underlying acstime::Duration of this helper class converted to seconds (precision up to microseconds? ? ?).
std::string DurationHelper::toString |
( |
const char * |
format |
) |
|
Returns this Duration's value as a String.
- Parameters:
-
| format | format for the output string |
- Returns:
- object's value as equivalent string
- Exceptions:
-
| ACSTimeError::ArgErrorExImpl |
|
acstime::Duration DurationHelper::value |
( |
|
) |
|
Returns the current value of the Duration.
- Returns:
- Duration
void DurationHelper::value |
( |
long double |
seconds |
) |
|
Sets the current value of the Duration.
- Parameters:
-
void DurationHelper::value |
( |
const ACS::TimeInterval & |
duration |
) |
|
Sets the current value of the Duration.
- Parameters:
-
void DurationHelper::value |
( |
const acstime::Duration & |
duration |
) |
|
Sets the current value of the Duration.
- Parameters:
-
Member Data Documentation
The documentation for this class was generated from the following file: