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.

File:
1 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(); 
Note: See TracChangeset for help on using the changeset viewer.