Ignore:
Timestamp:
12/02/14 15:18:09 (9 years ago)
Author:
rlacroix
Message:

Convert some attributes to enumerations:

  • file: par_access
  • context: calendar_type

Those changes should have no effect on existing XML configuration files and ensure that a proper error message is always displayed during parsing if the value is not supported.

Location:
XIOS/trunk/src/interface/c_attr
Files:
3 edited

Legend:

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

    r509 r526  
    2222    if(!cstr2string(calendar_type, calendar_type_size, calendar_type_str)) return; 
    2323     CTimer::get("XIOS").resume(); 
    24     context_hdl->calendar_type.setValue(calendar_type_str); 
     24    context_hdl->calendar_type.fromString(calendar_type_str); 
    2525     CTimer::get("XIOS").suspend(); 
    2626  } 
     
    2929  { 
    3030     CTimer::get("XIOS").resume(); 
    31     if(!string_copy(context_hdl->calendar_type.getInheritedValue(),calendar_type , calendar_type_size)) 
     31    if(!string_copy(context_hdl->calendar_type.getInheritedStringValue(),calendar_type , calendar_type_size)) 
    3232      ERROR("void cxios_get_context_calendar_type(context_Ptr context_hdl, char * calendar_type, int calendar_type_size)", <<"Input string is to short"); 
    3333     CTimer::get("XIOS").suspend(); 
  • XIOS/trunk/src/interface/c_attr/icfile_attr.cpp

    r517 r526  
    215215    if(!cstr2string(par_access, par_access_size, par_access_str)) return; 
    216216     CTimer::get("XIOS").resume(); 
    217     file_hdl->par_access.setValue(par_access_str); 
     217    file_hdl->par_access.fromString(par_access_str); 
    218218     CTimer::get("XIOS").suspend(); 
    219219  } 
     
    222222  { 
    223223     CTimer::get("XIOS").resume(); 
    224     if(!string_copy(file_hdl->par_access.getInheritedValue(),par_access , par_access_size)) 
     224    if(!string_copy(file_hdl->par_access.getInheritedStringValue(),par_access , par_access_size)) 
    225225      ERROR("void cxios_get_file_par_access(file_Ptr file_hdl, char * par_access, int par_access_size)", <<"Input string is to short"); 
    226226     CTimer::get("XIOS").suspend(); 
  • XIOS/trunk/src/interface/c_attr/icfilegroup_attr.cpp

    r517 r526  
    241241    if(!cstr2string(par_access, par_access_size, par_access_str)) return; 
    242242     CTimer::get("XIOS").resume(); 
    243     filegroup_hdl->par_access.setValue(par_access_str); 
     243    filegroup_hdl->par_access.fromString(par_access_str); 
    244244     CTimer::get("XIOS").suspend(); 
    245245  } 
     
    248248  { 
    249249     CTimer::get("XIOS").resume(); 
    250     if(!string_copy(filegroup_hdl->par_access.getInheritedValue(),par_access , par_access_size)) 
     250    if(!string_copy(filegroup_hdl->par_access.getInheritedStringValue(),par_access , par_access_size)) 
    251251      ERROR("void cxios_get_filegroup_par_access(filegroup_Ptr filegroup_hdl, char * par_access, int par_access_size)", <<"Input string is to short"); 
    252252     CTimer::get("XIOS").suspend(); 
Note: See TracChangeset for help on using the changeset viewer.