#include <acstimeEpochHelper.h>


Public Member Functions | |
| EpochHelper (const acstime::Epoch &epoch) | |
| EpochHelper () | |
| EpochHelper (long double MJDSeconds) | |
| EpochHelper (const ACS::Time &value) | |
| virtual | ~EpochHelper () |
| acstime::Epoch | value () |
| void | value (const acstime::Epoch &epoch) |
| void | value (const ACS::Time &epoch) |
| void | value (long double MJDSeconds) |
| CORBA::ULong | year () |
| void | year (const CORBA::ULong &) |
| CORBA::Long | month () |
| void | month (const CORBA::Long &) |
| CORBA::Long | day () |
| void | day (const CORBA::Long &) |
| CORBA::Long | dayOfYear () |
| void | dayOfYear (const CORBA::Long &) |
| CORBA::ULong | dayOfWeek () |
| CORBA::Long | hour () |
| void | hour (const CORBA::Long &) |
| CORBA::Long | minute () |
| void | minute (const CORBA::Long &) |
| CORBA::Long | second () |
| void | second (const CORBA::Long &) |
| CORBA::Long | microSecond () |
| void | microSecond (const CORBA::Long &) |
| CORBA::Boolean | normalize () |
| void | normalize (const CORBA::Boolean &) |
| void | reset () |
| acstime::TimeComparison | compare (const acstime::Epoch &epoch) |
| CORBA::Boolean | operator== (const acstime::Epoch &epoch) const |
| CORBA::Boolean | operator<= (const acstime::Epoch &epoch) const |
| CORBA::Boolean | operator< (const acstime::Epoch &epoch) const |
| CORBA::Boolean | operator>= (const acstime::Epoch &epoch) const |
| CORBA::Boolean | operator> (const acstime::Epoch &epoch) const |
| void | add (const acstime::Duration &) |
| EpochHelper & | operator+= (const acstime::Duration &duration) |
| void | subtract (const acstime::Duration &) |
| EpochHelper & | operator-= (const acstime::Duration &duration) |
| acstime::Duration | difference (const acstime::Epoch &subtrahend) |
| void | modulo (const acstime::Epoch &epoch) |
| EpochHelper & | operator%= (const acstime::Epoch &epoch) |
| CORBA::Double | toUTCdate (CORBA::Long array2TAI, CORBA::Long TAI2UTC) |
| long double | toMJDseconds () |
| CORBA::Double | toJulianYear (CORBA::Long array2TAI, CORBA::Long TAI2UTC) |
| std::string | toString (acstime::TimeSystem, const char *, const CORBA::Long array2TAI, const CORBA::Long TAI2UTC) |
| void | fromString (acstime::TimeSystem, const char *) |
Private Member Functions | |
| void | m_toValue (CORBA::Boolean booVal) |
| void | m_toAttributes () |
| long | m_calcLeap () |
| void | m_almostUnix (std::ostringstream &) |
| void | m_iso8601date (std::ostringstream &) |
| void | m_iso8601full (std::ostringstream &) |
| void | m_abbrevMonth (std::ostringstream &) |
| void | m_abbrevWeekday (std::ostringstream &) |
| void | m_microSec (std::ostringstream &, int) |
| EpochHelper (const EpochHelper &) | |
| void | operator= (const EpochHelper &) |
Private Attributes | |
| acstime::Epoch | value_m |
| CORBA::ULong | year_m |
| CORBA::Long | month_m |
| CORBA::Long | day_m |
| CORBA::Long | day_mOfYear |
| CORBA::ULong | dayOfWeek_m |
| CORBA::Long | hour_m |
| CORBA::Long | minute_m |
| CORBA::Long | second_m |
| CORBA::Long | microSecond_m |
| CORBA::Boolean | normalize_m |
Friends | |
| DurationHelper * | operator% (const EpochHelper &, const ACS::TimeInterval &) |
| DurationHelper * | operator% (const ACS::TimeInterval &, const EpochHelper &) |
EpochHelper is derived from TimeUtil and provides the developer with an easy means of manipulating ACS Epochs (unique instance in time defined as a structure in acstime.idl).
TODO:
| EpochHelper::EpochHelper | ( | const acstime::Epoch & | epoch | ) |
Constructor
| epoch | Epoch this helper class is based on. |
| EpochHelper::EpochHelper | ( | ) |
Standard constructor
| EpochHelper::EpochHelper | ( | long double | MJDSeconds | ) |
Constructor
| MJDSeconds | Modified Julian Date in seconds this helper class is based on. |
| EpochHelper::EpochHelper | ( | const ACS::Time & | value | ) |
Constructor
| value | Epoch in time this helper class is based on. |
| virtual EpochHelper::~EpochHelper | ( | ) | [inline, virtual] |
Destructor - nothing to delete!
| EpochHelper::EpochHelper | ( | const EpochHelper & | ) | [private] |
copy not allowed
| void EpochHelper::add | ( | const acstime::Duration & | ) |
| acstime::TimeComparison EpochHelper::compare | ( | const acstime::Epoch & | epoch | ) |
| void EpochHelper::day | ( | const CORBA::Long & | ) |
Sets the current value of the day.
| day |
|
| CORBA::Long EpochHelper::day | ( | ) |
Returns the current value of the day.
| CORBA::ULong EpochHelper::dayOfWeek | ( | ) |
Returns the current value of the day of week.
| CORBA::Long EpochHelper::dayOfYear | ( | ) |
Returns the current value of the day of year.
| void EpochHelper::dayOfYear | ( | const CORBA::Long & | ) |
Sets the current value of the day of year.
| dayofyear |
|
| acstime::Duration EpochHelper::difference | ( | const acstime::Epoch & | subtrahend | ) |
Subtracts the given Epoch from this Epoch and returns a Duration. result.
Notice the returned duration will be positive if the subtrahend is earlier than this, and negative if the subtrahend is later than this.
| subtrahend | this gets subtracted from this Epoch |
| void EpochHelper::fromString | ( | acstime::TimeSystem | , | |
| const char * | ||||
| ) |
Sets this Epoch's value from the given string.
| TimeSystem | Time system to be used. | |
| epoch | use this string to set object's value |
| ACSTimeError::ArgErrorExImpl |
|
| CORBA::Long EpochHelper::hour | ( | ) |
Returns the current value of the hour.
| void EpochHelper::hour | ( | const CORBA::Long & | ) |
Sets the current value of the hour.
| hour |
|
| void EpochHelper::m_abbrevMonth | ( | std::ostringstream & | ) | [private] |
| void EpochHelper::m_abbrevWeekday | ( | std::ostringstream & | ) | [private] |
| void EpochHelper::m_almostUnix | ( | std::ostringstream & | ) | [private] |
| long EpochHelper::m_calcLeap | ( | ) | [private] |
| void EpochHelper::m_iso8601date | ( | std::ostringstream & | ) | [private] |
| void EpochHelper::m_iso8601full | ( | std::ostringstream & | ) | [private] |
| void EpochHelper::m_microSec | ( | std::ostringstream & | , | |
| int | ||||
| ) | [private] |
| void EpochHelper::m_toAttributes | ( | ) | [private] |
| void EpochHelper::m_toValue | ( | CORBA::Boolean | booVal | ) | [private] |
| ACSTimeError::OverflowOrUnderflowExImpl |
| void EpochHelper::microSecond | ( | const CORBA::Long & | ) |
Sets the current value of the microsecond.
| microsecond |
|
| CORBA::Long EpochHelper::microSecond | ( | ) |
Returns the current value of the microsecond.
| CORBA::Long EpochHelper::minute | ( | ) |
Returns the current value of the minute.
| void EpochHelper::minute | ( | const CORBA::Long & | ) |
Sets the current value of the minute.
| minute |
|
| void EpochHelper::modulo | ( | const acstime::Epoch & | epoch | ) |
| void EpochHelper::month | ( | const CORBA::Long & | ) |
Sets the current value of the month.
| month |
|
| CORBA::Long EpochHelper::month | ( | ) |
Returns the current value of the month.
| void EpochHelper::normalize | ( | const CORBA::Boolean & | ) |
Set normalize or out-of-range flag.
When this flag is set FALSE the class causes an exception when any out-of-range value is set. normalize is set to FALSE initially and after a reset().
When this flag is set TRUE the class accepts out-of-range values for month, day, dayOfYear, hour, minute, second, or microSecond. An out-of-range value causes all attributes to be normalized.
For example, with normalize set true and setting the month,day to 3,32 will result in month,day 4,1. Setting hour,minute to 2,-62 will result in hour,minute 1,2.
This can be used as a convenient way of adding to or subtracting from an Epoch.
| bool |
|
| CORBA::Boolean EpochHelper::normalize | ( | ) |
Get normalize or out-of-range flag.
When this flag is set FALSE the class causes an exception when any out-of-range value is set. normalize is set to FALSE initially and after a reset().
When this flag is set TRUE the class accepts out-of-range values for month, day, dayOfYear, hour, minute, second, or microSecond. An out-of-range value causes all attributes to be normalized.
For example, with normalize set true and setting the month,day to 3,32 will result in month,day 4,1. Setting hour,minute to 2,-62 will result in hour,minute 1,2.
This can be used as a convenient way of adding to or subtracting from an Epoch.
| EpochHelper& EpochHelper::operator%= | ( | const acstime::Epoch & | epoch | ) |
| EpochHelper& EpochHelper::operator+= | ( | const acstime::Duration & | duration | ) |
| EpochHelper& EpochHelper::operator-= | ( | const acstime::Duration & | duration | ) |
| CORBA::Boolean EpochHelper::operator< | ( | const acstime::Epoch & | epoch | ) | const |
| CORBA::Boolean EpochHelper::operator<= | ( | const acstime::Epoch & | epoch | ) | const |
| void EpochHelper::operator= | ( | const EpochHelper & | ) | [private] |
assignment not allowed
| CORBA::Boolean EpochHelper::operator== | ( | const acstime::Epoch & | epoch | ) | const |
| CORBA::Boolean EpochHelper::operator> | ( | const acstime::Epoch & | epoch | ) | const |
| CORBA::Boolean EpochHelper::operator>= | ( | const acstime::Epoch & | epoch | ) | const |
| void EpochHelper::reset | ( | ) |
Sets all numeral attributes to zero, and normalize to FALSE. This facilities reuse of the object.
| void EpochHelper::second | ( | const CORBA::Long & | ) |
Sets the current value of the second.
| second |
|
| CORBA::Long EpochHelper::second | ( | ) |
Returns the current value of the second.
| void EpochHelper::subtract | ( | const acstime::Duration & | ) |
| CORBA::Double EpochHelper::toJulianYear | ( | CORBA::Long | array2TAI, | |
| CORBA::Long | TAI2UTC | |||
| ) |
Returns this Epoch's value as the equivalent Julian year.
| array2TAI | Should be the array2TAI property in the Clock Component | |
| TAI2UTC | Should be the TAI2UTC property in the Clock Component |
| long double EpochHelper::toMJDseconds | ( | ) |
Returns this Epoch's value as the equivalent modified Julian date in the form of fractional seconds.
| std::string EpochHelper::toString | ( | acstime::TimeSystem | , | |
| const char * | , | |||
| const CORBA::Long | array2TAI, | |||
| const CORBA::Long | TAI2UTC | |||
| ) |
Returns this Epoch's value as a String.
| TimeSystem | Time system to be used. | |
| format | format for the output string | |
| array2TAI | Should be the array2TAI property in the Clock Component | |
| TAI2UTC | Should be the TAI2UTC property in the Clock Component |
| ACSTimeError::ArgErrorExImpl |
|
| CORBA::Double EpochHelper::toUTCdate | ( | CORBA::Long | array2TAI, | |
| CORBA::Long | TAI2UTC | |||
| ) |
Returns this Epoch's value as the equivalent UTC date and fractional day.
| array2TAI | Should be the array2TAI property in the Clock Component | |
| TAI2UTC | Should be the TAI2UTC property in the Clock Component |
| acstime::Epoch EpochHelper::value | ( | ) |
Returns the current value of the Epoch.
| void EpochHelper::value | ( | long double | MJDSeconds | ) |
Sets the current value of the Epoch.
| Epoch |
|
| void EpochHelper::value | ( | const ACS::Time & | epoch | ) |
Sets the current value of the Epoch.
| Epoch |
|
| void EpochHelper::value | ( | const acstime::Epoch & | epoch | ) |
Sets the current value of the Epoch.
| Epoch |
|
| CORBA::ULong EpochHelper::year | ( | ) |
Returns the current value of the year.
| void EpochHelper::year | ( | const CORBA::ULong & | ) |
Sets the current value of the year.
| year |
|
| DurationHelper* operator% | ( | const EpochHelper & | , | |
| const ACS::TimeInterval & | ||||
| ) | [friend] |
Implemented this modulo operand to fulfill the requirements on an SPR from Correlator. Caller is responsible for deleting the DurationHelper allocated by this operand.
| EpochHelper | ||
| TimeInterval |
| DurationHelper* operator% | ( | const ACS::TimeInterval & | , | |
| const EpochHelper & | ||||
| ) | [friend] |
Implemented this modulo operand to fulfill the requirements on an SPR from Correlator. Caller is responsible for deleting the DurationHelper allocated by this operand.
| TimeInterval | ||
| EpochHelper |
CORBA::Long EpochHelper::day_m [private] |
CORBA::Long EpochHelper::day_mOfYear [private] |
CORBA::ULong EpochHelper::dayOfWeek_m [private] |
CORBA::Long EpochHelper::hour_m [private] |
CORBA::Long EpochHelper::microSecond_m [private] |
CORBA::Long EpochHelper::minute_m [private] |
CORBA::Long EpochHelper::month_m [private] |
CORBA::Boolean EpochHelper::normalize_m [private] |
CORBA::Long EpochHelper::second_m [private] |
acstime::Epoch EpochHelper::value_m [private] |
CORBA::ULong EpochHelper::year_m [private] |
1.7.0