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/icaxis_attr.cpp

    r432 r445  
    3030  { 
    3131     CTimer::get("XIOS").resume(); 
    32     if(!string_copy(axis_hdl->long_name.getValue(),long_name , long_name_size)) 
     32    if(!string_copy(axis_hdl->long_name.getInheritedValue(),long_name , long_name_size)) 
    3333      ERROR("void cxios_get_axis_long_name(axis_Ptr axis_hdl, char * long_name, int long_name_size)", <<"Input string is to short"); 
    3434     CTimer::get("XIOS").suspend(); 
     
    3838  { 
    3939     CTimer::get("XIOS").resume(); 
    40     return !axis_hdl->long_name.isEmpty(); 
     40    return axis_hdl->long_name.hasInheritedValue(); 
    4141     CTimer::get("XIOS").suspend(); 
    4242  } 
     
    5757  { 
    5858     CTimer::get("XIOS").resume(); 
    59     if(!string_copy(axis_hdl->name.getValue(),name , name_size)) 
     59    if(!string_copy(axis_hdl->name.getInheritedValue(),name , name_size)) 
    6060      ERROR("void cxios_get_axis_name(axis_Ptr axis_hdl, char * name, int name_size)", <<"Input string is to short"); 
    6161     CTimer::get("XIOS").suspend(); 
     
    6565  { 
    6666     CTimer::get("XIOS").resume(); 
    67     return !axis_hdl->name.isEmpty(); 
     67    return axis_hdl->name.hasInheritedValue(); 
    6868     CTimer::get("XIOS").suspend(); 
    6969  } 
     
    8484  { 
    8585     CTimer::get("XIOS").resume(); 
    86     if(!string_copy(axis_hdl->positive.getStringValue(),positive , positive_size)) 
     86    if(!string_copy(axis_hdl->positive.getInheritedStringValue(),positive , positive_size)) 
    8787      ERROR("void cxios_get_axis_positive(axis_Ptr axis_hdl, char * positive, int positive_size)", <<"Input string is to short"); 
    8888     CTimer::get("XIOS").suspend(); 
     
    9292  { 
    9393     CTimer::get("XIOS").resume(); 
    94     return !axis_hdl->positive.isEmpty(); 
     94    return axis_hdl->positive.hasInheritedValue(); 
    9595     CTimer::get("XIOS").suspend(); 
    9696  } 
     
    108108  void cxios_get_axis_size(axis_Ptr axis_hdl, int* size) 
    109109  { 
    110     *size = axis_hdl->size.getValue(); 
     110    *size = axis_hdl->size.getInheritedValue(); 
    111111  } 
    112112   
     
    114114  { 
    115115     CTimer::get("XIOS").resume(); 
    116     return !axis_hdl->size.isEmpty(); 
     116    return axis_hdl->size.hasInheritedValue(); 
    117117     CTimer::get("XIOS").suspend(); 
    118118  } 
     
    133133  { 
    134134     CTimer::get("XIOS").resume(); 
    135     if(!string_copy(axis_hdl->standard_name.getValue(),standard_name , standard_name_size)) 
     135    if(!string_copy(axis_hdl->standard_name.getInheritedValue(),standard_name , standard_name_size)) 
    136136      ERROR("void cxios_get_axis_standard_name(axis_Ptr axis_hdl, char * standard_name, int standard_name_size)", <<"Input string is to short"); 
    137137     CTimer::get("XIOS").suspend(); 
     
    141141  { 
    142142     CTimer::get("XIOS").resume(); 
    143     return !axis_hdl->standard_name.isEmpty(); 
     143    return axis_hdl->standard_name.hasInheritedValue(); 
    144144     CTimer::get("XIOS").suspend(); 
    145145  } 
     
    160160  { 
    161161     CTimer::get("XIOS").resume(); 
    162     if(!string_copy(axis_hdl->unit.getValue(),unit , unit_size)) 
     162    if(!string_copy(axis_hdl->unit.getInheritedValue(),unit , unit_size)) 
    163163      ERROR("void cxios_get_axis_unit(axis_Ptr axis_hdl, char * unit, int unit_size)", <<"Input string is to short"); 
    164164     CTimer::get("XIOS").suspend(); 
     
    168168  { 
    169169     CTimer::get("XIOS").resume(); 
    170     return !axis_hdl->unit.isEmpty(); 
     170    return axis_hdl->unit.hasInheritedValue(); 
    171171     CTimer::get("XIOS").suspend(); 
    172172  } 
     
    187187    CTimer::get("XIOS").resume(); 
    188188    CArray<double,1> tmp(value,shape(extent1),neverDeleteData) ; 
    189     tmp=axis_hdl->value ; 
     189    tmp=axis_hdl->value.getInheritedValue() ; 
    190190     CTimer::get("XIOS").suspend(); 
    191191  } 
     
    194194  { 
    195195     CTimer::get("XIOS").resume(); 
    196     return !axis_hdl->value.isEmpty(); 
     196    return axis_hdl->value.hasInheritedValue(); 
    197197     CTimer::get("XIOS").suspend(); 
    198198  } 
     
    210210  void cxios_get_axis_zoom_begin(axis_Ptr axis_hdl, int* zoom_begin) 
    211211  { 
    212     *zoom_begin = axis_hdl->zoom_begin.getValue(); 
     212    *zoom_begin = axis_hdl->zoom_begin.getInheritedValue(); 
    213213  } 
    214214   
     
    216216  { 
    217217     CTimer::get("XIOS").resume(); 
    218     return !axis_hdl->zoom_begin.isEmpty(); 
     218    return axis_hdl->zoom_begin.hasInheritedValue(); 
    219219     CTimer::get("XIOS").suspend(); 
    220220  } 
     
    232232  void cxios_get_axis_zoom_end(axis_Ptr axis_hdl, int* zoom_end) 
    233233  { 
    234     *zoom_end = axis_hdl->zoom_end.getValue(); 
     234    *zoom_end = axis_hdl->zoom_end.getInheritedValue(); 
    235235  } 
    236236   
     
    238238  { 
    239239     CTimer::get("XIOS").resume(); 
    240     return !axis_hdl->zoom_end.isEmpty(); 
     240    return axis_hdl->zoom_end.hasInheritedValue(); 
    241241     CTimer::get("XIOS").suspend(); 
    242242  } 
     
    254254  void cxios_get_axis_zoom_size(axis_Ptr axis_hdl, int* zoom_size) 
    255255  { 
    256     *zoom_size = axis_hdl->zoom_size.getValue(); 
     256    *zoom_size = axis_hdl->zoom_size.getInheritedValue(); 
    257257  } 
    258258   
     
    260260  { 
    261261     CTimer::get("XIOS").resume(); 
    262     return !axis_hdl->zoom_size.isEmpty(); 
     262    return axis_hdl->zoom_size.hasInheritedValue(); 
    263263     CTimer::get("XIOS").suspend(); 
    264264  } 
Note: See TracChangeset for help on using the changeset viewer.