00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef CTA_METAINFO_H
00028 #define CTA_METAINFO_H
00029 #include "cta_system.h"
00030 #include "cta_handles.h"
00031 #include "cta_datatypes.h"
00032 #include "cta_functions.h"
00033 #include "cta_string.h"
00034 #include "cta_vector.h"
00035 #include "cta_matrix.h"
00036
00037
00038 typedef CTA_Handle CTA_Grid;
00039 typedef CTA_Handle CTA_Metainfo;
00040 typedef CTA_Handle CTA_MetainfoClass;
00041
00042 #include "cta_sobs.h"
00043
00044
00045 #define CTA_METAINFO_CREATE_SIZE ( 1)
00046 #define CTA_METAINFO_CREATE_INIT ( 2)
00047 #define I_CTA_METAINFO_FREE ( 3)
00048 #define I_CTA_METAINFO_GET_REST ( 4)
00049 #define I_CTA_METAINFO_GET_KEYS ( 5)
00050 #define I_CTA_METAINFO_COUNT_OBSERVATIONS ( 6)
00051 #define I_CTA_METAINFO_COUNT_PROPERTIES ( 7)
00052 #define I_CTA_METAINFO_EXPORT ( 8)
00053 #define CTA_METAINFO_NUMFUNC ( 9)
00054
00055
00056
00057
00058 typedef struct {
00059 char name[CTA_STRLEN_TAG];
00060 int type;
00061 int nx, ny, nz,nsize;
00062 double x_origin, y_origin, z_origin;
00063 double dx,dy,dz;
00064 char refdimp[10][80];
00065 } CTAI_Gridm;
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078 #ifdef __cplusplus
00079 extern "C" {
00080 #endif
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092 CTAEXPORT int CTA_Metainfo_DefineClass(const char *name,
00093 const CTA_Func h_func[CTA_METAINFO_NUMFUNC],
00094 CTA_MetainfoClass *hobsdscrcl);
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104 CTAEXPORT int CTA_Metainfo_Create( CTA_Metainfo *hobsdscr);
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124 CTAEXPORT int CTA_Metainfo_SetUnit( CTA_Metainfo hobsdscr, char* Key);
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137 CTAEXPORT int CTA_Metainfo_GetDescription(CTA_Metainfo hobsdescr, char **description);
00138
00139 CTAEXPORT int CTA_Metainfo_IsEqual( CTA_Metainfo hmeta_x, CTA_Metainfo hmeta_y );
00140
00141 CTAEXPORT int CTAI_Grid_IsEqual( CTAI_Gridm *hgrid1, CTAI_Gridm *hgrid2 );
00142
00143 CTAEXPORT int CTA_Metainfo_Import(CTA_Metainfo minfo, CTA_Handle usrdata);
00144
00145
00146 CTAEXPORT int CTA_Metainfo_SetTag(CTA_Metainfo hobsdescr, char* tagname);
00147
00148
00149 CTAEXPORT int CTA_Metainfo_Free( CTA_Metainfo *hobsdscr);
00150
00151
00152 CTAEXPORT int CTA_Metainfo_SetDescription(CTA_Metainfo hobsdescr, char* description);
00153
00154 CTAEXPORT int CTA_Metainfo_SetRest(CTA_Metainfo hobsdescr, int *rest);
00155
00156 CTAEXPORT int CTA_Metainfo_SetGrid(CTA_Metainfo hobsdescr, CTAI_Gridm *hgrid);
00157
00158 CTAEXPORT int CTA_Metainfo_GetGrid(CTA_Metainfo hobsdescr, CTAI_Gridm *hgrid);
00159
00160 CTAEXPORT int CTA_Metainfo_Copy(CTA_Metainfo hmeta_x, CTA_Metainfo hmeta_y);
00161
00162 CTAEXPORT int CTA_Metainfo_GetRest(CTA_Metainfo hobsdescr, int *rest);
00163
00164 CTAEXPORT int CTA_Metainfo_GetTag(CTA_Metainfo hobsdescr, char *tagname);
00165
00166 CTAEXPORT int CTA_Metainfo_SetBelongsTo(CTA_Metainfo hobsdescr, char* tagname);
00167
00168 CTAEXPORT int CTA_Metainfo_GetBelongsTo(CTA_Metainfo hobsdescr, char *tagname);
00169
00170 CTAEXPORT int CTAI_Grid_Interpolate(CTAI_Gridm gridy, CTAI_Gridm gridx, CTA_Vector vecx, CTA_Vector vecx_to_y);
00171
00172 CTAEXPORT int CTA_Metainfo_Export(CTA_Metainfo minfo, CTA_Handle usrdata);
00173
00174 CTAEXPORT int CTA_Metainfo_GetUnit(CTA_Metainfo hobsdescr, char *nameofunit);
00175
00176 CTAEXPORT int CTAI_XML_CreateGrid(xmlNode *cur_node, CTAI_Gridm *thisgrid);
00177
00178
00179
00180 CTAEXPORT int CTA_Metainfo_setRegGrid(CTA_Metainfo hdescr, char *name,
00181 int nx, int ny, int nz,
00182 double x_origin, double y_origin,
00183 double z_origin,
00184 double dx, double dy, double dz);
00185
00186 int CTA_Metainfo_getRegGrid(CTA_Metainfo hdescr, char *name,
00187 int *nx, int *ny, int *nz,
00188 double *x_origin, double *y_origin,
00189 double *z_origin,
00190 double *dx, double *dy, double *dz);
00191
00192 #ifdef __cplusplus
00193 }
00194 #endif
00195
00196
00197 #endif