med_misc.h
Aller à la documentation de ce fichier.
/* This file is part of MED.
*
* COPYRIGHT (C) 1999 - 2021 EDF R&D, CEA/DEN
* MED is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* MED is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with MED. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MED_MISC_H
#define MED_MISC_H
#include <med.h>
#include <stdarg.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Type fonction MED pour le versionement des APIs */
typedef void (*MedFuncType)(int,...) ;
extern MEDC_EXPORT
MedFuncType _MEDversionedApi3(const char * const name, const med_int majeur,
const med_int mineur, const med_int release);
extern MEDC_EXPORT
med_access_mode _MEDmodeAcces (med_idt oid);
extern MEDC_EXPORT
med_err _MEDsetModeAcces(med_idt fid, med_access_mode mode);
extern MEDC_EXPORT
med_err _MEDfileVersionSetCache(const med_idt oid,const med_file_version v);
extern MEDC_EXPORT
med_file_version _MEDfileVersion(const med_idt oid);
extern MEDC_EXPORT
med_bool _MEDfieldChecked(const med_idt oid,const char * const fieldname);
extern MEDC_EXPORT
med_err _MEDfieldCheckedSetCache(const med_idt oid,
const char * const fieldname,
const med_bool ischecked);
/* CHAINES DE CARACTERES FORTRAN => C */
extern MEDC_EXPORT
med_err _MEDcstring(char *source, char *dest);
extern MEDC_EXPORT
char *_MED1cstring(char *chaine,int longueur_reelle,int longueur_fixee);
extern MEDC_EXPORT
char *_MED2cstring(char *chaine, int longueur);
extern MEDC_EXPORT
med_err _MEDcstringFree(char *chaine);
extern MEDC_EXPORT
med_err _MEDfstring(char *chaine, med_int longueur_fixee);
extern MEDC_EXPORT
med_err _MEDc2fString(const char * const chainec,
char * const chainef,
med_int longueur_buffer77);
extern MEDC_EXPORT med_err
_MEDgetDatasetName(char * const datasetname,
const med_data_type datatype,
med_connectivity_mode cmode );
extern 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);
extern MEDC_EXPORT med_err
_MEDgetDatatype(med_internal_type * const datatype,
const med_data_type meddatatype,
med_connectivity_mode cmode );
extern MEDC_EXPORT med_err
_MEDgetEntityTypeName(char * const entitytypename,
const med_entity_type entitytype);
extern MEDC_EXPORT med_err
_MEDgetFieldEntityGeoTypeName(med_idt fid,
char * const entitygeotypename,
const med_entity_type entitytype,
const med_geometry_type geotype );
extern 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);
extern 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);
extern MEDC_EXPORT med_err
_MEDgetInternalGeometryTypeName(const med_idt fid, char * const geotypename, med_geometry_type geotype);
extern MEDC_EXPORT med_err
_MEDgetExternalGeometryTypeName(char * const geotypename,med_geometry_type geotype);
extern MEDC_EXPORT med_err
_MEDmeshtypeCompatibility(const med_data_type meddatatype,
const med_mesh_type meshtype );
extern 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);
extern MEDC_EXPORT med_err
_MEDcheckVersion30(med_idt fid);
/*From C++*/
extern MEDC_EXPORT med_err
MEDversionLire(med_idt fid, med_int *majeur, med_int *mineur, med_int *release);
extern MEDC_EXPORT
med_geometry_type MEDgetGeometryTypeFromIname(const char * const keycharpart);
extern 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);
extern MEDC_EXPORT
const char * const _MEDgetEntityListAttributeIName(const med_entity_type entitytype);
extern MEDC_EXPORT
const char * const _MEDgetEntityListAttributeINameAll(const med_entity_type entitytype);
extern MEDC_EXPORT
int _MEDaccess(const char * const file, int mode);
/* Gestion des messages d'erreur */
/* extern MEDC_EXPORT */
/* void exit_if(char * fichier,int ligne, int condition,char * message, char * arg); */
#include <med_exit_if.h>
#ifdef __cplusplus
}
#endif
#endif /* MED_MISC_H */
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