Changeset 949
- Timestamp:
- 05/18/10 20:51:13 (15 years ago)
- Location:
- library/bdm/base
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
library/bdm/base/bdmbase.cpp
r927 r949 538 538 539 539 void DS::from_setting ( const Setting &set ) { 540 shared_ptr<RV> r = UI::build<RV> ( set, "drv", UI::optional );541 if ( r )542 set_drv ( *r, RV() );540 RV rv; 541 if( UI::get( rv, set, "drv", UI::optional ) ) 542 set_drv ( rv, RV() ); 543 543 } 544 544 -
library/bdm/base/user_info.h
r945 r949 312 312 //! This method converts a Setting into a real scalar 313 313 static void from_setting ( double &real, const Setting &element ); 314 //! This method converts a Setting into a class T descendant314 //! This method converts a Setting into a staticallly allocated root descendant 315 315 static void from_setting ( root &instance, const Setting &element ); 316 //! This method converts a Setting into a class T descendant 316 //! This method converts a Setting into a log_level 317 //! 318 //! Data is stored in string which has different meaning than usally. For that reason, a specialized 319 //! method is necessary here to avoid the default call of "const SettingResolver link ( element );", 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 } 325 326 //! This method converts a Setting into a dynamically allocated root descendant 317 327 template<class T> static void from_setting ( T* &instance, const Setting &element ) { 318 328 const SettingResolver link ( element );