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

    r432 r445  
    3030  { 
    3131     CTimer::get("XIOS").resume(); 
    32     if(!string_copy(grid_hdl->axis_ref.getValue(),axis_ref , axis_ref_size)) 
     32    if(!string_copy(grid_hdl->axis_ref.getInheritedValue(),axis_ref , axis_ref_size)) 
    3333      ERROR("void cxios_get_grid_axis_ref(grid_Ptr grid_hdl, char * axis_ref, int axis_ref_size)", <<"Input string is to short"); 
    3434     CTimer::get("XIOS").suspend(); 
     
    3838  { 
    3939     CTimer::get("XIOS").resume(); 
    40     return !grid_hdl->axis_ref.isEmpty(); 
     40    return grid_hdl->axis_ref.hasInheritedValue(); 
    4141     CTimer::get("XIOS").suspend(); 
    4242  } 
     
    5757  { 
    5858     CTimer::get("XIOS").resume(); 
    59     if(!string_copy(grid_hdl->description.getValue(),description , description_size)) 
     59    if(!string_copy(grid_hdl->description.getInheritedValue(),description , description_size)) 
    6060      ERROR("void cxios_get_grid_description(grid_Ptr grid_hdl, char * description, int description_size)", <<"Input string is to short"); 
    6161     CTimer::get("XIOS").suspend(); 
     
    6565  { 
    6666     CTimer::get("XIOS").resume(); 
    67     return !grid_hdl->description.isEmpty(); 
     67    return grid_hdl->description.hasInheritedValue(); 
    6868     CTimer::get("XIOS").suspend(); 
    6969  } 
     
    8484  { 
    8585     CTimer::get("XIOS").resume(); 
    86     if(!string_copy(grid_hdl->domain_ref.getValue(),domain_ref , domain_ref_size)) 
     86    if(!string_copy(grid_hdl->domain_ref.getInheritedValue(),domain_ref , domain_ref_size)) 
    8787      ERROR("void cxios_get_grid_domain_ref(grid_Ptr grid_hdl, char * domain_ref, int domain_ref_size)", <<"Input string is to short"); 
    8888     CTimer::get("XIOS").suspend(); 
     
    9292  { 
    9393     CTimer::get("XIOS").resume(); 
    94     return !grid_hdl->domain_ref.isEmpty(); 
     94    return grid_hdl->domain_ref.hasInheritedValue(); 
    9595     CTimer::get("XIOS").suspend(); 
    9696  } 
     
    111111    CTimer::get("XIOS").resume(); 
    112112    CArray<bool,3> tmp(mask,shape(extent1,extent2,extent3),neverDeleteData) ; 
    113     tmp=grid_hdl->mask ; 
     113    tmp=grid_hdl->mask.getInheritedValue() ; 
    114114     CTimer::get("XIOS").suspend(); 
    115115  } 
     
    118118  { 
    119119     CTimer::get("XIOS").resume(); 
    120     return !grid_hdl->mask.isEmpty(); 
     120    return grid_hdl->mask.hasInheritedValue(); 
    121121     CTimer::get("XIOS").suspend(); 
    122122  } 
     
    137137  { 
    138138     CTimer::get("XIOS").resume(); 
    139     if(!string_copy(grid_hdl->name.getValue(),name , name_size)) 
     139    if(!string_copy(grid_hdl->name.getInheritedValue(),name , name_size)) 
    140140      ERROR("void cxios_get_grid_name(grid_Ptr grid_hdl, char * name, int name_size)", <<"Input string is to short"); 
    141141     CTimer::get("XIOS").suspend(); 
     
    145145  { 
    146146     CTimer::get("XIOS").resume(); 
    147     return !grid_hdl->name.isEmpty(); 
     147    return grid_hdl->name.hasInheritedValue(); 
    148148     CTimer::get("XIOS").suspend(); 
    149149  } 
Note: See TracChangeset for help on using the changeset viewer.