List of all members
gnsstk::WeekSecond Class Reference

Detailed Description

This class encapsulates the "Full Week and Seconds-of-week" time representation.

Definition at line 60 of file WeekSecond.hpp.

#include <WeekSecond.hpp>

Inheritance diagram for gnsstk::WeekSecond:
Inheritance graph
[legend]

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)
 
WeekSecondoperator= (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
 
- Public Member Functions inherited from gnsstk::Week
virtual int bitmask (void) const =0
 
int MAXWEEK (void) const
 
virtual long MJDEpoch (void) const =0
 
virtual int Nbits (void) const =0
 
Weekoperator= (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...
 
- Public Member Functions inherited from gnsstk::TimeTag
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

- Public Types inherited from gnsstk::TimeTag
typedef std::map< char, std::string > IdToValue
 
- Static Public Member Functions inherited from gnsstk::TimeTag
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)
 
- Public Attributes inherited from gnsstk::Week
int week
 Full week number. More...
 
- Protected Attributes inherited from gnsstk::TimeTag
TimeSystem timeSystem
 time system (representation) of the data More...
 

Constructor & Destructor Documentation

◆ WeekSecond() [1/4]

gnsstk::WeekSecond::WeekSecond ( unsigned int  w = 0,
double  s = 0.,
TimeSystem  ts = TimeSystem::Unknown 
)
inline

Default Constructor. All elements are initialized to zero.

Definition at line 74 of file WeekSecond.hpp.

◆ WeekSecond() [2/4]

gnsstk::WeekSecond::WeekSecond ( const WeekSecond right)
inline

Copy Constructor.

Parameters
righta reference to the WeekSecond object to copy

Definition at line 84 of file WeekSecond.hpp.

◆ WeekSecond() [3/4]

gnsstk::WeekSecond::WeekSecond ( const TimeTag right)
inline

Alternate Copy Constructor. Takes a const TimeTag reference and copies its contents via conversion to CommonTime.

Parameters
righta const reference to the BasicTime object to copy
Exceptions
InvalidRequeston over-/under-flow

Definition at line 95 of file WeekSecond.hpp.

◆ WeekSecond() [4/4]

gnsstk::WeekSecond::WeekSecond ( const CommonTime right)
inline

Alternate Copy Constructor. Takes a const CommonTime reference and copies its contents via the convertFromCommonTime method.

Parameters
righta const reference to the CommonTime object to copy
Exceptions
InvalidRequeston over-/under-flow

Definition at line 107 of file WeekSecond.hpp.

◆ ~WeekSecond()

virtual gnsstk::WeekSecond::~WeekSecond ( )
inlinevirtual

Virtual Destructor.

Definition at line 120 of file WeekSecond.hpp.

Member Function Documentation

◆ convertFromCommonTime()

void gnsstk::WeekSecond::convertFromCommonTime ( const CommonTime ct)
virtual
Exceptions
InvalidRequestif ct cannot be correctly represented in this TimeTag object.

Implements gnsstk::TimeTag.

Definition at line 78 of file WeekSecond.cpp.

◆ convertToCommonTime()

CommonTime gnsstk::WeekSecond::convertToCommonTime ( ) const
virtual
Exceptions
InvalidRequestif this TimeTag cannot be correctly represented by a CommonTime object.

Implements gnsstk::TimeTag.

Definition at line 55 of file WeekSecond.cpp.

◆ getDayOfWeek()

virtual unsigned int gnsstk::WeekSecond::getDayOfWeek ( ) const
inlinevirtual

Force this interface on this classes descendants.

Implements gnsstk::Week.

Definition at line 134 of file WeekSecond.hpp.

◆ getSOW()

double gnsstk::WeekSecond::getSOW ( ) const
inline

Definition at line 139 of file WeekSecond.hpp.

◆ isValid()

bool gnsstk::WeekSecond::isValid ( ) const
virtual

Returns true if this object's members are valid, false otherwise.

Reimplemented from gnsstk::Week.

Definition at line 99 of file WeekSecond.cpp.

◆ operator!=()

bool gnsstk::WeekSecond::operator!= ( const WeekSecond right) const

Definition at line 117 of file WeekSecond.cpp.

◆ operator<()

bool gnsstk::WeekSecond::operator< ( const WeekSecond right) const

Definition at line 122 of file WeekSecond.cpp.

◆ operator<=()

bool gnsstk::WeekSecond::operator<= ( const WeekSecond right) const

Definition at line 144 of file WeekSecond.cpp.

◆ operator=()

WeekSecond & gnsstk::WeekSecond::operator= ( const WeekSecond right)

Assignment Operator.

Parameters
righta const reference to the WeekSecond to copy
Returns
a reference to this WeekSecond

Definition at line 48 of file WeekSecond.cpp.

◆ operator==()

bool gnsstk::WeekSecond::operator== ( const WeekSecond right) const

Definition at line 111 of file WeekSecond.cpp.

◆ operator>()

bool gnsstk::WeekSecond::operator> ( const WeekSecond right) const

Definition at line 139 of file WeekSecond.cpp.

◆ operator>=()

bool gnsstk::WeekSecond::operator>= ( const WeekSecond right) const

Definition at line 149 of file WeekSecond.cpp.

◆ reset()

void gnsstk::WeekSecond::reset ( )
virtual

Reset this object to the default state.

Reimplemented from gnsstk::Week.

Definition at line 105 of file WeekSecond.cpp.

Member Data Documentation

◆ sow

double gnsstk::WeekSecond::sow

Definition at line 155 of file WeekSecond.hpp.


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


gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:46