Exemplo n.º 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 );
      }
   }
Exemplo n.º 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() ); 
 }
Exemplo n.º 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() );
 }
Exemplo n.º 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() );
 }
Exemplo n.º 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() ); 
 }
Exemplo n.º 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() ); 
 }