summaryrefslogtreecommitdiff
path: root/include/tng_io.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/tng_io.h')
-rw-r--r--include/tng_io.h184
1 files changed, 100 insertions, 84 deletions
diff --git a/include/tng_io.h b/include/tng_io.h
index aa845e2..f2ae1c9 100644
--- a/include/tng_io.h
+++ b/include/tng_io.h
@@ -334,6 +334,21 @@ typedef unsigned long long int uint64_t;
#endif
+#ifndef USE_WINDOWS
+#if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
+#define USE_WINDOWS
+#endif /* win32... */
+#endif /* not defined USE_WINDOWS */
+
+#ifndef DECLSPECDLLEXPORT
+#ifdef USE_WINDOWS
+#define DECLSPECDLLEXPORT __declspec(dllexport)
+#else /* USE_WINDOWS */
+#define DECLSPECDLLEXPORT
+#endif /* USE_WINDOWS */
+#endif /* DECLSPECDLLEXPORT */
+
+
/** The version of this TNG build */
#define TNG_VERSION 2
@@ -349,7 +364,7 @@ typedef unsigned long long int uint64_t;
/** The maximum allowed length of a string */
#define TNG_MAX_STR_LEN 1024
-
+#if 0
/** Inline function for finding the lowest of two values */
#define tng_min(a,b) \
({ __typeof__ (a) _a = (a); \
@@ -361,6 +376,7 @@ typedef unsigned long long int uint64_t;
({ __typeof__ (a) _a = (a); \
__typeof__ (b) _b = (b); \
_a > _b ? _a : _b; })
+#endif
/** Flag to specify the endianness of a TNG file */
typedef enum {TNG_BIG_ENDIAN,
@@ -575,7 +591,7 @@ tng_function_status tng_util_box_shape_write(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-tng_function_status tng_trajectory_init(tng_trajectory_t *tng_data_p);
+tng_function_status DECLSPECDLLEXPORT tng_trajectory_init(tng_trajectory_t *tng_data_p);
/**
* @brief Clean up a trajectory data container.
@@ -584,7 +600,7 @@ tng_function_status tng_trajectory_init(tng_trajectory_t *tng_data_p);
* tng_data_p itself.
* @return TNG_SUCCESS (0) if successful.
*/
-tng_function_status tng_trajectory_destroy(tng_trajectory_t *tng_data_p);
+tng_function_status DECLSPECDLLEXPORT tng_trajectory_destroy(tng_trajectory_t *tng_data_p);
/**
* @brief Copy a trajectory data container (dest is setup as well).
@@ -598,7 +614,7 @@ tng_function_status tng_trajectory_destroy(tng_trajectory_t *tng_data_p);
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-tng_function_status tng_trajectory_init_from_src(tng_trajectory_t src,
+tng_function_status DECLSPECDLLEXPORT tng_trajectory_init_from_src(tng_trajectory_t src,
tng_trajectory_t *dest_p);
/**
@@ -611,7 +627,7 @@ tng_function_status tng_trajectory_init_from_src(tng_trajectory_t src,
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred (source string longer than destination string).
*/
-tng_function_status tng_input_file_get(const tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_input_file_get(const tng_trajectory_t tng_data,
char *file_name, const int max_len);
/**
@@ -621,7 +637,7 @@ tng_function_status tng_input_file_get(const tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-tng_function_status tng_input_file_set(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_input_file_set(tng_trajectory_t tng_data,
const char *file_name);
/**
@@ -634,7 +650,7 @@ tng_function_status tng_input_file_set(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred (source string longer than destination string).
*/
-tng_function_status tng_output_file_get(const tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_output_file_get(const tng_trajectory_t tng_data,
char *file_name, const int max_len);
/**
@@ -644,7 +660,7 @@ tng_function_status tng_output_file_get(const tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-tng_function_status tng_output_file_set(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_output_file_set(tng_trajectory_t tng_data,
const char *file_name);
/**
@@ -655,7 +671,7 @@ tng_function_status tng_output_file_set(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful or TNG_FAILURE (1) if the endianness
* could not be retrieved.
*/
-tng_function_status tng_output_file_endianness_get
+tng_function_status DECLSPECDLLEXPORT tng_output_file_endianness_get
(tng_trajectory_t tng_data, tng_file_endianness *endianness);
/**
@@ -668,7 +684,7 @@ tng_function_status tng_output_file_endianness_get
* @return TNG_SUCCESS (0) if successful or TNG_FAILURE (1) if the endianness
* could not be set.
*/
-tng_function_status tng_output_file_endianness_set
+tng_function_status DECLSPECDLLEXPORT tng_output_file_endianness_set
(tng_trajectory_t tng_data,
const tng_file_endianness endianness);
@@ -682,7 +698,7 @@ tng_function_status tng_output_file_endianness_set
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred (source string longer than destination string).
*/
-tng_function_status tng_first_program_name_get(const tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_first_program_name_get(const tng_trajectory_t tng_data,
char *name, const int max_len);
/**
@@ -692,7 +708,7 @@ tng_function_status tng_first_program_name_get(const tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-tng_function_status tng_first_program_name_set(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_first_program_name_set(tng_trajectory_t tng_data,
const char *new_name);
/**
@@ -705,7 +721,7 @@ tng_function_status tng_first_program_name_set(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred (source string longer than destination string).
*/
-tng_function_status tng_last_program_name_get(const tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_last_program_name_get(const tng_trajectory_t tng_data,
char *name, const int max_len);
/**
@@ -715,7 +731,7 @@ tng_function_status tng_last_program_name_get(const tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-tng_function_status tng_last_program_name_set(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_last_program_name_set(tng_trajectory_t tng_data,
const char *new_name);
/**
@@ -728,7 +744,7 @@ tng_function_status tng_last_program_name_set(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred (source string longer than destination string).
*/
-tng_function_status tng_first_user_name_get(const tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_first_user_name_get(const tng_trajectory_t tng_data,
char *name, const int max_len);
/**
@@ -738,7 +754,7 @@ tng_function_status tng_first_user_name_get(const tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-tng_function_status tng_first_user_name_set(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_first_user_name_set(tng_trajectory_t tng_data,
const char *new_name);
/**
@@ -751,7 +767,7 @@ tng_function_status tng_first_user_name_set(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred (source string longer than destination string).
*/
-tng_function_status tng_last_user_name_get(const tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_last_user_name_get(const tng_trajectory_t tng_data,
char *name, const int max_len);
/**
@@ -761,7 +777,7 @@ tng_function_status tng_last_user_name_get(const tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-tng_function_status tng_last_user_name_set(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_last_user_name_set(tng_trajectory_t tng_data,
const char *new_name);
/**
@@ -774,7 +790,7 @@ tng_function_status tng_last_user_name_set(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred (source string longer than destination string).
*/
-tng_function_status tng_first_computer_name_get(const tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_first_computer_name_get(const tng_trajectory_t tng_data,
char *name, const int max_len);
/**
@@ -784,7 +800,7 @@ tng_function_status tng_first_computer_name_get(const tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-tng_function_status tng_first_computer_name_set(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_first_computer_name_set(tng_trajectory_t tng_data,
const char *new_name);
/**
@@ -797,7 +813,7 @@ tng_function_status tng_first_computer_name_set(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred (source string longer than destination string).
*/
-tng_function_status tng_last_computer_name_get(const tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_last_computer_name_get(const tng_trajectory_t tng_data,
char *name, const int max_len);
/**
@@ -807,7 +823,7 @@ tng_function_status tng_last_computer_name_get(const tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-tng_function_status tng_last_computer_name_set(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_last_computer_name_set(tng_trajectory_t tng_data,
const char *new_name);
/**
@@ -820,7 +836,7 @@ tng_function_status tng_last_computer_name_set(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred (source string longer than destination string).
*/
-tng_function_status tng_first_signature_get(const tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_first_signature_get(const tng_trajectory_t tng_data,
char *signature, const int max_len);
/**
@@ -830,7 +846,7 @@ tng_function_status tng_first_signature_get(const tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-tng_function_status tng_first_signature_set(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_first_signature_set(tng_trajectory_t tng_data,
const char *signature);
/**
@@ -843,7 +859,7 @@ tng_function_status tng_first_signature_set(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred (source string longer than destination string).
*/
-tng_function_status tng_last_signature_get(const tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_last_signature_get(const tng_trajectory_t tng_data,
char *signature, const int max_len);
/**
@@ -853,7 +869,7 @@ tng_function_status tng_last_signature_get(const tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-tng_function_status tng_last_signature_set(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_last_signature_set(tng_trajectory_t tng_data,
const char *signature);
/**
@@ -866,7 +882,7 @@ tng_function_status tng_last_signature_set(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred (source string longer than destination string).
*/
-tng_function_status tng_forcefield_name_get(const tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_forcefield_name_get(const tng_trajectory_t tng_data,
char *name, const int max_len);
/**
@@ -876,7 +892,7 @@ tng_function_status tng_forcefield_name_get(const tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-tng_function_status tng_forcefield_name_set(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_forcefield_name_set(tng_trajectory_t tng_data,
const char *new_name);
/**
@@ -885,7 +901,7 @@ tng_function_status tng_forcefield_name_set(tng_trajectory_t tng_data,
* @param len is pointing to a value set to the stride length.
* @return TNG_SUCCESS (0) if successful.
*/
-tng_function_status tng_medium_stride_length_get(const tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_medium_stride_length_get(const tng_trajectory_t tng_data,
int64_t *len);
/**
@@ -895,7 +911,7 @@ tng_function_status tng_medium_stride_length_get(const tng_trajectory_t tng_data
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred.
*/
-tng_function_status tng_medium_stride_length_set(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_medium_stride_length_set(tng_trajectory_t tng_data,
const int64_t len);
/**
@@ -904,7 +920,7 @@ tng_function_status tng_medium_stride_length_set(tng_trajectory_t tng_data,
* @param len is pointing to a value set to the stride length.
* @return TNG_SUCCESS (0) if successful.
*/
-tng_function_status tng_long_stride_length_get(const tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_long_stride_length_get(const tng_trajectory_t tng_data,
int64_t *len);
/**
@@ -914,7 +930,7 @@ tng_function_status tng_long_stride_length_get(const tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred.
*/
-tng_function_status tng_long_stride_length_set(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_long_stride_length_set(tng_trajectory_t tng_data,
const int64_t len);
/**
@@ -923,7 +939,7 @@ tng_function_status tng_long_stride_length_set(tng_trajectory_t tng_data,
* @param len is pointing to a value set to the file length.
* @return TNG_SUCCESS (0) if successful.
*/
-tng_function_status tng_input_file_len_get(const tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_input_file_len_get(const tng_trajectory_t tng_data,
int64_t *len);
/**
@@ -933,7 +949,7 @@ tng_function_status tng_input_file_len_get(const tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred (could not find last frame set).
*/
-tng_function_status tng_num_frames_get(const tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_num_frames_get(const tng_trajectory_t tng_data,
int64_t *n);
/**
@@ -944,7 +960,7 @@ tng_function_status tng_num_frames_get(const tng_trajectory_t tng_data,
* the number of particles in the current frame set.
* @return TNG_SUCCESS (0) if successful.
*/
-tng_function_status tng_num_particles_get(const tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_num_particles_get(const tng_trajectory_t tng_data,
int64_t *n);
/**
@@ -955,7 +971,7 @@ tng_function_status tng_num_particles_get(const tng_trajectory_t tng_data,
* the total number of molecules in the current frame set.
* @return TNG_SUCCESS (0) if successful.
*/
-tng_function_status tng_num_molecules_get(const tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_num_molecules_get(const tng_trajectory_t tng_data,
int64_t *n);
/**
@@ -965,7 +981,7 @@ tng_function_status tng_num_molecules_get(const tng_trajectory_t tng_data,
* @param n is pointing to a value set to the number of frames per frame set.
* @return TNG_SUCCESS (0) if successful.
*/
-tng_function_status tng_num_frames_per_frame_set_get
+tng_function_status DECLSPECDLLEXPORT tng_num_frames_per_frame_set_get
(const tng_trajectory_t tng_data,
int64_t *n);
@@ -979,7 +995,7 @@ tng_function_status tng_num_frames_per_frame_set_get
* betfore creating any frame sets.
* @return TNG_SUCCESS (0) if successful.
*/
-tng_function_status tng_num_frames_per_frame_set_set
+tng_function_status DECLSPECDLLEXPORT tng_num_frames_per_frame_set_set
(const tng_trajectory_t tng_data,
const int64_t n);
@@ -991,7 +1007,7 @@ tng_function_status tng_num_frames_per_frame_set_set
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
-tng_function_status tng_num_frame_sets_get
+tng_function_status DECLSPECDLLEXPORT tng_num_frame_sets_get
(const tng_trajectory_t tng_data,
int64_t *n);
@@ -1002,7 +1018,7 @@ tng_function_status tng_num_frame_sets_get
* the found frame set.
* @return TNG_SUCCESS (0) if successful.
*/
-tng_function_status tng_current_frame_set_get
+tng_function_status DECLSPECDLLEXPORT tng_current_frame_set_get
(tng_trajectory_t tng_data,
tng_trajectory_frame_set_t *frame_set_p);
@@ -1015,7 +1031,7 @@ tng_function_status tng_current_frame_set_get
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
-tng_function_status tng_frame_set_nr_find(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_frame_set_nr_find(tng_trajectory_t tng_data,
const int64_t nr);
/**
@@ -1027,7 +1043,7 @@ tng_function_status tng_frame_set_nr_find(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
-tng_function_status tng_frame_set_of_frame_find(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_frame_set_of_frame_find(tng_trajectory_t tng_data,
const int64_t frame);
/**
@@ -1038,7 +1054,7 @@ tng_function_status tng_frame_set_of_frame_find(tng_trajectory_t tng_data,
* @param pos is pointing to a value set to the file position.
* @return TNG_SUCCESS (0) if successful.
*/
-tng_function_status tng_frame_set_next_frame_set_file_pos_get
+tng_function_status DECLSPECDLLEXPORT tng_frame_set_next_frame_set_file_pos_get
(const tng_trajectory_t tng_data,
const tng_trajectory_frame_set_t frame_set,
int64_t *pos);
@@ -1051,7 +1067,7 @@ tng_function_status tng_frame_set_next_frame_set_file_pos_get
* @param pos is pointing to a value set to the file position.
* @return TNG_SUCCESS (0) if successful.
*/
-tng_function_status tng_frame_set_prev_frame_set_file_pos_get
+tng_function_status DECLSPECDLLEXPORT tng_frame_set_prev_frame_set_file_pos_get
(const tng_trajectory_t tng_data,
const tng_trajectory_frame_set_t frame_set,
int64_t *pos);
@@ -1064,7 +1080,7 @@ tng_function_status tng_frame_set_prev_frame_set_file_pos_get
* @param last_frame is set to the last frame of the frame set.
* @return TNG_SUCCESS (0) if successful.
*/
-tng_function_status tng_frame_set_frame_range_get
+tng_function_status DECLSPECDLLEXPORT tng_frame_set_frame_range_get
(const tng_trajectory_t tng_data,
const tng_trajectory_frame_set_t frame_set,
int64_t *first_frame,
@@ -1077,7 +1093,7 @@ tng_function_status tng_frame_set_frame_range_get
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-tng_function_status tng_molecule_init(const tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_molecule_init(const tng_trajectory_t tng_data,
tng_molecule_t molecule);
/**
@@ -1089,7 +1105,7 @@ tng_function_status tng_molecule_init(const tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-tng_function_status tng_molecule_destroy(const tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_molecule_destroy(const tng_trajectory_t tng_data,
tng_molecule_t molecule);
/**
@@ -1100,7 +1116,7 @@ tng_function_status tng_molecule_destroy(const tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-tng_function_status tng_molecule_add(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_molecule_add(tng_trajectory_t tng_data,
const char *name,
tng_molecule_t *molecule);
@@ -1112,7 +1128,7 @@ tng_function_status tng_molecule_add(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-tng_function_status tng_molecule_name_set(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_molecule_name_set(tng_trajectory_t tng_data,
tng_molecule_t molecule,
const char *new_name);
@@ -1124,7 +1140,7 @@ tng_function_status tng_molecule_name_set(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
-tng_function_status tng_molecule_cnt_get(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_molecule_cnt_get(tng_trajectory_t tng_data,
tng_molecule_t molecule,
int64_t *cnt);
@@ -1136,9 +1152,9 @@ tng_function_status tng_molecule_cnt_get(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
-tng_function_status tng_molecule_cnt_set(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_molecule_cnt_set(tng_trajectory_t tng_data,
tng_molecule_t molecule,
- int64_t cnt);
+ const int64_t cnt);
/**
* @brief Find a chain in a molecule.
@@ -1154,7 +1170,7 @@ tng_function_status tng_molecule_cnt_set(tng_trajectory_t tng_data,
* @details If name is an empty string and id is -1 the first chain will be
* found.
*/
-tng_function_status tng_molecule_chain_find(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_molecule_chain_find(tng_trajectory_t tng_data,
tng_molecule_t molecule,
const char *name,
int64_t id,
@@ -1169,7 +1185,7 @@ tng_function_status tng_molecule_chain_find(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-tng_function_status tng_molecule_chain_add(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_molecule_chain_add(tng_trajectory_t tng_data,
tng_molecule_t molecule,
const char *name,
tng_chain_t *chain);
@@ -1182,7 +1198,7 @@ tng_function_status tng_molecule_chain_add(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-tng_function_status tng_chain_name_set(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_chain_name_set(tng_trajectory_t tng_data,
tng_chain_t chain,
const char *new_name);
@@ -1196,7 +1212,7 @@ tng_function_status tng_chain_name_set(tng_trajectory_t tng_data,
* residue is not found.
* @details If name is an empty string the first residue will be found.
*/
-tng_function_status tng_chain_residue_find(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_chain_residue_find(tng_trajectory_t tng_data,
tng_chain_t chain,
const char *name,
int64_t id,
@@ -1211,7 +1227,7 @@ tng_function_status tng_chain_residue_find(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-tng_function_status tng_chain_residue_add(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_chain_residue_add(tng_trajectory_t tng_data,
tng_chain_t chain,
const char *name,
tng_residue_t *residue);
@@ -1224,7 +1240,7 @@ tng_function_status tng_chain_residue_add(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-tng_function_status tng_residue_name_set(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_residue_name_set(tng_trajectory_t tng_data,
tng_residue_t residue,
const char *new_name);
@@ -1238,7 +1254,7 @@ tng_function_status tng_residue_name_set(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-tng_function_status tng_residue_atom_add(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_residue_atom_add(tng_trajectory_t tng_data,
tng_residue_t residue,
const char *atom_name,
const char *atom_type,
@@ -1252,7 +1268,7 @@ tng_function_status tng_residue_atom_add(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-tng_function_status tng_atom_name_set(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_atom_name_set(tng_trajectory_t tng_data,
tng_atom_t atom,
const char *new_name);
@@ -1264,7 +1280,7 @@ tng_function_status tng_atom_name_set(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-tng_function_status tng_atom_type_set(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_atom_type_set(tng_trajectory_t tng_data,
tng_atom_t atom,
const char *new_type);
@@ -1278,7 +1294,7 @@ tng_function_status tng_atom_type_set(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful or TNG_FAILURE (!) if a minor error
* has occured.
*/
-tng_function_status tng_molecule_name_of_particle_nr_get
+tng_function_status DECLSPECDLLEXPORT tng_molecule_name_of_particle_nr_get
(const tng_trajectory_t tng_data,
const int64_t nr,
char *name,
@@ -1294,7 +1310,7 @@ tng_function_status tng_molecule_name_of_particle_nr_get
* @return TNG_SUCCESS (0) if successful or TNG_FAILURE (!) if a minor error
* has occured.
*/
-tng_function_status tng_chain_name_of_particle_nr_get
+tng_function_status DECLSPECDLLEXPORT tng_chain_name_of_particle_nr_get
(const tng_trajectory_t tng_data,
const int64_t nr,
char *name,
@@ -1310,7 +1326,7 @@ tng_function_status tng_chain_name_of_particle_nr_get
* @return TNG_SUCCESS (0) if successful or TNG_FAILURE (!) if a minor error
* has occured.
*/
-tng_function_status tng_residue_name_of_particle_nr_get
+tng_function_status DECLSPECDLLEXPORT tng_residue_name_of_particle_nr_get
(const tng_trajectory_t tng_data,
const int64_t nr,
char *name,
@@ -1326,7 +1342,7 @@ tng_function_status tng_residue_name_of_particle_nr_get
* @return TNG_SUCCESS (0) if successful or TNG_FAILURE (!) if a minor error
* has occured.
*/
-tng_function_status tng_atom_name_of_particle_nr_get
+tng_function_status DECLSPECDLLEXPORT tng_atom_name_of_particle_nr_get
(const tng_trajectory_t tng_data,
const int64_t nr,
char *name,
@@ -1342,7 +1358,7 @@ tng_function_status tng_atom_name_of_particle_nr_get
* @return TNG_SUCCESS (0) if successful or TNG_FAILURE (!) if a minor error
* has occured.
*/
-tng_function_status tng_atom_type_of_particle_nr_get
+tng_function_status DECLSPECDLLEXPORT tng_atom_type_of_particle_nr_get
(const tng_trajectory_t tng_data,
const int64_t nr,
char *type,
@@ -1367,7 +1383,7 @@ tng_function_status tng_atom_type_of_particle_nr_get
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
-tng_function_status tng_particle_mapping_add
+tng_function_status DECLSPECDLLEXPORT tng_particle_mapping_add
(tng_trajectory_t tng_data,
const int64_t first_particle_number,
const int64_t n_particles,
@@ -1387,7 +1403,7 @@ tng_function_status tng_particle_mapping_add
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-tng_function_status tng_file_headers_read(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_file_headers_read(tng_trajectory_t tng_data,
const tng_hash_mode hash_mode);
/**
@@ -1403,7 +1419,7 @@ tng_function_status tng_file_headers_read(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-tng_function_status tng_file_headers_write(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_file_headers_write(tng_trajectory_t tng_data,
const tng_hash_mode hash_mode);
/**
@@ -1422,7 +1438,7 @@ tng_function_status tng_file_headers_write(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
-tng_function_status tng_block_read_next(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_block_read_next(tng_trajectory_t tng_data,
tng_gen_block_t block_data,
const tng_hash_mode hash_mode);
@@ -1439,7 +1455,7 @@ tng_function_status tng_block_read_next(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
-tng_function_status tng_frame_set_read_next(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_frame_set_read_next(tng_trajectory_t tng_data,
const tng_hash_mode hash_mode);
/**
@@ -1454,7 +1470,7 @@ tng_function_status tng_frame_set_read_next(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
-tng_function_status tng_frame_set_write(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_frame_set_write(tng_trajectory_t tng_data,
const tng_hash_mode hash_mode);
/**
@@ -1466,7 +1482,7 @@ tng_function_status tng_frame_set_write(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
-tng_function_status tng_frame_set_new(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_frame_set_new(tng_trajectory_t tng_data,
const int64_t first_frame,
const int64_t n_frames);
@@ -1491,7 +1507,7 @@ tng_function_status tng_frame_set_new(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
-tng_function_status tng_data_block_add(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_data_block_add(tng_trajectory_t tng_data,
const int64_t id,
const char *block_name,
const tng_data_type datatype,
@@ -1526,7 +1542,7 @@ tng_function_status tng_data_block_add(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
-tng_function_status tng_particle_data_block_add(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_particle_data_block_add(tng_trajectory_t tng_data,
const int64_t id,
const char *block_name,
const tng_data_type datatype,
@@ -1554,7 +1570,7 @@ tng_function_status tng_particle_data_block_add(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
-tng_function_status tng_frame_data_write(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_frame_data_write(tng_trajectory_t tng_data,
const int64_t frame_nr,
const int64_t block_id,
const void *data,
@@ -1579,7 +1595,7 @@ tng_function_status tng_frame_data_write(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
-tng_function_status tng_frame_particle_data_write(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_frame_particle_data_write(tng_trajectory_t tng_data,
const int64_t frame_nr,
const int64_t block_id,
const int64_t val_first_particle,
@@ -1596,7 +1612,7 @@ tng_function_status tng_frame_particle_data_write(tng_trajectory_t tng_data,
* @param type is the data type of the data in the array (e.g. int/float/char).
* @return TNG_SUCCESS (0) if successful.
*/
-tng_function_status tng_data_values_free(const tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_data_values_free(const tng_trajectory_t tng_data,
union data_values **values,
const int64_t n_frames,
const int64_t n_values_per_frame,
@@ -1612,7 +1628,7 @@ tng_function_status tng_data_values_free(const tng_trajectory_t tng_data,
* @param type is the data type of the data in the array (e.g. int/float/char).
* @return TNG_SUCCESS (0) if successful.
*/
-tng_function_status tng_particle_data_values_free(const tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_particle_data_values_free(const tng_trajectory_t tng_data,
union data_values ***values,
const int64_t n_frames,
const int64_t n_particles,
@@ -1638,7 +1654,7 @@ tng_function_status tng_particle_data_values_free(const tng_trajectory_t tng_dat
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
-tng_function_status tng_data_get(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_data_get(tng_trajectory_t tng_data,
const int64_t block_id,
union data_values ***values,
int64_t *n_frames,
@@ -1693,7 +1709,7 @@ tng_function_status tng_data_vector_get(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
-tng_function_status tng_data_interval_get(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_data_interval_get(tng_trajectory_t tng_data,
const int64_t block_id,
const int64_t start_frame_nr,
const int64_t end_frame_nr,
@@ -1726,7 +1742,7 @@ tng_function_status tng_data_interval_get(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
-tng_function_status tng_particle_data_get(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_particle_data_get(tng_trajectory_t tng_data,
const int64_t block_id,
union data_values ****values,
int64_t *n_frames,
@@ -1761,7 +1777,7 @@ tng_function_status tng_particle_data_get(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
-tng_function_status tng_particle_data_interval_get(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_particle_data_interval_get(tng_trajectory_t tng_data,
const int64_t block_id,
const int64_t start_frame_nr,
const int64_t end_frame_nr,
@@ -1777,7 +1793,7 @@ tng_function_status tng_particle_data_interval_get(tng_trajectory_t tng_data,
must be reserved beforehand.
* @return TNG_SUCCESS (0) if successful.
*/
-tng_function_status tng_time_get_str(const tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_time_get_str(const tng_trajectory_t tng_data,
char *time);
contact: Jan Huwald // Impressum