Ignore:
Timestamp:
06/03/13 11:21:19 (11 years ago)
Author:
ymipsl
Message:

Enhancement : Add fortran interface to know if an attribute is set or not
ex : CALL xios_is_defined_field_attr("field_A",enabled=ok)

YM

File:
1 edited

Legend:

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

    r415 r432  
    3535  } 
    3636   
     37  bool cxios_is_defined_filegroup_description(filegroup_Ptr filegroup_hdl ) 
     38  { 
     39     CTimer::get("XIOS").resume(); 
     40    return !filegroup_hdl->description.isEmpty(); 
     41     CTimer::get("XIOS").suspend(); 
     42  } 
     43   
     44   
    3745   
    3846  void cxios_set_filegroup_enabled(filegroup_Ptr filegroup_hdl, bool enabled) 
     
    4957  } 
    5058   
     59  bool cxios_is_defined_filegroup_enabled(filegroup_Ptr filegroup_hdl ) 
     60  { 
     61     CTimer::get("XIOS").resume(); 
     62    return !filegroup_hdl->enabled.isEmpty(); 
     63     CTimer::get("XIOS").suspend(); 
     64  } 
     65   
     66   
    5167   
    5268  void cxios_set_filegroup_group_ref(filegroup_Ptr filegroup_hdl, const char * group_ref, int group_ref_size) 
     
    6884  } 
    6985   
     86  bool cxios_is_defined_filegroup_group_ref(filegroup_Ptr filegroup_hdl ) 
     87  { 
     88     CTimer::get("XIOS").resume(); 
     89    return !filegroup_hdl->group_ref.isEmpty(); 
     90     CTimer::get("XIOS").suspend(); 
     91  } 
     92   
     93   
    7094   
    7195  void cxios_set_filegroup_min_digits(filegroup_Ptr filegroup_hdl, int min_digits) 
     
    82106  } 
    83107   
     108  bool cxios_is_defined_filegroup_min_digits(filegroup_Ptr filegroup_hdl ) 
     109  { 
     110     CTimer::get("XIOS").resume(); 
     111    return !filegroup_hdl->min_digits.isEmpty(); 
     112     CTimer::get("XIOS").suspend(); 
     113  } 
     114   
     115   
    84116   
    85117  void cxios_set_filegroup_name(filegroup_Ptr filegroup_hdl, const char * name, int name_size) 
     
    101133  } 
    102134   
     135  bool cxios_is_defined_filegroup_name(filegroup_Ptr filegroup_hdl ) 
     136  { 
     137     CTimer::get("XIOS").resume(); 
     138    return !filegroup_hdl->name.isEmpty(); 
     139     CTimer::get("XIOS").suspend(); 
     140  } 
     141   
     142   
    103143   
    104144  void cxios_set_filegroup_name_suffix(filegroup_Ptr filegroup_hdl, const char * name_suffix, int name_suffix_size) 
     
    120160  } 
    121161   
     162  bool cxios_is_defined_filegroup_name_suffix(filegroup_Ptr filegroup_hdl ) 
     163  { 
     164     CTimer::get("XIOS").resume(); 
     165    return !filegroup_hdl->name_suffix.isEmpty(); 
     166     CTimer::get("XIOS").suspend(); 
     167  } 
     168   
     169   
    122170   
    123171  void cxios_set_filegroup_output_freq(filegroup_Ptr filegroup_hdl, const char * output_freq, int output_freq_size) 
     
    139187  } 
    140188   
     189  bool cxios_is_defined_filegroup_output_freq(filegroup_Ptr filegroup_hdl ) 
     190  { 
     191     CTimer::get("XIOS").resume(); 
     192    return !filegroup_hdl->output_freq.isEmpty(); 
     193     CTimer::get("XIOS").suspend(); 
     194  } 
     195   
     196   
    141197   
    142198  void cxios_set_filegroup_output_level(filegroup_Ptr filegroup_hdl, int output_level) 
     
    153209  } 
    154210   
     211  bool cxios_is_defined_filegroup_output_level(filegroup_Ptr filegroup_hdl ) 
     212  { 
     213     CTimer::get("XIOS").resume(); 
     214    return !filegroup_hdl->output_level.isEmpty(); 
     215     CTimer::get("XIOS").suspend(); 
     216  } 
     217   
     218   
    155219   
    156220  void cxios_set_filegroup_par_access(filegroup_Ptr filegroup_hdl, const char * par_access, int par_access_size) 
     
    172236  } 
    173237   
     238  bool cxios_is_defined_filegroup_par_access(filegroup_Ptr filegroup_hdl ) 
     239  { 
     240     CTimer::get("XIOS").resume(); 
     241    return !filegroup_hdl->par_access.isEmpty(); 
     242     CTimer::get("XIOS").suspend(); 
     243  } 
     244   
     245   
    174246   
    175247  void cxios_set_filegroup_split_freq(filegroup_Ptr filegroup_hdl, const char * split_freq, int split_freq_size) 
     
    191263  } 
    192264   
     265  bool cxios_is_defined_filegroup_split_freq(filegroup_Ptr filegroup_hdl ) 
     266  { 
     267     CTimer::get("XIOS").resume(); 
     268    return !filegroup_hdl->split_freq.isEmpty(); 
     269     CTimer::get("XIOS").suspend(); 
     270  } 
     271   
     272   
     273   
     274  void cxios_set_filegroup_split_freq_format(filegroup_Ptr filegroup_hdl, const char * split_freq_format, int split_freq_format_size) 
     275  { 
     276    std::string split_freq_format_str; 
     277    if(!cstr2string(split_freq_format, split_freq_format_size, split_freq_format_str)) return; 
     278     CTimer::get("XIOS").resume(); 
     279    filegroup_hdl->split_freq_format.setValue(split_freq_format_str); 
     280    filegroup_hdl->sendAttributToServer(filegroup_hdl->split_freq_format); 
     281     CTimer::get("XIOS").suspend(); 
     282  } 
     283   
     284  void cxios_get_filegroup_split_freq_format(filegroup_Ptr filegroup_hdl, char * split_freq_format, int split_freq_format_size) 
     285  { 
     286     CTimer::get("XIOS").resume(); 
     287    if(!string_copy(filegroup_hdl->split_freq_format.getValue(),split_freq_format , split_freq_format_size)) 
     288      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"); 
     289     CTimer::get("XIOS").suspend(); 
     290  } 
     291   
     292  bool cxios_is_defined_filegroup_split_freq_format(filegroup_Ptr filegroup_hdl ) 
     293  { 
     294     CTimer::get("XIOS").resume(); 
     295    return !filegroup_hdl->split_freq_format.isEmpty(); 
     296     CTimer::get("XIOS").suspend(); 
     297  } 
     298   
     299   
    193300   
    194301  void cxios_set_filegroup_sync_freq(filegroup_Ptr filegroup_hdl, const char * sync_freq, int sync_freq_size) 
     
    210317  } 
    211318   
     319  bool cxios_is_defined_filegroup_sync_freq(filegroup_Ptr filegroup_hdl ) 
     320  { 
     321     CTimer::get("XIOS").resume(); 
     322    return !filegroup_hdl->sync_freq.isEmpty(); 
     323     CTimer::get("XIOS").suspend(); 
     324  } 
     325   
     326   
    212327   
    213328  void cxios_set_filegroup_type(filegroup_Ptr filegroup_hdl, const char * type, int type_size) 
     
    229344  } 
    230345   
     346  bool cxios_is_defined_filegroup_type(filegroup_Ptr filegroup_hdl ) 
     347  { 
     348     CTimer::get("XIOS").resume(); 
     349    return !filegroup_hdl->type.isEmpty(); 
     350     CTimer::get("XIOS").suspend(); 
     351  } 
     352   
     353   
    231354   
    232355   
Note: See TracChangeset for help on using the changeset viewer.