Ignore:
Timestamp:
12/03/14 11:41:54 (9 years ago)
Author:
rlacroix
Message:

Make the variable typing stricter.

The type must now be one of:

  • bool
  • int or int32
  • int16
  • int64
  • float
  • double
  • string

WARNING: The variable type was previously not checked and using an unsupported type did not lead to any error message. Be aware that this change can make your existing configuration files invalid. However the adjustments required to adapt existing files should be minor.

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

Legend:

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

    r509 r527  
    4848    if(!cstr2string(type, type_size, type_str)) return; 
    4949     CTimer::get("XIOS").resume(); 
    50     variable_hdl->type.setValue(type_str); 
     50    variable_hdl->type.fromString(type_str); 
    5151     CTimer::get("XIOS").suspend(); 
    5252  } 
     
    5555  { 
    5656     CTimer::get("XIOS").resume(); 
    57     if(!string_copy(variable_hdl->type.getInheritedValue(),type , type_size)) 
     57    if(!string_copy(variable_hdl->type.getInheritedStringValue(),type , type_size)) 
    5858      ERROR("void cxios_get_variable_type(variable_Ptr variable_hdl, char * type, int type_size)", <<"Input string is to short"); 
    5959     CTimer::get("XIOS").suspend(); 
  • XIOS/trunk/src/interface/c_attr/icvariablegroup_attr.cpp

    r509 r527  
    7474    if(!cstr2string(type, type_size, type_str)) return; 
    7575     CTimer::get("XIOS").resume(); 
    76     variablegroup_hdl->type.setValue(type_str); 
     76    variablegroup_hdl->type.fromString(type_str); 
    7777     CTimer::get("XIOS").suspend(); 
    7878  } 
     
    8181  { 
    8282     CTimer::get("XIOS").resume(); 
    83     if(!string_copy(variablegroup_hdl->type.getInheritedValue(),type , type_size)) 
     83    if(!string_copy(variablegroup_hdl->type.getInheritedStringValue(),type , type_size)) 
    8484      ERROR("void cxios_get_variablegroup_type(variablegroup_Ptr variablegroup_hdl, char * type, int type_size)", <<"Input string is to short"); 
    8585     CTimer::get("XIOS").suspend(); 
Note: See TracChangeset for help on using the changeset viewer.