MED fichier
MEDfileObjectDescriptionWrByPath.c
Aller à la documentation de ce fichier.
1/* This file is part of MED.
2 *
3 * COPYRIGHT (C) 1999 - 2025 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
19#include <med.h>
20#include <med_config.h>
21#include <med_outils.h>
22
23#include <string.h>
24
25
39 med_path * const medpath,
40 const char * const description)
41{
42 med_err _ret = -1;
43 /* int _i = 0; */
44
45 /*
46 * On inhibe le gestionnaire d'erreur HDF
47 */
49 if (_MEDcheckVersion30(fid) < 0) goto ERROR;
50
51 if ( _MEDgetObjectStringPath(medpath) < 0 ) {
52 MED_ERR_(_ret,MED_ERR_CALL,MED_ERR_API,"_MEDgetObjectStringPath");
53 ISCRUTE(medpath->medclass);
54 ISCRUTE(medpath->nname);
55 /* for (_i=0;_i<medpath->nname;++_i) { */
56 /* SSCRUTE(medpath->name[_i]); */
57 /* } */
58 goto ERROR;
59 }
60
62 medpath->_datagroupname,
65 description ) <0 ) {
66 MED_ERR_(_ret,MED_ERR_CALL,MED_ERR_API,"_MEDattributeStringWrByName");
67 SSCRUTE(medpath->_datagroupname);
69 goto ERROR;
70 }
71
72 SORTIE:
73 _ret=0;
74
75 ERROR:
76
77 return _ret;
78}
#define MED_COMMENT_SIZE
#define MED_ERR_(rt, r1, r2, r3)
#define SSCRUTE(chaine)
#define ISCRUTE(entier)
med_err MEDfileObjectDescriptionWrByPath(const med_idt fid, med_path *const medpath, const char *const description)
Ecrit une description associée à l'objet accessible par le chemin med_path dans le fichier fid .
#define MED_ERR_CALL
Definition med_err.h:48
#define MED_ERR_API
Definition med_err.h:111
MEDC_EXPORT med_err _MEDattributeStringWrByName(med_idt pid, const char *const path, const char *const attname, const med_size attsize, const char *const val)
MEDC_EXPORT void _MEDmodeErreurVerrouiller(void)
MEDC_EXPORT med_err _MEDcheckVersion30(med_idt fid)
MEDC_EXPORT med_err _MEDgetObjectStringPath(med_path *const medpath)
#define MED_NOM_DES
Definition med_outils.h:54
const char *const description
Definition medfile.h:65
char _datagroupname[MED_MAX_DATAGROUPNAME_IN_PATH+1]
Aggrégation de noms medfichier pour définir un chemin d'accès aux objets med de type class med_class.