MED fichier: Fichier source de med_misc.h

MED fichier

med_misc.h
Aller à la documentation de ce fichier.
1 /* This file is part of MED.
2 *
3 * COPYRIGHT (C) 1999 - 2021 EDF R&D, CEA/DEN
4 * MED is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * MED is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with MED. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18 #ifndef MED_MISC_H
19 #define MED_MISC_H
20
21 #include <med.h>
22 #include <stdarg.h>
23
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27
28 /* Type fonction MED pour le versionement des APIs */
29 typedef void (*MedFuncType)(int,...) ;
30
31 extern MEDC_EXPORT
32 MedFuncType _MEDversionedApi3(const char * const name, const med_int majeur,
33 const med_int mineur, const med_int release);
34
35 extern MEDC_EXPORT
36 med_access_mode _MEDmodeAcces (med_idt oid);
37 extern MEDC_EXPORT
38 med_err _MEDsetModeAcces(med_idt fid, med_access_mode mode);
39
40 extern MEDC_EXPORT
41 med_err _MEDfileVersionSetCache(const med_idt oid,const med_file_version v);
42 extern MEDC_EXPORT
43 med_file_version _MEDfileVersion(const med_idt oid);
44
45 extern MEDC_EXPORT
46 med_bool _MEDfieldChecked(const med_idt oid,const char * const fieldname);
47 extern MEDC_EXPORT
48 med_err _MEDfieldCheckedSetCache(const med_idt oid,
49 const char * const fieldname,
50 const med_bool ischecked);
51
52 /* CHAINES DE CARACTERES FORTRAN => C */
53 extern MEDC_EXPORT
54 med_err _MEDcstring(char *source, char *dest);
55
56 extern MEDC_EXPORT
57 char *_MED1cstring(char *chaine,int longueur_reelle,int longueur_fixee);
58
59 extern MEDC_EXPORT
60 char *_MED2cstring(char *chaine, int longueur);
61
62 extern MEDC_EXPORT
63 med_err _MEDcstringFree(char *chaine);
64
65 extern MEDC_EXPORT
66 med_err _MEDfstring(char *chaine, med_int longueur_fixee);
67
68 extern MEDC_EXPORT
69 med_err _MEDc2fString(const char * const chainec,
70 char * const chainef,
71 med_int longueur_buffer77);
72
73
74 extern MEDC_EXPORT med_err
75 _MEDgetDatasetName(char * const datasetname,
76 const med_data_type datatype,
77 med_connectivity_mode cmode );
78
79 extern MEDC_EXPORT med_err
80 _MEDgetDatasetParameter(const med_data_type meddatatype,
81 const med_int spacedim,
82 const med_entity_type entitytype,
83 const med_geometry_type geotype,
84 const med_connectivity_mode cmode,
85 med_int * const nvalueperentity,
86 med_int * const nconstituentpervalue);
87
88 extern MEDC_EXPORT med_err
89 _MEDgetDatatype(med_internal_type * const datatype,
90 const med_data_type meddatatype,
91 med_connectivity_mode cmode );
92
93 extern MEDC_EXPORT med_err
94 _MEDgetEntityTypeName(char * const entitytypename,
95 const med_entity_type entitytype);
96 extern MEDC_EXPORT med_err
97 _MEDgetFieldEntityGeoTypeName(med_idt fid,
98 char * const entitygeotypename,
99 const med_entity_type entitytype,
100 const med_geometry_type geotype );
101
102 extern MEDC_EXPORT med_err
103 _MEDgetGeometricParameter(const med_entity_type entitytype,
104 const med_geometry_type geotype,
105 med_int * const entdim,
106 med_int * const nnodes,
107 med_int * const nndes);
108
109 extern MEDC_EXPORT med_err
110 _MEDgetDynGeometricParameter(const med_idt fid,
111 const med_entity_type entitytype,
112 const med_geometry_type geotype,
113 med_int * const entdim,
114 med_int * const nnodes,
115 med_int * const ncells);
116
117 extern MEDC_EXPORT med_err
118 _MEDgetInternalGeometryTypeName(const med_idt fid, char * const geotypename, med_geometry_type geotype);
119
120 extern MEDC_EXPORT med_err
121 _MEDgetExternalGeometryTypeName(char * const geotypename,med_geometry_type geotype);
122
123 extern MEDC_EXPORT med_err
124 _MEDmeshtypeCompatibility(const med_data_type meddatatype,
125 const med_mesh_type meshtype );
126
127 extern MEDC_EXPORT med_err
128 _MEDsetFilter(const med_int nspaces, const med_idt* const memspace,
129 const med_idt *const diskspace, const med_int nentity,
130 const med_int nvaluesperentity, const med_int nconstituentpervalue,
131 const med_int constituentselect, const med_switch_mode switchmode,
132 const med_int filterarraysize, const med_int profilearraysize, const med_storage_mode storagemode,
133 const char* const profilename, med_filter* const filter);
134
135 extern MEDC_EXPORT med_err
136 _MEDcheckVersion30(med_idt fid);
137
138 /*From C++*/
139 extern MEDC_EXPORT med_err
140 MEDversionLire(med_idt fid, med_int *majeur, med_int *mineur, med_int *release);
141
142 extern MEDC_EXPORT
143 med_geometry_type MEDgetGeometryTypeFromIname(const char * const keycharpart);
144
145 extern MEDC_EXPORT
146 med_err _MEDgetSupportMeshNbOfEntities(med_idt fid,
147 const char * const smeshname,
148 med_entity_type * const smeshentitype,
149 med_geometry_type * const smeshgeotype,
150 char * const smeshgeotypename,
151 med_int * const smeshnentity);
152
153 extern MEDC_EXPORT
154 const char * const _MEDgetEntityListAttributeIName(const med_entity_type entitytype);
155
156 extern MEDC_EXPORT
157 const char * const _MEDgetEntityListAttributeINameAll(const med_entity_type entitytype);
158
159 extern MEDC_EXPORT
160 int _MEDaccess(const char * const file, int mode);
161
162 /* Gestion des messages d'erreur */
163 /* extern MEDC_EXPORT */
164 /* void exit_if(char * fichier,int ligne, int condition,char * message, char * arg); */
165 #include <med_exit_if.h>
166
167 #ifdef __cplusplus
168 }
169 #endif
170
171 #endif /* MED_MISC_H */
172
MEDC_EXPORT
#define MEDC_EXPORT
Definition: medC_win_dll.h:29
_MEDversionedApi3
MEDC_EXPORT MedFuncType _MEDversionedApi3(const char *const name, const med_int majeur, const med_int mineur, const med_int release)
_MEDfieldCheckedSetCache
MEDC_EXPORT med_err _MEDfieldCheckedSetCache(const med_idt oid, const char *const fieldname, const med_bool ischecked)
med_filter
Filtre de sélection.
Definition: med.h:355
_MEDfstring
MEDC_EXPORT med_err _MEDfstring(char *chaine, med_int longueur_fixee)
med_geometry_type
int med_geometry_type
Definition: med.h:194
MEDgetGeometryTypeFromIname
MEDC_EXPORT med_geometry_type MEDgetGeometryTypeFromIname(const char *const keycharpart)
_MEDmodeAcces
MEDC_EXPORT med_access_mode _MEDmodeAcces(med_idt oid)
med_idt
hid_t med_idt
Definition: med.h:331
_MEDgetFieldEntityGeoTypeName
MEDC_EXPORT med_err _MEDgetFieldEntityGeoTypeName(med_idt fid, char *const entitygeotypename, const med_entity_type entitytype, const med_geometry_type geotype)
_MEDgetEntityTypeName
MEDC_EXPORT med_err _MEDgetEntityTypeName(char *const entitytypename, const med_entity_type entitytype)
_MED1cstring
MEDC_EXPORT char * _MED1cstring(char *chaine, int longueur_reelle, int longueur_fixee)
med_err
herr_t med_err
Definition: med.h:332
_MEDfieldChecked
MEDC_EXPORT med_bool _MEDfieldChecked(const med_idt oid, const char *const fieldname)
MedFuncType
void(* MedFuncType)(int,...)
Definition: med_misc.h:29
med_entity_type
med_entity_type
Definition: med.h:143
_MEDaccess
MEDC_EXPORT int _MEDaccess(const char *const file, int mode)
med_internal_type
med_internal_type
Definition: med.h:156
med_file_version
Structure d'acceuil du numéro de version MED d'un fichier.
Definition: med.h:385
_MEDsetModeAcces
MEDC_EXPORT med_err _MEDsetModeAcces(med_idt fid, med_access_mode mode)
_MEDgetInternalGeometryTypeName
MEDC_EXPORT med_err _MEDgetInternalGeometryTypeName(const med_idt fid, char *const geotypename, med_geometry_type geotype)
_MEDgetEntityListAttributeINameAll
const MEDC_EXPORT char *const _MEDgetEntityListAttributeINameAll(const med_entity_type entitytype)
med_int
int med_int
Definition: med.h:342
_MEDgetDatasetName
MEDC_EXPORT med_err _MEDgetDatasetName(char *const datasetname, const med_data_type datatype, med_connectivity_mode cmode)
_MED2cstring
MEDC_EXPORT char * _MED2cstring(char *chaine, int longueur)
med.h
med_bool
med_bool
Definition: med.h:260
med_exit_if.h
_MEDsetFilter
MEDC_EXPORT med_err _MEDsetFilter(const med_int nspaces, const med_idt *const memspace, const med_idt *const diskspace, const med_int nentity, const med_int nvaluesperentity, const med_int nconstituentpervalue, const med_int constituentselect, const med_switch_mode switchmode, const med_int filterarraysize, const med_int profilearraysize, const med_storage_mode storagemode, const char *const profilename, med_filter *const filter)
_MEDgetDynGeometricParameter
MEDC_EXPORT med_err _MEDgetDynGeometricParameter(const med_idt fid, const med_entity_type entitytype, const med_geometry_type geotype, med_int *const entdim, med_int *const nnodes, med_int *const ncells)
med_access_mode
med_access_mode
Definition: med.h:120
MEDversionLire
MEDC_EXPORT med_err MEDversionLire(med_idt fid, med_int *majeur, med_int *mineur, med_int *release)
med_mesh_type
med_mesh_type
Definition: med.h:131
_MEDfileVersionSetCache
MEDC_EXPORT med_err _MEDfileVersionSetCache(const med_idt oid, const med_file_version v)
_MEDgetSupportMeshNbOfEntities
MEDC_EXPORT med_err _MEDgetSupportMeshNbOfEntities(med_idt fid, const char *const smeshname, med_entity_type *const smeshentitype, med_geometry_type *const smeshgeotype, char *const smeshgeotypename, med_int *const smeshnentity)
_MEDgetGeometricParameter
MEDC_EXPORT med_err _MEDgetGeometricParameter(const med_entity_type entitytype, const med_geometry_type geotype, med_int *const entdim, med_int *const nnodes, med_int *const nndes)
med_switch_mode
med_switch_mode
Definition: med.h:96
_MEDcheckVersion30
MEDC_EXPORT med_err _MEDcheckVersion30(med_idt fid)
med_data_type
med_data_type
Definition: med.h:149
_MEDcstringFree
MEDC_EXPORT med_err _MEDcstringFree(char *chaine)
_MEDgetDatatype
MEDC_EXPORT med_err _MEDgetDatatype(med_internal_type *const datatype, const med_data_type meddatatype, med_connectivity_mode cmode)
_MEDfileVersion
MEDC_EXPORT med_file_version _MEDfileVersion(const med_idt oid)
med_storage_mode
med_storage_mode
Definition: med.h:108
_MEDmeshtypeCompatibility
MEDC_EXPORT med_err _MEDmeshtypeCompatibility(const med_data_type meddatatype, const med_mesh_type meshtype)
_MEDcstring
MEDC_EXPORT med_err _MEDcstring(char *source, char *dest)
_MEDgetDatasetParameter
MEDC_EXPORT med_err _MEDgetDatasetParameter(const med_data_type meddatatype, const med_int spacedim, const med_entity_type entitytype, const med_geometry_type geotype, const med_connectivity_mode cmode, med_int *const nvalueperentity, med_int *const nconstituentpervalue)
_MEDc2fString
MEDC_EXPORT med_err _MEDc2fString(const char *const chainec, char *const chainef, med_int longueur_buffer77)
_MEDgetEntityListAttributeIName
const MEDC_EXPORT char *const _MEDgetEntityListAttributeIName(const med_entity_type entitytype)
_MEDgetExternalGeometryTypeName
MEDC_EXPORT med_err _MEDgetExternalGeometryTypeName(char *const geotypename, med_geometry_type geotype)
med_connectivity_mode
med_connectivity_mode
Definition: med.h:255