Ignore:
Timestamp:
09/15/15 15:15:57 (9 years ago)
Author:
rlacroix
Message:

Use the NetCDF wrapper for inputs for better error checking.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/io/netCdfInterface_decl.cpp

    r685 r686  
    1212namespace xios 
    1313{ 
    14 #define  macroPutAtt(type) \ 
    15   template int CNetCdfInterface::putAttType(int ncid, int varid, const StdString& attrName, \ 
    16                                             StdSize numVal, const type* op); 
     14#define macroAtt(type) \ 
     15  template int CNetCdfInterface::getAttType(int ncid, int varid, const StdString& attrName, type* data); \ 
     16  template int CNetCdfInterface::putAttType(int ncid, int varid, const StdString& attrName,              \ 
     17                                            StdSize numVal, const type* data); 
    1718 
    18   macroPutAtt(double); 
    19   macroPutAtt(float); 
    20   macroPutAtt(int); 
    21   macroPutAtt(long); 
    22   macroPutAtt(short); 
     19  macroAtt(double) 
     20  macroAtt(float) 
     21  macroAtt(int) 
     22  macroAtt(long) 
     23  macroAtt(short) 
     24  macroAtt(char) 
    2325 
    24 #define  macroPutVar(type) \ 
     26#define macroPutVar(type) \ 
     27 template int CNetCdfInterface::getVaraType(int ncid, int varId, const StdSize* start, \ 
     28                                            const StdSize* count, type* data);         \ 
    2529 template int CNetCdfInterface::putVaraType(int ncid, int varId, const StdSize* start, \ 
    26                                             const StdSize* count, const type* op); 
    27   macroPutVar(double); 
    28   macroPutVar(float); 
    29   macroPutVar(int); 
     30                                            const StdSize* count, const type* data); 
     31 
     32  macroPutVar(double) 
     33  macroPutVar(float) 
     34  macroPutVar(int) 
     35 
     36#define macroType(type, ncType) \ 
     37  template<> nc_type CNetCdfInterface::getNcType<type>() { return ncType; } 
     38 
     39  macroType(double, NC_DOUBLE) 
     40  macroType(float, NC_FLOAT) 
     41  macroType(int, NC_INT) 
     42  macroType(long, NC_LONG) 
     43  macroType(short, NC_SHORT) 
     44  macroType(char, NC_CHAR) 
    3045} 
Note: See TracChangeset for help on using the changeset viewer.