Ignore:
Timestamp:
06/19/13 10:09:36 (11 years ago)
Author:
ymipsl
Message:

Add possibility to make inheritance of attributes and reference before closing the context definition.
New fortran fonction : xios_solve inheritance()
After this call, the value of attribute have the inherited value of their parent.

YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/interface/c_attr/icaxisgroup_attr.cpp

    r432 r445  
    3030  { 
    3131     CTimer::get("XIOS").resume(); 
    32     if(!string_copy(axisgroup_hdl->group_ref.getValue(),group_ref , group_ref_size)) 
     32    if(!string_copy(axisgroup_hdl->group_ref.getInheritedValue(),group_ref , group_ref_size)) 
    3333      ERROR("void cxios_get_axisgroup_group_ref(axisgroup_Ptr axisgroup_hdl, char * group_ref, int group_ref_size)", <<"Input string is to short"); 
    3434     CTimer::get("XIOS").suspend(); 
     
    3838  { 
    3939     CTimer::get("XIOS").resume(); 
    40     return !axisgroup_hdl->group_ref.isEmpty(); 
     40    return axisgroup_hdl->group_ref.hasInheritedValue(); 
    4141     CTimer::get("XIOS").suspend(); 
    4242  } 
     
    5757  { 
    5858     CTimer::get("XIOS").resume(); 
    59     if(!string_copy(axisgroup_hdl->long_name.getValue(),long_name , long_name_size)) 
     59    if(!string_copy(axisgroup_hdl->long_name.getInheritedValue(),long_name , long_name_size)) 
    6060      ERROR("void cxios_get_axisgroup_long_name(axisgroup_Ptr axisgroup_hdl, char * long_name, int long_name_size)", <<"Input string is to short"); 
    6161     CTimer::get("XIOS").suspend(); 
     
    6565  { 
    6666     CTimer::get("XIOS").resume(); 
    67     return !axisgroup_hdl->long_name.isEmpty(); 
     67    return axisgroup_hdl->long_name.hasInheritedValue(); 
    6868     CTimer::get("XIOS").suspend(); 
    6969  } 
     
    8484  { 
    8585     CTimer::get("XIOS").resume(); 
    86     if(!string_copy(axisgroup_hdl->name.getValue(),name , name_size)) 
     86    if(!string_copy(axisgroup_hdl->name.getInheritedValue(),name , name_size)) 
    8787      ERROR("void cxios_get_axisgroup_name(axisgroup_Ptr axisgroup_hdl, char * name, int name_size)", <<"Input string is to short"); 
    8888     CTimer::get("XIOS").suspend(); 
     
    9292  { 
    9393     CTimer::get("XIOS").resume(); 
    94     return !axisgroup_hdl->name.isEmpty(); 
     94    return axisgroup_hdl->name.hasInheritedValue(); 
    9595     CTimer::get("XIOS").suspend(); 
    9696  } 
     
    111111  { 
    112112     CTimer::get("XIOS").resume(); 
    113     if(!string_copy(axisgroup_hdl->positive.getStringValue(),positive , positive_size)) 
     113    if(!string_copy(axisgroup_hdl->positive.getInheritedStringValue(),positive , positive_size)) 
    114114      ERROR("void cxios_get_axisgroup_positive(axisgroup_Ptr axisgroup_hdl, char * positive, int positive_size)", <<"Input string is to short"); 
    115115     CTimer::get("XIOS").suspend(); 
     
    119119  { 
    120120     CTimer::get("XIOS").resume(); 
    121     return !axisgroup_hdl->positive.isEmpty(); 
     121    return axisgroup_hdl->positive.hasInheritedValue(); 
    122122     CTimer::get("XIOS").suspend(); 
    123123  } 
     
    135135  void cxios_get_axisgroup_size(axisgroup_Ptr axisgroup_hdl, int* size) 
    136136  { 
    137     *size = axisgroup_hdl->size.getValue(); 
     137    *size = axisgroup_hdl->size.getInheritedValue(); 
    138138  } 
    139139   
     
    141141  { 
    142142     CTimer::get("XIOS").resume(); 
    143     return !axisgroup_hdl->size.isEmpty(); 
     143    return axisgroup_hdl->size.hasInheritedValue(); 
    144144     CTimer::get("XIOS").suspend(); 
    145145  } 
     
    160160  { 
    161161     CTimer::get("XIOS").resume(); 
    162     if(!string_copy(axisgroup_hdl->standard_name.getValue(),standard_name , standard_name_size)) 
     162    if(!string_copy(axisgroup_hdl->standard_name.getInheritedValue(),standard_name , standard_name_size)) 
    163163      ERROR("void cxios_get_axisgroup_standard_name(axisgroup_Ptr axisgroup_hdl, char * standard_name, int standard_name_size)", <<"Input string is to short"); 
    164164     CTimer::get("XIOS").suspend(); 
     
    168168  { 
    169169     CTimer::get("XIOS").resume(); 
    170     return !axisgroup_hdl->standard_name.isEmpty(); 
     170    return axisgroup_hdl->standard_name.hasInheritedValue(); 
    171171     CTimer::get("XIOS").suspend(); 
    172172  } 
     
    187187  { 
    188188     CTimer::get("XIOS").resume(); 
    189     if(!string_copy(axisgroup_hdl->unit.getValue(),unit , unit_size)) 
     189    if(!string_copy(axisgroup_hdl->unit.getInheritedValue(),unit , unit_size)) 
    190190      ERROR("void cxios_get_axisgroup_unit(axisgroup_Ptr axisgroup_hdl, char * unit, int unit_size)", <<"Input string is to short"); 
    191191     CTimer::get("XIOS").suspend(); 
     
    195195  { 
    196196     CTimer::get("XIOS").resume(); 
    197     return !axisgroup_hdl->unit.isEmpty(); 
     197    return axisgroup_hdl->unit.hasInheritedValue(); 
    198198     CTimer::get("XIOS").suspend(); 
    199199  } 
     
    214214    CTimer::get("XIOS").resume(); 
    215215    CArray<double,1> tmp(value,shape(extent1),neverDeleteData) ; 
    216     tmp=axisgroup_hdl->value ; 
     216    tmp=axisgroup_hdl->value.getInheritedValue() ; 
    217217     CTimer::get("XIOS").suspend(); 
    218218  } 
     
    221221  { 
    222222     CTimer::get("XIOS").resume(); 
    223     return !axisgroup_hdl->value.isEmpty(); 
     223    return axisgroup_hdl->value.hasInheritedValue(); 
    224224     CTimer::get("XIOS").suspend(); 
    225225  } 
     
    237237  void cxios_get_axisgroup_zoom_begin(axisgroup_Ptr axisgroup_hdl, int* zoom_begin) 
    238238  { 
    239     *zoom_begin = axisgroup_hdl->zoom_begin.getValue(); 
     239    *zoom_begin = axisgroup_hdl->zoom_begin.getInheritedValue(); 
    240240  } 
    241241   
     
    243243  { 
    244244     CTimer::get("XIOS").resume(); 
    245     return !axisgroup_hdl->zoom_begin.isEmpty(); 
     245    return axisgroup_hdl->zoom_begin.hasInheritedValue(); 
    246246     CTimer::get("XIOS").suspend(); 
    247247  } 
     
    259259  void cxios_get_axisgroup_zoom_end(axisgroup_Ptr axisgroup_hdl, int* zoom_end) 
    260260  { 
    261     *zoom_end = axisgroup_hdl->zoom_end.getValue(); 
     261    *zoom_end = axisgroup_hdl->zoom_end.getInheritedValue(); 
    262262  } 
    263263   
     
    265265  { 
    266266     CTimer::get("XIOS").resume(); 
    267     return !axisgroup_hdl->zoom_end.isEmpty(); 
     267    return axisgroup_hdl->zoom_end.hasInheritedValue(); 
    268268     CTimer::get("XIOS").suspend(); 
    269269  } 
     
    281281  void cxios_get_axisgroup_zoom_size(axisgroup_Ptr axisgroup_hdl, int* zoom_size) 
    282282  { 
    283     *zoom_size = axisgroup_hdl->zoom_size.getValue(); 
     283    *zoom_size = axisgroup_hdl->zoom_size.getInheritedValue(); 
    284284  } 
    285285   
     
    287287  { 
    288288     CTimer::get("XIOS").resume(); 
    289     return !axisgroup_hdl->zoom_size.isEmpty(); 
     289    return axisgroup_hdl->zoom_size.hasInheritedValue(); 
    290290     CTimer::get("XIOS").suspend(); 
    291291  } 
Note: See TracChangeset for help on using the changeset viewer.