Ignore:
Timestamp:
05/24/11 08:21:57 (13 years ago)
Author:
hozdoba
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • XMLIO_V2/dev/dev_rv/src/xmlio/output/onetcdf4.hpp

    r189 r201  
    5353      //---------------------------------------------------------------- 
    5454         public : 
     55          
     56            template <class T> 
     57               void setDefaultValue(const StdString & varname, const T * value = NULL); 
    5558          
    5659            template <class T> 
     
    137140         this->writeData_(grpid, varid, sstart, scount, data->data()); 
    138141      } 
     142       
     143      //---------------------------------------------------------------- 
     144            
     145      template <class T> 
     146         void CONetCDF4::setDefaultValue(const StdString & varname, const T * value) 
     147      { 
     148         int grpid = this->getCurrentGroup(); 
     149         int varid = this->getVariable(varname); 
     150          
     151         if (value != NULL) 
     152         { 
     153            CheckError(nc_def_var_fill(grpid, varid, 0, value)); 
     154            this->addAttribute(StdString("missing_value"), *value, &varname); 
     155         } 
     156         else 
     157            CheckError(nc_def_var_fill(grpid, varid, 1, NULL));          
     158      } 
    139159      
    140160      ///--------------------------------------------------------------- 
Note: See TracChangeset for help on using the changeset viewer.