Ignore:
Timestamp:
09/14/11 10:26:16 (13 years ago)
Author:
hozdoba
Message:

Suite nouvelle interface fortran

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XMLIO_V2/dev/dev_rv/src/xmlio/fortran/icfield.cpp

    r270 r271  
    2828   { 
    2929      std::string name_str;  
    30       if (!cstr2string(name, name_size, name_str)) return;  
     30      if (!cstr2string(name, name_size, name_str)) return; 
     31 
     32      field_hdl->name.setValue(name_str); 
    3133   } 
    3234    
     
    3436   { 
    3537      std::string standard_name_str;  
    36       if (!cstr2string(standard_name, standard_name_size, standard_name_str)) return;  
     38      if (!cstr2string(standard_name, standard_name_size, standard_name_str)) return; 
     39 
     40      field_hdl->standard_name.setValue(standard_name_str); 
    3741   } 
    3842    
     
    4044   { 
    4145      std::string long_name_str;  
    42       if (!cstr2string(long_name, long_name_size, long_name_str)) return;   
     46      if (!cstr2string(long_name, long_name_size, long_name_str)) return; 
     47 
     48      field_hdl->long_name.setValue(long_name_str); 
    4349   } 
    4450    
     
    4652   { 
    4753      std::string unit_str;  
    48       if (!cstr2string(unit, unit_size, unit_str)) return;  
     54      if (!cstr2string(unit, unit_size, unit_str)) return; 
     55 
     56      field_hdl->unit.setValue(unit_str); 
    4957   } 
    5058    
     
    5260   { 
    5361      std::string operation_str;  
    54       if (!cstr2string(operation, operation_size, operation_str)) return;  
     62      if (!cstr2string(operation, operation_size, operation_str)) return; 
     63 
     64      field_hdl->operation.setValue(operation_str); 
    5565   } 
    5666    
     
    5868   { 
    5969      std::string freq_op_str;  
    60       if (!cstr2string(freq_op, freq_op_size, freq_op_str)) return;  
     70      if (!cstr2string(freq_op, freq_op_size, freq_op_str)) return; 
     71 
     72      field_hdl->freq_op.setValue(freq_op_str); 
    6173   } 
    6274    
    6375   void xios_set_field_level(XFieldPtr field_hdl, int level) 
    6476   { 
    65        
     77      field_hdl->level.setValue(level); 
    6678   } 
    6779    
    6880   void xios_set_field_prec(XFieldPtr field_hdl, int prec) 
    6981   { 
    70        
     82      field_hdl->prec.setValue(prec); 
    7183   } 
    7284    
    7385   void xios_set_field_enabled(XFieldPtr field_hdl, bool enabled) 
    7486   { 
    75        
     87      field_hdl->enabled.setValue(enabled); 
    7688   } 
    7789    
     
    7991   { 
    8092      std::string domain_ref_str;  
    81       if (!cstr2string(domain_ref, domain_ref_size, domain_ref_str)) return;  
     93      if (!cstr2string(domain_ref, domain_ref_size, domain_ref_str)) return; 
     94 
     95      field_hdl->domain_ref.setValue(domain_ref_str); 
    8296   } 
    8397    
     
    8599   { 
    86100      std::string axis_ref_str;  
    87       if (!cstr2string(axis_ref, axis_ref_size, axis_ref_str)) return;  
     101      if (!cstr2string(axis_ref, axis_ref_size, axis_ref_str)) return; 
     102 
     103      field_hdl->axis_ref.setValue(axis_ref_str); 
    88104   } 
    89105    
     
    91107   { 
    92108      std::string grid_ref_str;  
    93       if (!cstr2string(grid_ref, grid_ref_size, grid_ref_str)) return;  
     109      if (!cstr2string(grid_ref, grid_ref_size, grid_ref_str)) return; 
     110 
     111      field_hdl->grid_ref.setValue(grid_ref_str); 
    94112   } 
    95113    
     
    97115   { 
    98116      std::string field_ref_str;  
    99       if (!cstr2string(field_ref, field_ref_size, field_ref_str)) return;  
     117      if (!cstr2string(field_ref, field_ref_size, field_ref_str)) return; 
     118 
     119      field_hdl->field_ref.setValue(field_ref_str); 
    100120   } 
    101121    
    102122   void xios_set_field_default_value(XFieldPtr field_hdl, double default_value) 
    103123   { 
    104        
     124      field_hdl->default_value.setValue(default_value); 
    105125   }   
    106126    
     
    110130   { 
    111131      std::string name_str;  
    112       if (!cstr2string(name, name_size, name_str)) return;   
     132      if (!cstr2string(name, name_size, name_str)) return; 
     133 
     134      fieldgroup_hdl->name.setValue(name_str); 
    113135   } 
    114136    
     
    117139      std::string standard_name_str;  
    118140      if (!cstr2string(standard_name, standard_name_size, standard_name_str)) return; 
     141 
     142      fieldgroup_hdl->standard_name.setValue(standard_name_str); 
    119143   } 
    120144    
     
    123147      std::string long_name_str;  
    124148      if (!cstr2string(long_name, long_name_size, long_name_str)) return; 
     149 
     150      fieldgroup_hdl->long_name.setValue(long_name_str); 
    125151   } 
    126152    
     
    129155      std::string unit_str;  
    130156      if (!cstr2string(unit, unit_size, unit_str)) return; 
     157 
     158      fieldgroup_hdl->unit.setValue(unit_str); 
    131159   } 
    132160    
     
    134162   { 
    135163      std::string operation_str;  
    136       if (!cstr2string(operation, operation_size, operation_str)) return;  
     164      if (!cstr2string(operation, operation_size, operation_str)) return; 
     165 
     166      fieldgroup_hdl->operation.setValue(operation_str); 
    137167   } 
    138168    
     
    141171      std::string freq_op_str;  
    142172      if (!cstr2string(freq_op, freq_op_size, freq_op_str)) return; 
     173 
     174      fieldgroup_hdl->freq_op.setValue(freq_op_str); 
    143175   } 
    144176    
    145177   void xios_set_fieldgroup_level(XFieldGroupPtr fieldgroup_hdl, int level) 
    146178   { 
    147        
     179      fieldgroup_hdl->level.setValue(level); 
    148180   } 
    149181    
    150182   void xios_set_fieldgroup_prec(XFieldGroupPtr fieldgroup_hdl, int prec) 
    151183   { 
    152        
     184      fieldgroup_hdl->prec.setValue(prec); 
    153185   } 
    154186    
    155187   void xios_set_fieldgroup_enabled(XFieldGroupPtr fieldgroup_hdl, bool enabled) 
    156188   { 
    157        
     189      fieldgroup_hdl->enabled.setValue(enabled); 
    158190   } 
    159191    
     
    161193   { 
    162194      std::string domain_ref_str;  
    163       if (!cstr2string(domain_ref, domain_ref_size, domain_ref_str)) return;  
     195      if (!cstr2string(domain_ref, domain_ref_size, domain_ref_str)) return; 
     196 
     197      fieldgroup_hdl->domain_ref.setValue(domain_ref_str); 
    164198   } 
    165199    
     
    167201   { 
    168202      std::string axis_ref_str;  
    169       if (!cstr2string(axis_ref, axis_ref_size, axis_ref_str)) return;  
     203      if (!cstr2string(axis_ref, axis_ref_size, axis_ref_str)) return; 
     204 
     205      fieldgroup_hdl->axis_ref.setValue(axis_ref_str); 
    170206   } 
    171207    
     
    174210      std::string grid_ref_str;  
    175211      if (!cstr2string(grid_ref, grid_ref_size, grid_ref_str)) return; 
     212 
     213      fieldgroup_hdl->grid_ref.setValue(grid_ref_str); 
    176214   } 
    177215    
     
    179217   { 
    180218      std::string field_ref_str;  
    181       if (!cstr2string(field_ref, field_ref_size, field_ref_str)) return;  
     219      if (!cstr2string(field_ref, field_ref_size, field_ref_str)) return; 
     220 
     221      fieldgroup_hdl->field_ref.setValue(field_ref_str); 
    182222   } 
    183223    
    184224   void xios_set_fieldgroup_default_value(XFieldGroupPtr fieldgroup_hdl, double default_value) 
    185225   { 
    186        
     226      fieldgroup_hdl->default_value.setValue(default_value); 
    187227   }   
    188228    
     
    193233      std::string id;  
    194234      if (!cstr2string(_id, _id_len, id)) return; 
     235 
     236      *_ret = xmlioserver::CObjectFactory::GetObject<xmlioserver::tree::CField>(id).get(); 
    195237   } 
    196238    
     
    199241      std::string id;  
    200242      if (!cstr2string(_id, _id_len, id)) return; 
     243 
     244      *_ret = xmlioserver::CObjectFactory::GetObject<xmlioserver::tree::CFieldGroup>(id).get(); 
    201245   } 
    202246    
Note: See TracChangeset for help on using the changeset viewer.