_MEDfield23nValue30.c

Aller à la documentation de ce fichier.
00001 /*  This file is part of MED.
00002  *
00003  *  COPYRIGHT (C) 1999 - 2011  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 
00019 #include <med.h>
00020 #include <med_config.h>
00021 #include <string.h>
00022 #include <stdlib.h>
00023 #include <med_outils.h>
00024 
00025 #include "med_versioned.h"
00026 
00027 void
00028 _MEDfield23nValue30(int dummy, ...)
00029 {
00030   va_list params;
00031   va_start(params,dummy);
00032 
00033   const med_idt           fid                        = va_arg(params,const med_idt            );
00034   const char * const      fieldname                  = va_arg(params,const char * const       );
00035   const med_int           numdt                      = va_arg(params,const med_int            );
00036   const med_int           numit                      = va_arg(params,const med_int            );
00037   const med_entity_type   entitytype                 = va_arg(params,const med_entity_type    );
00038   const med_geometry_type geotype                    = va_arg(params,const med_geometry_type  );
00039   const char * const      meshname                   = va_arg(params,const char * const       );
00040   char * const            profilename                = va_arg(params,char * const       );
00041   const int               profileit                  = va_arg(params,const int                );
00042   const med_storage_mode  storagemode                = va_arg(params,const med_storage_mode   );
00043   med_int * const   profilesize                = va_arg(params,med_int * const          );
00044   char * const      localizationname           = va_arg(params,char * const             );
00045   med_int * const   nbofintegrationpoint       = va_arg(params,med_int * const          );
00046   med_int *         fret                       = va_arg(params,        med_int *);
00047 
00048   char     _meshname          [MED_NAME_SIZE+1]="";
00049   char     _path[MED_TAILLE_CHA+MED_NAME_SIZE+1]=MED_CHA;
00050   med_int  _ret=-1;
00051 
00052   strcat(_path,fieldname);
00053 
00054   /* Lecture de l'attribut MED_NOM_MAI */
00055   if ( _MEDattributeStringRdByName(fid,_path,MED_NOM_MAI,MED_NAME_SIZE,_meshname) < 0) {
00056     MED_ERR_(_ret,MED_ERR_READ,MED_ERR_ATTRIBUTE,MED_ERR_FIELD_MSG);
00057     SSCRUTE(_path);SSCRUTE(MED_NOM_MAI);SSCRUTE(_meshname);
00058     goto ERROR;
00059   }
00060 
00061   if ( strlen(meshname) )
00062     if (strcmp(_meshname,meshname) ) {
00063       MED_ERR_(_ret,MED_ERR_INVALID,MED_ERR_PARAMETER,"meshname");
00064       SSCRUTE(_path);SSCRUTE(_meshname);SSCRUTE(meshname);
00065       goto ERROR;
00066     }
00067 
00068 
00069   _MEDfieldnValue30 (dummy,
00070                      fid,
00071                      fieldname,
00072                      numdt,
00073                      numit,
00074                      entitytype,
00075                      geotype,
00076                      profilename,
00077                      profileit,
00078                      storagemode,
00079                      profilesize,
00080                      localizationname,
00081                      nbofintegrationpoint,
00082                      fret);
00083 
00084   if (*fret  < 0 ) {
00085     MED_ERR_(_ret,MED_ERR_CALL,MED_ERR_API,"_MEDfieldnValue30");
00086     goto ERROR;
00087   }
00088 
00089   _ret=*fret;
00090 
00091  ERROR:
00092   va_end(params);
00093   *fret =_ret;
00094 
00095   return;
00096 }

Généré le Mon May 16 17:10:22 2011 pour MED fichier par  doxygen 1.6.1