00001
00002
00050 #ifndef OIFILE_H
00051 #define OIFILE_H
00052
00053 #include <glib.h>
00054 #include "exchange.h"
00055
00056
00057
00058
00059
00060
00061 #define MEMDUP(dest, src, size) \
00062 { (dest) = malloc((size)); memcpy((dest), (src), (size)); }
00063
00064
00065
00066
00067
00068
00070 typedef struct {
00071 int numArray;
00072 int numWavelength;
00073 int numVis;
00074 int numVis2;
00075 int numT3;
00076 oi_target targets;
00077 GList *arrayList;
00078 GList *wavelengthList;
00079 GList *visList;
00080 GList *vis2List;
00081 GList *t3List;
00082 GHashTable *arrayHash;
00083 GHashTable *wavelengthHash;
00085 } oi_fits;
00086
00087
00088
00089
00090
00091 void init_oi_fits(oi_fits *);
00092 STATUS write_oi_fits(const char *, oi_fits, STATUS *);
00093 STATUS read_oi_fits(const char *, oi_fits *, STATUS *);
00094 void free_oi_fits(oi_fits *);
00095 oi_array *oi_fits_lookup_array(const oi_fits *, const char *);
00096 element *oi_fits_lookup_element(const oi_fits *, const char *, int);
00097 oi_wavelength *oi_fits_lookup_wavelength(const oi_fits *, const char *);
00098 target *oi_fits_lookup_target(const oi_fits *, int);
00099 const char *format_oi_fits_summary(const oi_fits *);
00100 void print_oi_fits_summary(const oi_fits *);
00101 oi_target *dup_oi_target(const oi_target *);
00102 oi_array *dup_oi_array(const oi_array *);
00103 oi_wavelength *dup_oi_wavelength(const oi_wavelength *);
00104 oi_vis *dup_oi_vis(const oi_vis *);
00105 oi_vis2 *dup_oi_vis2(const oi_vis2 *);
00106 oi_t3 *dup_oi_t3(const oi_t3 *);
00107
00108 #endif
00109