12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- using System;
- namespace CSVReader
- {
- public interface ICSVReader
- {
- /// <summary>
- /// Reads either the current or last entry based on <see cref="forward"/> and moves the pointer in that direction.
- /// </summary>
- /// <returns>
- /// The next <see cref="InputObject"/> in correct direction.
- /// </returns>
- /// <param name="forward">Direction of read command.</param>
- InputObject ReadNextEntry(bool forward);
- /// <summary>
- /// Moves the pointer to the entry that has the closest timestamp to <see cref="time"/>.
- /// </summary>
- /// <returns>
- /// The timestamp that is assumed to be the closest to the input time.
- /// </returns>
- /// <param name="time">Time to move the pointer to.</param>
- double JumpToEntry(double time, bool forward);
- /// <summary>
- /// Tests whether a timestamp is in bounds of the current file.
- /// </summary>
- /// <returns>
- /// A bool inidcationg if <see cref="time"/> is in bounds of the file.
- /// </returns>
- /// <param name="time">Time to check.</param>
- bool IsInBounds(double time);
- /// <summary>
- /// Finds the timestamp of the next file entry in <see cref="forward"/> direction. Does NOT move the pointer.
- /// </summary>
- /// <returns>
- /// The timestamp of the next entry.
- /// </returns>
- /// <param name="forward">Direction to read.</param>
- double Peek(bool forward);
- /// <summary>
- /// Finds the Timestamp of the last Element in the underlying file.
- /// </summary>
- /// <returns>
- /// The timestamp of the last entry.
- /// </returns>
- double GetLastTimestamp();
- /// <summary>
- /// Finds the Timestamp of the first Element in the underlying file.
- /// </summary>
- /// <returns>
- /// The timestamp of the first entry.
- /// </returns>
- double GetFirstTimestamp();
- ///<summary>
- ///Get the first timestamp in the timechunk
- ///</summary>
- ///<returns>
- ///Returns the first Timestamp in the timechunk.
- ///NaN if starttimestamp is not set.
- ///</returns>
- double GetChunkStarttimestamp();
-
- ///<summary>
- ///Get the last timestamp in the timechunk
- ///</summary>
- ///<returns>
- ///Returns the last timestamp in the timechunk.
- ///NaN if endtimestamp is not set.
- ///</returns>
- double GetChunkEndtimestamp();
- ///<summary>
- ///Set the first timestamp in the timechunk
- ///</summary>
- void SetChunkStarttimestamp(double time);
- ///<summary>
- ///Set the last timestamp in the timechunk
- ///</summary>
- void SetChunkEndtimestamp(double time);
- /// <summary>
- /// Closes the stream on the File.
- /// </summary>
- void TearDown();
- }
- }
|