This class encapsulates the "Full Week and Seconds-of-week" time representation.
Definition at line 60 of file WeekSecond.hpp.
#include <WeekSecond.hpp>
Public Member Functions | |
WeekSecond Basic Operations | |
Default and Copy Constructors, Assignment Operator and Destructor. | |
WeekSecond (unsigned int w=0, double s=0., TimeSystem ts=TimeSystem::Unknown) | |
WeekSecond (const WeekSecond &right) | |
WeekSecond (const TimeTag &right) | |
WeekSecond (const CommonTime &right) | |
WeekSecond & | operator= (const WeekSecond &right) |
virtual | ~WeekSecond () |
Virtual Destructor. More... | |
virtual CommonTime | convertToCommonTime () const |
virtual void | convertFromCommonTime (const CommonTime &ct) |
virtual bool | isValid () const |
Returns true if this object's members are valid, false otherwise. More... | |
virtual void | reset () |
Reset this object to the default state. More... | |
virtual unsigned int | getDayOfWeek () const |
Force this interface on this classes descendants. More... | |
double | getSOW () const |
![]() | |
virtual int | bitmask (void) const =0 |
int | MAXWEEK (void) const |
virtual long | MJDEpoch (void) const =0 |
virtual int | Nbits (void) const =0 |
Week & | operator= (const Week &right) |
Assignment Operator. More... | |
virtual int | rollover (void) const |
Week (int w=0, TimeSystem ts=TimeSystem::Unknown) | |
Constructor. More... | |
virtual | ~Week () |
Virtual Destructor. More... | |
bool | operator== (const Week &right) const |
bool | operator!= (const Week &right) const |
bool | operator< (const Week &right) const |
bool | operator<= (const Week &right) const |
bool | operator> (const Week &right) const |
bool | operator>= (const Week &right) const |
virtual unsigned int | getWeek () const |
virtual unsigned int | getModWeek () const |
virtual unsigned int | getEpoch () const |
virtual void | getEpochModWeek (unsigned int &e, unsigned int &w) const |
virtual void | setEpoch (unsigned int e) |
virtual void | setModWeek (unsigned int w) |
virtual void | setEpochModWeek (unsigned int e, unsigned int w) |
virtual void | adjustToYear (unsigned int y) |
virtual std::string | getPrintChars () const |
virtual std::string | getDefaultFormat () const |
Return a string containing the default format to use in printing. More... | |
![]() | |
virtual std::string | asString () const |
bool | changeTimeSystem (TimeSystem timeSys) |
bool | changeTimeSystem (TimeSystem timeSys, TimeSystemConverter *conv) |
TimeSystem | getTimeSystem () const |
Obtain time system info (enum). More... | |
virtual | operator CommonTime () const |
virtual std::string | printError (const std::string &fmt) const =0 |
virtual std::string | printf (const std::string &fmt) const =0 |
virtual void | scanf (const std::string &str, const std::string &fmt) |
virtual bool | setFromInfo (const IdToValue &info)=0 |
void | setTimeSystem (const TimeSystem &timeSys) |
Set method for internal variable timeSystem (enum). More... | |
TimeTag () | |
Default constructor. More... | |
TimeTag (const TimeSystem &ts) | |
Constructor. More... | |
virtual | ~TimeTag () |
Virtual Destructor. More... | |
WeekSecond Comparison Operators | |
All comparison operators have a parameter "right" which corresponds to the WeekSecond object to the right of the symbol. All comparison operators are const and return true on success and false on failure. | |
double | sow |
bool | operator== (const WeekSecond &right) const |
bool | operator!= (const WeekSecond &right) const |
bool | operator< (const WeekSecond &right) const |
bool | operator> (const WeekSecond &right) const |
bool | operator<= (const WeekSecond &right) const |
bool | operator>= (const WeekSecond &right) const |
Additional Inherited Members | |
![]() | |
typedef std::map< char, std::string > | IdToValue |
![]() | |
static void | checkTimeSystem (TimeSystem ts1, TimeSystem ts2) |
static std::string | getError () |
This returns the default error string for the TimeTag classes. More... | |
static std::string | getFormatPrefixFloat () |
static std::string | getFormatPrefixInt () |
static void | getInfo (const std::string &str, const std::string &fmt, IdToValue &info) |
![]() | |
int | week |
Full week number. More... | |
![]() | |
TimeSystem | timeSystem |
time system (representation) of the data More... | |
|
inline |
Default Constructor. All elements are initialized to zero.
Definition at line 74 of file WeekSecond.hpp.
|
inline |
Copy Constructor.
right | a reference to the WeekSecond object to copy |
Definition at line 84 of file WeekSecond.hpp.
Alternate Copy Constructor. Takes a const TimeTag reference and copies its contents via conversion to CommonTime.
right | a const reference to the BasicTime object to copy |
InvalidRequest | on over-/under-flow |
Definition at line 95 of file WeekSecond.hpp.
|
inline |
Alternate Copy Constructor. Takes a const CommonTime reference and copies its contents via the convertFromCommonTime method.
right | a const reference to the CommonTime object to copy |
InvalidRequest | on over-/under-flow |
Definition at line 107 of file WeekSecond.hpp.
|
inlinevirtual |
Virtual Destructor.
Definition at line 120 of file WeekSecond.hpp.
|
virtual |
InvalidRequest | if ct cannot be correctly represented in this TimeTag object. |
Implements gnsstk::TimeTag.
Definition at line 78 of file WeekSecond.cpp.
|
virtual |
InvalidRequest | if this TimeTag cannot be correctly represented by a CommonTime object. |
Implements gnsstk::TimeTag.
Definition at line 55 of file WeekSecond.cpp.
|
inlinevirtual |
Force this interface on this classes descendants.
Implements gnsstk::Week.
Definition at line 134 of file WeekSecond.hpp.
|
inline |
Definition at line 139 of file WeekSecond.hpp.
|
virtual |
Returns true if this object's members are valid, false otherwise.
Reimplemented from gnsstk::Week.
Definition at line 99 of file WeekSecond.cpp.
bool gnsstk::WeekSecond::operator!= | ( | const WeekSecond & | right | ) | const |
Definition at line 117 of file WeekSecond.cpp.
bool gnsstk::WeekSecond::operator< | ( | const WeekSecond & | right | ) | const |
Definition at line 122 of file WeekSecond.cpp.
bool gnsstk::WeekSecond::operator<= | ( | const WeekSecond & | right | ) | const |
Definition at line 144 of file WeekSecond.cpp.
WeekSecond & gnsstk::WeekSecond::operator= | ( | const WeekSecond & | right | ) |
Assignment Operator.
right | a const reference to the WeekSecond to copy |
Definition at line 48 of file WeekSecond.cpp.
bool gnsstk::WeekSecond::operator== | ( | const WeekSecond & | right | ) | const |
Definition at line 111 of file WeekSecond.cpp.
bool gnsstk::WeekSecond::operator> | ( | const WeekSecond & | right | ) | const |
Definition at line 139 of file WeekSecond.cpp.
bool gnsstk::WeekSecond::operator>= | ( | const WeekSecond & | right | ) | const |
Definition at line 149 of file WeekSecond.cpp.
|
virtual |
Reset this object to the default state.
Reimplemented from gnsstk::Week.
Definition at line 105 of file WeekSecond.cpp.
double gnsstk::WeekSecond::sow |
Definition at line 155 of file WeekSecond.hpp.