summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMagnus Lundborg <lundborg.magnus@gmail.com>2014-01-08 08:03:28 (GMT)
committerMagnus Lundborg <lundborg.magnus@gmail.com>2014-01-08 08:03:28 (GMT)
commitc3617738c8183748a2128126e612e74ea660bf87 (patch)
tree910cce144af2ce98975caf58e0eed39c2644f445 /include
parent87d2272197b6c9cfd27aec0da5af627001d9b95e (diff)
Do forward declarations in separate header file.
Also fixed some cmake warnings.
Diffstat (limited to 'include')
-rw-r--r--include/tng_io.h26
-rw-r--r--include/tng_io_fwd.h41
2 files changed, 42 insertions, 25 deletions
diff --git a/include/tng_io.h b/include/tng_io.h
index 58b9235..3a5aa37 100644
--- a/include/tng_io.h
+++ b/include/tng_io.h
@@ -275,7 +275,7 @@
#include <stdlib.h>
#include <string.h>
#include <assert.h>
-
+#include "tng_io_fwd.h"
#ifdef USE_STD_INTTYPES_H
#include <inttypes.h>
@@ -503,30 +503,6 @@ struct tng_trajectory_frame_set;
struct tng_particle_data;
struct tng_non_particle_data;
-/** A pointer to the main trajectory data storage. */
-typedef struct tng_trajectory *tng_trajectory_t;
-/** A pointer to a molecule description. */
-typedef struct tng_molecule *tng_molecule_t;
-/** A pointer to a molecular chain description. */
-typedef struct tng_chain *tng_chain_t;
-/** A pointer to a molecular residue description. */
-typedef struct tng_residue *tng_residue_t;
-/** A pointer to a molecular atom description. */
-typedef struct tng_atom *tng_atom_t;
-/** A pointer to a bond between two atoms. */
-typedef struct tng_bond *tng_bond_t;
-/** A pointer to a structure containing data common to all trajectory blocks,
- * such as header and contents. */
-typedef struct tng_gen_block *tng_gen_block_t;
-/** A pointer to particle mapping information. */
-typedef struct tng_particle_mapping *tng_particle_mapping_t;
-/** A pointer to a structure containing frame set information. */
-typedef struct tng_trajectory_frame_set *tng_trajectory_frame_set_t;
-/** A pointer to a particle data container. */
-typedef struct tng_particle_data *tng_particle_data_t;
-/** A pointer to a non-particle data container. */
-typedef struct tng_non_particle_data *tng_non_particle_data_t;
-
/** Data can be either double, float, int or a string */
union data_values {
double d;
diff --git a/include/tng_io_fwd.h b/include/tng_io_fwd.h
new file mode 100644
index 0000000..e7abac4
--- /dev/null
+++ b/include/tng_io_fwd.h
@@ -0,0 +1,41 @@
+/* This code is part of the tng binary trajectory format.
+ *
+ * VERSION 1.4
+ *
+ * Written by Magnus Lundborg
+ * Copyright (c) 2012-2013, The GROMACS development team.
+ * Check out http://www.gromacs.org for more information.
+ *
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the Revised BSD License.
+ */
+
+#ifndef TNG_IO_FWD_H
+#define TNG_IO_FWD_H 1
+
+/** A pointer to the main trajectory data storage. */
+typedef struct tng_trajectory *tng_trajectory_t;
+/** A pointer to a molecule description. */
+typedef struct tng_molecule *tng_molecule_t;
+/** A pointer to a molecular chain description. */
+typedef struct tng_chain *tng_chain_t;
+/** A pointer to a molecular residue description. */
+typedef struct tng_residue *tng_residue_t;
+/** A pointer to a molecular atom description. */
+typedef struct tng_atom *tng_atom_t;
+/** A pointer to a bond between two atoms. */
+typedef struct tng_bond *tng_bond_t;
+/** A pointer to a structure containing data common to all trajectory blocks,
+ * such as header and contents. */
+typedef struct tng_gen_block *tng_gen_block_t;
+/** A pointer to particle mapping information. */
+typedef struct tng_particle_mapping *tng_particle_mapping_t;
+/** A pointer to a structure containing frame set information. */
+typedef struct tng_trajectory_frame_set *tng_trajectory_frame_set_t;
+/** A pointer to a particle data container. */
+typedef struct tng_particle_data *tng_particle_data_t;
+/** A pointer to a non-particle data container. */
+typedef struct tng_non_particle_data *tng_non_particle_data_t;
+
+#endif \ No newline at end of file
contact: Jan Huwald // Impressum