void iTime::setUtc(QString utcString) { LoadLeapSecondKernel(); double et; utc2et_c(utcString.toAscii().data(), &et); setEt(et); }
/** * Constructs a iTime object and initializes it to the time from the argument. * * @param time An ephemeris time (ET). */ iTime::iTime (const double time) { LoadLeapSecondKernel (); p_et = time; Extract (); p_original = EtString(); UnloadLeapSecondKernel (); }
/** * Changes the value of the iTime object. * * @param time A time string formatted in standard UTC or similar format. * Example:"2000/12/31 23:59:01.6789" or "2000-12-31T23:59:01.6789" */ void iTime::operator=(const QString &time) { LoadLeapSecondKernel(); // Convert the time string to a double ephemeris time SpiceDouble et; str2et_c(time.toAscii().data(), &et); p_et = et; UnloadLeapSecondKernel(); }
// Overload of "=" with a c string void iTime::operator=(const char *time) { LoadLeapSecondKernel(); // Convert the time string to a double ephemeris time SpiceDouble et; str2et_c(time, &et); p_et = et; UnloadLeapSecondKernel(); }
/** * Constructs a iTime object and initializes it to the time from the argument. * * @param time A time string formatted in standard UTC or similar format. * Example:"2000/12/31 23:59:01.6789" or "2000-12-31T23:59:01.6789" */ iTime::iTime (const std::string &time) { LoadLeapSecondKernel (); // Convert the time string to a double ephemeris time SpiceDouble et; str2et_c (time.c_str(), &et); p_et = et; p_original = time; Extract (); UnloadLeapSecondKernel (); }
// Overload of "=" with a double void iTime::operator=(const double time) { LoadLeapSecondKernel(); p_et = time; UnloadLeapSecondKernel(); }