Exemple #1
0
      /// Fill the TimeTag object \a btime with time information found in
      /// string \a str formatted according to string \a fmt.
   void scanTime( TimeTag& btime,
                  const string& str,
                  const string& fmt )
   {
      try
      {
            // Get the mapping of character (from fmt) to value (from str).
         TimeTag::IdToValue info;
         TimeTag::getInfo( str, fmt, info );
         
         if( btime.setFromInfo( info ) )
         {
            return;
         }
         
            // Convert to CommonTime, and try to set using all formats.
         CommonTime ct( btime.convertToCommonTime() );
         scanTime( ct, str, fmt );

            // Convert the CommonTime into the requested format.
         btime.convertFromCommonTime( ct );
      }
      catch( gpstk::InvalidRequest& ir )
      {
         GPSTK_RETHROW( ir );
      }
      catch( gpstk::StringUtils::StringException& se )
      {
         GPSTK_RETHROW( se );
      }
   }
Exemple #2
0
    /**
     * Alternate Copy Constructor.
     * Takes a const TimeTag reference and copies its contents via 
     * conversion to CommonTime.
     * @param right a const reference to the TimeTag-based object to copy
     * @throw InvalidRequest on over-/under-flow
     */
 CivilTime( const TimeTag& right )
    throw()
 {
    convertFromCommonTime( right.convertToCommonTime() ); 
 }
Exemple #3
0
    /**
     * Alternate Copy Constructor.
     * Takes a const TimeTag reference and copies its contents via
     * conversion to CommonTime.
     * @param right a const reference to the BasicTime object to copy
     * @throw InvalidRequest on over-/under-flow
     */
 WeekSecond( const TimeTag& right )
 {
    convertFromCommonTime( right.convertToCommonTime() );
 }
Exemple #4
0
    /**
     * Alternate Copy Constructor.
     * Takes a const TimeTag reference and copies its contents via
     * conversion to CommonTime.
     * @param right a const reference to the BasicTime object to copy
     * @throw InvalidRequest on over-/under-flow
     */
 ANSITime( const TimeTag& right )
 {
    convertFromCommonTime( right.convertToCommonTime() );
 }
Exemple #5
0
    /**
     * Alternate Copy Constructor.
     * Takes a const TimeTag reference and copies its contents via 
     * conversion to CommonTime.
     * @param right a const reference to the TimeTag-based object to copy
     * @throw InvalidRequest on over-/under-flow
     */
 CivilTime( const TimeTag& right )
    throw( InvalidRequest )
 {
    convertFromCommonTime( right.convertToCommonTime() ); 
 }
Exemple #6
0
    /**
     * Alternate Copy Constructor.
     * Takes a const TimeTag reference and copies its contents via
     * conversion to CommonTime.
     * @param right a const reference to the BasicTime object to copy
     * @throw InvalidRequest on over-/under-flow
     */
 MJD( const TimeTag& right )
    throw( gpstk::InvalidRequest )
 { 
    convertFromCommonTime( right.convertToCommonTime() ); 
 }