Changeset 952
- Timestamp:
- 05/18/10 22:28:26 (15 years ago)
- Location:
- library/bdm/base
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
library/bdm/base/user_info.cpp
r942 r952 286 286 } 287 287 288 void UI::from_setting ( root &instance, const Setting &element ) { 289 const SettingResolver link ( element ); 290 assert_type( link.result, Setting::TypeGroup ); 291 call_from_setting( instance, link.result ); 292 } 288 void UI::from_setting ( root &instance, const Setting &element ) { 289 if (element.getType()==Setting::TypeString){ 290 const type_info *ti=&typeid(instance); 291 size_t strc=string(ti->name()).find("log_level_template"); 292 if (strc!=string::npos){ // loglevel 293 call_from_setting( instance, element ); 294 } else { 295 const SettingResolver link ( element ); 296 assert_type( link.result, Setting::TypeGroup ); 297 call_from_setting( instance, link.result); 298 } 299 }else{ 300 call_from_setting( instance, element ); 301 } 302 } 293 303 294 304 void UI::from_setting ( mat& matrix, const Setting &element ) { -
library/bdm/base/user_info.h
r949 r952 319 319 //! method is necessary here to avoid the default call of "const SettingResolver link ( element );", 320 320 //! which would lead to erroneous behaviour in this case 321 template<class T> static void from_setting ( log_level_base<T> &log_level, const Setting &element ) {322 assert_type( element, Setting::TypeString );323 call_from_setting( log_level, element );324 }321 // template<class T> static void from_setting ( log_level_base<T> &log_level, const Setting &element ) { 322 // assert_type( element, Setting::TypeString ); 323 // call_from_setting( log_level, element ); 324 // } 325 325 326 326 //! This method converts a Setting into a dynamically allocated root descendant