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

    r432 r445  
    3030  { 
    3131     CTimer::get("XIOS").resume(); 
    32     if(!string_copy(filegroup_hdl->description.getValue(),description , description_size)) 
     32    if(!string_copy(filegroup_hdl->description.getInheritedValue(),description , description_size)) 
    3333      ERROR("void cxios_get_filegroup_description(filegroup_Ptr filegroup_hdl, char * description, int description_size)", <<"Input string is to short"); 
    3434     CTimer::get("XIOS").suspend(); 
     
    3838  { 
    3939     CTimer::get("XIOS").resume(); 
    40     return !filegroup_hdl->description.isEmpty(); 
     40    return filegroup_hdl->description.hasInheritedValue(); 
    4141     CTimer::get("XIOS").suspend(); 
    4242  } 
     
    5454  void cxios_get_filegroup_enabled(filegroup_Ptr filegroup_hdl, bool* enabled) 
    5555  { 
    56     *enabled = filegroup_hdl->enabled.getValue(); 
     56    *enabled = filegroup_hdl->enabled.getInheritedValue(); 
    5757  } 
    5858   
     
    6060  { 
    6161     CTimer::get("XIOS").resume(); 
    62     return !filegroup_hdl->enabled.isEmpty(); 
     62    return filegroup_hdl->enabled.hasInheritedValue(); 
    6363     CTimer::get("XIOS").suspend(); 
    6464  } 
     
    7979  { 
    8080     CTimer::get("XIOS").resume(); 
    81     if(!string_copy(filegroup_hdl->group_ref.getValue(),group_ref , group_ref_size)) 
     81    if(!string_copy(filegroup_hdl->group_ref.getInheritedValue(),group_ref , group_ref_size)) 
    8282      ERROR("void cxios_get_filegroup_group_ref(filegroup_Ptr filegroup_hdl, char * group_ref, int group_ref_size)", <<"Input string is to short"); 
    8383     CTimer::get("XIOS").suspend(); 
     
    8787  { 
    8888     CTimer::get("XIOS").resume(); 
    89     return !filegroup_hdl->group_ref.isEmpty(); 
     89    return filegroup_hdl->group_ref.hasInheritedValue(); 
    9090     CTimer::get("XIOS").suspend(); 
    9191  } 
     
    103103  void cxios_get_filegroup_min_digits(filegroup_Ptr filegroup_hdl, int* min_digits) 
    104104  { 
    105     *min_digits = filegroup_hdl->min_digits.getValue(); 
     105    *min_digits = filegroup_hdl->min_digits.getInheritedValue(); 
    106106  } 
    107107   
     
    109109  { 
    110110     CTimer::get("XIOS").resume(); 
    111     return !filegroup_hdl->min_digits.isEmpty(); 
     111    return filegroup_hdl->min_digits.hasInheritedValue(); 
    112112     CTimer::get("XIOS").suspend(); 
    113113  } 
     
    128128  { 
    129129     CTimer::get("XIOS").resume(); 
    130     if(!string_copy(filegroup_hdl->name.getValue(),name , name_size)) 
     130    if(!string_copy(filegroup_hdl->name.getInheritedValue(),name , name_size)) 
    131131      ERROR("void cxios_get_filegroup_name(filegroup_Ptr filegroup_hdl, char * name, int name_size)", <<"Input string is to short"); 
    132132     CTimer::get("XIOS").suspend(); 
     
    136136  { 
    137137     CTimer::get("XIOS").resume(); 
    138     return !filegroup_hdl->name.isEmpty(); 
     138    return filegroup_hdl->name.hasInheritedValue(); 
    139139     CTimer::get("XIOS").suspend(); 
    140140  } 
     
    155155  { 
    156156     CTimer::get("XIOS").resume(); 
    157     if(!string_copy(filegroup_hdl->name_suffix.getValue(),name_suffix , name_suffix_size)) 
     157    if(!string_copy(filegroup_hdl->name_suffix.getInheritedValue(),name_suffix , name_suffix_size)) 
    158158      ERROR("void cxios_get_filegroup_name_suffix(filegroup_Ptr filegroup_hdl, char * name_suffix, int name_suffix_size)", <<"Input string is to short"); 
    159159     CTimer::get("XIOS").suspend(); 
     
    163163  { 
    164164     CTimer::get("XIOS").resume(); 
    165     return !filegroup_hdl->name_suffix.isEmpty(); 
     165    return filegroup_hdl->name_suffix.hasInheritedValue(); 
    166166     CTimer::get("XIOS").suspend(); 
    167167  } 
     
    182182  { 
    183183     CTimer::get("XIOS").resume(); 
    184     if(!string_copy(filegroup_hdl->output_freq.getValue(),output_freq , output_freq_size)) 
     184    if(!string_copy(filegroup_hdl->output_freq.getInheritedValue(),output_freq , output_freq_size)) 
    185185      ERROR("void cxios_get_filegroup_output_freq(filegroup_Ptr filegroup_hdl, char * output_freq, int output_freq_size)", <<"Input string is to short"); 
    186186     CTimer::get("XIOS").suspend(); 
     
    190190  { 
    191191     CTimer::get("XIOS").resume(); 
    192     return !filegroup_hdl->output_freq.isEmpty(); 
     192    return filegroup_hdl->output_freq.hasInheritedValue(); 
    193193     CTimer::get("XIOS").suspend(); 
    194194  } 
     
    206206  void cxios_get_filegroup_output_level(filegroup_Ptr filegroup_hdl, int* output_level) 
    207207  { 
    208     *output_level = filegroup_hdl->output_level.getValue(); 
     208    *output_level = filegroup_hdl->output_level.getInheritedValue(); 
    209209  } 
    210210   
     
    212212  { 
    213213     CTimer::get("XIOS").resume(); 
    214     return !filegroup_hdl->output_level.isEmpty(); 
     214    return filegroup_hdl->output_level.hasInheritedValue(); 
    215215     CTimer::get("XIOS").suspend(); 
    216216  } 
     
    231231  { 
    232232     CTimer::get("XIOS").resume(); 
    233     if(!string_copy(filegroup_hdl->par_access.getValue(),par_access , par_access_size)) 
     233    if(!string_copy(filegroup_hdl->par_access.getInheritedValue(),par_access , par_access_size)) 
    234234      ERROR("void cxios_get_filegroup_par_access(filegroup_Ptr filegroup_hdl, char * par_access, int par_access_size)", <<"Input string is to short"); 
    235235     CTimer::get("XIOS").suspend(); 
     
    239239  { 
    240240     CTimer::get("XIOS").resume(); 
    241     return !filegroup_hdl->par_access.isEmpty(); 
     241    return filegroup_hdl->par_access.hasInheritedValue(); 
    242242     CTimer::get("XIOS").suspend(); 
    243243  } 
     
    258258  { 
    259259     CTimer::get("XIOS").resume(); 
    260     if(!string_copy(filegroup_hdl->split_freq.getValue(),split_freq , split_freq_size)) 
     260    if(!string_copy(filegroup_hdl->split_freq.getInheritedValue(),split_freq , split_freq_size)) 
    261261      ERROR("void cxios_get_filegroup_split_freq(filegroup_Ptr filegroup_hdl, char * split_freq, int split_freq_size)", <<"Input string is to short"); 
    262262     CTimer::get("XIOS").suspend(); 
     
    266266  { 
    267267     CTimer::get("XIOS").resume(); 
    268     return !filegroup_hdl->split_freq.isEmpty(); 
     268    return filegroup_hdl->split_freq.hasInheritedValue(); 
    269269     CTimer::get("XIOS").suspend(); 
    270270  } 
     
    285285  { 
    286286     CTimer::get("XIOS").resume(); 
    287     if(!string_copy(filegroup_hdl->split_freq_format.getValue(),split_freq_format , split_freq_format_size)) 
     287    if(!string_copy(filegroup_hdl->split_freq_format.getInheritedValue(),split_freq_format , split_freq_format_size)) 
    288288      ERROR("void cxios_get_filegroup_split_freq_format(filegroup_Ptr filegroup_hdl, char * split_freq_format, int split_freq_format_size)", <<"Input string is to short"); 
    289289     CTimer::get("XIOS").suspend(); 
     
    293293  { 
    294294     CTimer::get("XIOS").resume(); 
    295     return !filegroup_hdl->split_freq_format.isEmpty(); 
     295    return filegroup_hdl->split_freq_format.hasInheritedValue(); 
    296296     CTimer::get("XIOS").suspend(); 
    297297  } 
     
    312312  { 
    313313     CTimer::get("XIOS").resume(); 
    314     if(!string_copy(filegroup_hdl->sync_freq.getValue(),sync_freq , sync_freq_size)) 
     314    if(!string_copy(filegroup_hdl->sync_freq.getInheritedValue(),sync_freq , sync_freq_size)) 
    315315      ERROR("void cxios_get_filegroup_sync_freq(filegroup_Ptr filegroup_hdl, char * sync_freq, int sync_freq_size)", <<"Input string is to short"); 
    316316     CTimer::get("XIOS").suspend(); 
     
    320320  { 
    321321     CTimer::get("XIOS").resume(); 
    322     return !filegroup_hdl->sync_freq.isEmpty(); 
     322    return filegroup_hdl->sync_freq.hasInheritedValue(); 
    323323     CTimer::get("XIOS").suspend(); 
    324324  } 
     
    339339  { 
    340340     CTimer::get("XIOS").resume(); 
    341     if(!string_copy(filegroup_hdl->type.getStringValue(),type , type_size)) 
     341    if(!string_copy(filegroup_hdl->type.getInheritedStringValue(),type , type_size)) 
    342342      ERROR("void cxios_get_filegroup_type(filegroup_Ptr filegroup_hdl, char * type, int type_size)", <<"Input string is to short"); 
    343343     CTimer::get("XIOS").suspend(); 
     
    347347  { 
    348348     CTimer::get("XIOS").resume(); 
    349     return !filegroup_hdl->type.isEmpty(); 
     349    return filegroup_hdl->type.hasInheritedValue(); 
    350350     CTimer::get("XIOS").suspend(); 
    351351  } 
Note: See TracChangeset for help on using the changeset viewer.