# med_misc.h

Aller à la documentation de ce fichier.

    00001 /*  This file is part of MED.
    00002  *
    00003  *  COPYRIGHT (C) 1999 - 2012  EDF R&D, CEA/DEN
    00004  *  MED is free software: you can redistribute it and/or modify
    00005  *  it under the terms of the GNU Lesser General Public License as published by
    00006  *  the Free Software Foundation, either version 3 of the License, or
    00007  *  (at your option) any later version.
    00008  *
    00009  *  MED is distributed in the hope that it will be useful,
    00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    00012  *  GNU Lesser General Public License for more details.
    00013  *
    00014  *  You should have received a copy of the GNU Lesser General Public License
    00015  *  along with MED.  If not, see <http://www.gnu.org/licenses/>.
    00016  */
    00017
    00018 #ifndef MED_MISC_H
    00019 #define MED_MISC_H
    00020
    00021 #include <med.h>
    00022 #include <stdarg.h>
    00023
    00024 #ifdef __cplusplus
    00025 extern "C" {
    00026 #endif
    00027
    00028 /* Type fonction MED pour le versionement des APIs */
    00029 typedef void (*MedFuncType)(int,...) ;
    00030
    00031 extern MEDC_EXPORT
    00032 MedFuncType    _MEDversionedApi3(const char * const name, const med_int majeur,
    00033                                  const med_int mineur, const med_int release);
    00034
    00035 extern MEDC_EXPORT
    00036 med_access_mode _MEDmodeAcces (med_idt oid);
    00037 extern MEDC_EXPORT
    00038 med_err         _MEDsetModeAcces(med_idt fid, med_access_mode mode);
    00039
    00040 extern MEDC_EXPORT
    00041 med_err           _MEDfileVersionSetCache(const med_idt oid,const med_file_version v);
    00042 extern MEDC_EXPORT
    00043 med_file_version  _MEDfileVersion(const med_idt oid);
    00044
    00045 extern MEDC_EXPORT
    00046 med_bool _MEDfieldChecked(const med_idt oid,const char * const fieldname);
    00047 extern MEDC_EXPORT
    00048 med_err _MEDfieldCheckedSetCache(const med_idt      oid,
    00049                                  const char * const fieldname,
    00050                                  const med_bool         ischecked);
    00051
    00052 /* CHAINES DE CARACTERES FORTRAN => C */
    00053 extern MEDC_EXPORT
    00054 med_err _MEDcstring(char *source, char *dest);
    00055
    00056 extern MEDC_EXPORT
    00057 char *_MED1cstring(char *chaine,int longueur_reelle,int longueur_fixee);
    00058
    00059 extern MEDC_EXPORT
    00060 char *_MED2cstring(char *chaine, int longueur);
    00061
    00062 extern MEDC_EXPORT
    00063 med_err _MEDcstringFree(char *chaine);
    00064
    00065 extern MEDC_EXPORT
    00066 med_err _MEDfstring(char *chaine, med_int longueur_fixee);
    00067
    00068 extern MEDC_EXPORT
    00069 med_err _MEDc2fString(const char *   const chainec,
    00070                             char *   const chainef,
    00071                       med_int        longueur_buffer77);
    00072
    00073
    00074 extern MEDC_EXPORT med_err
    00075 _MEDgetDatasetName(char * const datasetname,
    00076                    const med_data_type datatype,
    00077                    med_connectivity_mode cmode );
    00078
    00079 extern MEDC_EXPORT med_err
    00080 _MEDgetDatasetParameter(const med_data_type         meddatatype,
    00081                         const med_int               spacedim,
    00082                         const med_entity_type       entitytype,
    00083                         const med_geometry_type     geotype,
    00084                         const med_connectivity_mode cmode,
    00085                         med_int * const             nvalueperentity,
    00086                         med_int * const             nconstituentpervalue);
    00087
    00088 extern MEDC_EXPORT med_err
    00089 _MEDgetDatatype(med_internal_type  * const datatype,
    00090                 const med_data_type        meddatatype,
    00091                 med_connectivity_mode      cmode );
    00092
    00093 extern MEDC_EXPORT med_err
    00094 _MEDgetEntityTypeName(char * const entitytypename,
    00095                       const med_entity_type entitytype);
    00096
    00097 extern MEDC_EXPORT med_err
    00098 _MEDgetGeometricParameter(const med_entity_type       entitytype,
    00099                           const med_geometry_type     geotype,
    00100                           med_int * const             entdim,
    00101                           med_int * const             nnodes,
    00102                           med_int * const             nndes);
    00103
    00104 extern MEDC_EXPORT med_err
    00105 _MEDgetDynGeometricParameter(const med_idt fid,
    00106                              const med_entity_type       entitytype,
    00107                              const med_geometry_type     geotype,
    00108                              med_int * const             entdim,
    00109                              med_int * const             nnodes,
    00110                              med_int * const             ncells);
    00111
    00112 extern MEDC_EXPORT med_err
    00113 _MEDgetInternalGeometryTypeName(char * const geotypename,med_geometry_type geotype);
    00114
    00115 extern MEDC_EXPORT med_err
    00116 _MEDgetExternalGeometryTypeName(char * const geotypename,med_geometry_type geotype);
    00117
    00118 extern MEDC_EXPORT med_err
    00119 _MEDmeshtypeCompatibility(const med_data_type meddatatype,
    00120                           const med_mesh_type meshtype );
    00121
    00122 extern MEDC_EXPORT med_err
    00123 _MEDsetFilter(const med_int nspaces, const med_idt* const memspace,
    00124               const med_idt *const diskspace, const med_int nentity,
    00125               const med_int nvaluesperentity, const med_int nconstituentpervalue,
    00126               const med_int constituentselect, const med_switch_mode switchmode,
    00127               const med_int filterarraysize, const med_int profilearraysize, const med_storage_mode storagemode,
    00128               const char* const profilename, med_filter* const filter);
    00129
    00130 extern MEDC_EXPORT med_err
    00131 _MEDcheckVersion30(med_idt fid);
    00132
    00133 /*From C++*/
    00134 extern MEDC_EXPORT med_err
    00135 MEDversionLire(med_idt fid, med_int *majeur, med_int *mineur, med_int *release);
    00136
    00137 extern MEDC_EXPORT
    00138 med_geometry_type MEDgetGeometryTypeFromName(const char * const keycharpart);
    00139
    00140 extern MEDC_EXPORT
    00141 med_err _MEDgetSupportMeshNbOfEntities(med_idt                   fid,
    00142                                        const char * const        smeshname,
    00143                                        med_entity_type * const   smeshentitype,
    00144                                        med_geometry_type * const smeshgeotype,
    00145                                        char * const              smeshgeotypename,
    00146                                        med_int * const           smeshnentity);
    00147
    00148 /* Gestion des messages d'erreur */
    00149 /* extern MEDC_EXPORT */
    00150 /* void exit_if(char * fichier,int ligne, int condition,char * message, char * arg); */
    00151 #include <med_exit_if.h>
    00152
    00153 #ifdef __cplusplus
    00154 }
    00155 #endif
    00156
    00157 #endif /* MED_MISC_H */
    00158