GPSWeekSecond Class Reference

#include <GPSWeekSecond.hpp>

Inheritance diagram for GPSWeekSecond:

Inheritance graph
[legend]
Collaboration diagram for GPSWeekSecond:

Collaboration graph
[legend]
List of all members.

Detailed Description

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

Definition at line 39 of file GPSWeekSecond.hpp.

Public Member Functions

 GPSWeekSecond (unsigned int w=0, double s=0.) throw ()
 Default Constructor.
 GPSWeekSecond (const GPSWeekSecond &right) throw ()
 Copy Constructor.
 GPSWeekSecond (const TimeTag &right) throw ( gpstk::InvalidRequest )
 Alternate Copy Constructor.
 GPSWeekSecond (const CommonTime &right) throw ( InvalidRequest )
 Alternate Copy Constructor.
GPSWeekSecondoperator= (const GPSWeekSecond &right) throw ()
 Assignment Operator.
virtual ~GPSWeekSecond () throw ()
 Virtual Destructor.
virtual CommonTime convertToCommonTime () const throw (InvalidRequest)
 
Exceptions:
InvalidRequest if this TimeTag cannot be correctly represented by a CommonTime object.

virtual void convertFromCommonTime (const CommonTime &ct) throw (InvalidRequest)
virtual std::string printf (const std::string &fmt) const throw ( gpstk::StringUtils::StringException )
 This function formats this time to a string.
virtual std::string printError (const std::string &fmt) const throw ( gpstk::StringUtils::StringException )
 This function works similarly to printf.
virtual bool setFromInfo (const IdToValue &info) throw ()
 Set this object using the information provided in info.
virtual std::string getPrintChars () const throw ()
 Return a string containing the characters that this class understands when printing times.
virtual std::string getDefaultFormat () const throw ()
 Return a string containing the default format to use in printing.
virtual bool isValid () const throw ()
 Returns true if this object's members are valid, false otherwise.
virtual void reset () throw ()
 Reset this object to the default state.
virtual unsigned int getDayOfWeek () const throw ()
 Force this interface on this classes descendants.
bool operator== (const GPSWeekSecond &right) const throw ()
bool operator!= (const GPSWeekSecond &right) const throw ()
bool operator< (const GPSWeekSecond &right) const throw ()
bool operator> (const GPSWeekSecond &right) const throw ()
bool operator<= (const GPSWeekSecond &right) const throw ()
bool operator>= (const GPSWeekSecond &right) const throw ()

Public Attributes

double sow


Member Function Documentation

void convertFromCommonTime const CommonTime ct  )  throw (InvalidRequest) [virtual]
 

This is the earliest CommonTime convertible to GPSWeekSecond.

Implements TimeTag.

Definition at line 61 of file GPSWeekSecond.cpp.

References GPSTK_THROW, and gpstk::SEC_PER_DAY.

CommonTime convertToCommonTime  )  const throw (InvalidRequest) [virtual]
 

Exceptions:
InvalidRequest if this TimeTag cannot be correctly represented by a CommonTime object.

Implements TimeTag.

Definition at line 41 of file GPSWeekSecond.cpp.

References gpstk::GPS_EPOCH_JDAY, GPSTK_THROW, gpstk::SEC_PER_DAY, and GPSWeekSecond::sow.

Referenced by gpstk::mixedScanTime(), and gpstk::scanTime().

virtual unsigned int getDayOfWeek  )  const throw () [inline, virtual]
 

Force this interface on this classes descendants.

Implements GPSWeek.

Definition at line 153 of file GPSWeekSecond.hpp.

virtual std::string getDefaultFormat  )  const throw () [inline, virtual]
 

Return a string containing the default format to use in printing.

Reimplemented from GPSWeek.

Definition at line 141 of file GPSWeekSecond.hpp.

virtual std::string getPrintChars  )  const throw () [inline, virtual]
 

Return a string containing the characters that this class understands when printing times.

Reimplemented from GPSWeek.

Definition at line 134 of file GPSWeekSecond.hpp.

bool isValid  )  const throw () [virtual]
 

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

Reimplemented from GPSWeek.

Definition at line 157 of file GPSWeekSecond.cpp.

References GPSWeekSecond::sow.

std::string printError const std::string &  fmt  )  const throw ( gpstk::StringUtils::StringException ) [virtual]
 

This function works similarly to printf.

Instead of filling the format with data, it fills with error messages.

Reimplemented from GPSWeek.

Definition at line 108 of file GPSWeekSecond.cpp.

References gpstk::StringUtils::formattedPrint(), and GPSTK_RETHROW.

std::string printf const std::string &  fmt  )  const throw ( gpstk::StringUtils::StringException ) [virtual]
 

This function formats this time to a string.

The exceptions thrown would only be due to problems parsing the fmt string.

Reimplemented from GPSWeek.

Definition at line 87 of file GPSWeekSecond.cpp.

References gpstk::StringUtils::formattedPrint(), and GPSTK_RETHROW.

void reset  )  throw () [virtual]
 

Reset this object to the default state.

Reimplemented from GPSWeek.

Definition at line 164 of file GPSWeekSecond.cpp.

References GPSWeekSecond::sow.

bool setFromInfo const IdToValue info  )  throw () [virtual]
 

Set this object using the information provided in info.

Parameters:
info the IdToValue object to which this object shall be set.
Returns:
true if this object was successfully set using the data in info, false if not.

Reimplemented from GPSWeek.

Definition at line 129 of file GPSWeekSecond.cpp.

References gpstk::StringUtils::asDouble(), and gpstk::StringUtils::asInt().

Referenced by gpstk::scanTime().


Member Data Documentation

double sow
 

Definition at line 181 of file GPSWeekSecond.hpp.

Referenced by GPSWeekSecond::convertToCommonTime(), GPSWeekSecond::isValid(), gpstk::mixedScanTime(), GPSWeekSecond::reset(), and gpstk::scanTime().


The documentation for this class was generated from the following files:
Generated on Thu Sep 9 03:31:29 2010 for GPS ToolKit Software Library by  doxygen 1.3.9.1