Changeset 363
- Timestamp:
- 06/08/09 16:56:11 (16 years ago)
- Location:
- bdm
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
bdm/user_info.cpp
r358 r363 102 102 ///////////////////////// INTERNAL LINK EXPANDER ///////////////////////////////////////////// 103 103 104 UI:: Link_Expander::Link_Expander( const Setting &potential_link )104 UI::SettingsResolver::SettingsResolver( const Setting &potential_link ) 105 105 { 106 106 file = NULL; … … 129 129 } 130 130 131 UI:: Link_Expander::~Link_Expander()131 UI::SettingsResolver::~SettingsResolver() 132 132 { 133 133 if ( file ) delete file; 134 134 } 135 135 136 const Setting& UI:: Link_Expander::root() const136 const Setting& UI::SettingsResolver::root() const 137 137 { 138 138 return *result; … … 211 211 void UI::from_setting( mat& matrix, const Setting &element ) 212 212 { 213 const Link_Expander link_expander( element );213 const SettingsResolver link_expander( element ); 214 214 const Setting &root = link_expander.root(); 215 215 … … 265 265 void UI::from_setting( ivec &vector, const Setting &element ) 266 266 { 267 const Link_Expander link_expander( element );267 const SettingsResolver link_expander( element ); 268 268 const Setting &root = link_expander.root(); 269 269 … … 329 329 void UI::from_setting( vec &vector, const Setting &element ) 330 330 { 331 const Link_Expander link_expander( element );331 const SettingsResolver link_expander( element ); 332 332 const Setting &root = link_expander.root(); 333 333 -
bdm/user_info.h
r361 r363 108 108 }; 109 109 110 // vraci true, kdyz to byl platny link, jinak false.. v pripade chyby konci it_errorem.. 111 // do elementu vrati setting prislusny po rozbaleni linku, jinak ponecha beze zmeny 112 class Link_Expander 113 { 114 private: 115 UI_File *file; 116 const Setting *result; 117 118 public: 119 120 Link_Expander( const Setting &potential_link ); 121 122 ~Link_Expander(); 123 124 const Setting& root() const; 125 }; 110 126 111 127 112 … … 152 137 template<class T> static void from_setting( T* &instance, const Setting &element ) 153 138 { 154 const Link_Expander link_expander( element );139 const SettingsResolver link_expander( element ); 155 140 const Setting &root = link_expander.root(); 156 141 … … 192 177 template<class T> static void from_setting( Array<T> &array_to_load, const Setting &element ) 193 178 { 194 const Link_Expander link_expander( element );179 const SettingsResolver link_expander( element ); 195 180 const Setting &root = link_expander.root(); 196 181 … … 224 209 //! according to a data stored in a DOMNode named class_name within a child nodes of the passed element. 225 210 //! If an error occurs, it returns a NULL pointer. 211 212 // vraci true, kdyz to byl platny link, jinak false.. v pripade chyby konci it_errorem.. 213 // do elementu vrati setting prislusny po rozbaleni linku, jinak ponecha beze zmeny 214 class SettingsResolver 215 { 216 private: 217 UI_File *file; 218 const Setting *result; 219 220 public: 221 222 SettingsResolver( const Setting &potential_link ); 223 224 ~SettingsResolver(); 225 226 const Setting& root() const; 227 }; 228 229 226 230 227 231 //! Prototype of a UI builder. Return value is by the second argument since it type checking via \c dynamic_cast.