summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMagnus Lundborg <lundborg.magnus@gmail.com>2013-11-15 09:25:12 (GMT)
committerMagnus Lundborg <lundborg.magnus@gmail.com>2013-11-15 09:25:12 (GMT)
commit58dcd690833d3fb405622e33187cfa75b9b77a09 (patch)
tree9d0b8475ff3cc382de7af36808e6f19fd2fd9679 /include
parent49e205d276032638270779bdbb4af75607620ff5 (diff)
Added function for reading first frame of next frame set.
Better file position management when reading next/last frame set info. Temporary debug statements.
Diffstat (limited to 'include')
-rw-r--r--include/tng_io.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/tng_io.h b/include/tng_io.h
index fb4efd6..27c8c7f 100644
--- a/include/tng_io.h
+++ b/include/tng_io.h
@@ -1076,6 +1076,8 @@ tng_function_status DECLSPECDLLEXPORT tng_input_file_len_get
* @param n is pointing to a value set to the number of frames.
* @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
* must be initialised before using it.
+ * @pre \code tng_data->input_file != 0 \endcode An input file must be open
+ * to find the next frame set.
* @pre \code n != 0 \endcode The pointer to n must not be a NULL pointer.
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred (could not find last frame set).
@@ -2102,6 +2104,24 @@ tng_function_status DECLSPECDLLEXPORT tng_frame_set_first_frame_time_set
const double first_frame_time);
/**
+ * @brief Read the number of the first frame of the next frame set.
+ * @param tng_data is the trajectory containing the frame set.
+ * @param frame is set to the frame number of the first frame in the
+ * next frame set.
+ * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
+ * must be initialised before using it.
+ * @pre \code tng_data->input_file != 0 \endcode An input file must be open
+ * to find the next frame set.
+ * @pre \code frame != 0 \endcode The pointer to the frame must not be a NULL
+ * pointer.
+ * @return TNG_SUCCESS(0) if successful, TNG_FAILURE(1) if there is no next
+ * frame set or TNG_CRITICAL(2) if a major error has occured.
+ */
+tng_function_status DECLSPECDLLEXPORT tng_first_frame_nr_of_next_frame_set_get
+ (tng_trajectory_t tng_data,
+ int64_t *frame);
+
+/**
* @brief Add a non-particle dependent data block.
* @param tng_data is the trajectory data container in which to add the data
* block
contact: Jan Huwald // Impressum