src/util/timemodification.cpp
/**
 * Revert the time shift for the output timestamp.
 *
 * @param input
 *
 * @return reverted output time.
 */
Revert the time shift for the output timestamp.
@param input

@return reverted output time.
Revert the time shift for the output timestamp . @param input @return reverted output time .
auto TimeModification::reverse(const TemporalReference& input) -> const TemporalReference {
	if(!isApplyCalled) {
		throw OperatorException("You must call apply before reverse.");
	}
	switch(input.timetype) {
		case TIMETYPE_UNKNOWN:
			throw OperatorException("It is not possible to modify an unknown time type.");
		case TIMETYPE_UNREFERENCED:
			throw OperatorException("It is not possible to modify an unreferenced time type.");
		case TIMETYPE_UNIX:
			double time_from = input.t1;
			double time_to = input.t2;
			time_from = from_snap->reverse(time_from);
			time_to = to_snap->reverse(time_to);
			time_from = stretch->reverse(time_from);
			time_to = stretch->reverse(time_to);
			time_from = from_shift->reverse(time_from);
			time_to = to_shift->reverse(time_to);
			return TemporalReference{TIMETYPE_UNIX, time_from, time_to};
	}
}
auto TimeModification :: reverse ( const TemporalReference & input ) -> const TemporalReference { if ( ! isApplyCalled ) { throw OperatorException ( " " ) ; } switch ( input . timetype ) { case TIMETYPE_UNKNOWN : throw OperatorException ( " " ) ; case TIMETYPE_UNREFERENCED : throw OperatorException ( " " ) ; case TIMETYPE_UNIX : double time_from = input . t1 ; double time_to = input . t2 ; time_from = from_snap -> reverse ( time_from ) ; time_to = to_snap -> reverse ( time_to ) ; time_from = stretch -> reverse ( time_from ) ; time_to = stretch -> reverse ( time_to ) ; time_from = from_shift -> reverse ( time_from ) ; time_to = to_shift -> reverse ( time_to ) ; return TemporalReference { TIMETYPE_UNIX , time_from , time_to } ; } }
Revert the time shift for the output timestamp.
Revert the time shift for the output timestamp .