Changeset 358 for bdm/user_info.h
- Timestamp:
- 06/08/09 15:22:12 (15 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
bdm/user_info.h
r357 r358 16 16 using namespace libconfig; 17 17 18 #define UIREGISTER(class_name) template<> Particular_UI<class_name>& Particular_UI<class_name>::ui = Particular_UI<class_name>(#class_name) 18 #ifdef BDMLIB 19 #define UIREGISTER(class_name) template<> const Particular_UI<class_name>& Particular_UI<class_name>::ui = Particular_UI<class_name>(#class_name) 20 #else 21 #define UIREGISTER(class_name) 22 #endif 19 23 20 24 #define ASSERT_UITYPE(S,Type) it_assert_debug(S.getType()==Setting::Type, string("Wrong setting type, see input path \"")+string(S.getPath())+string("\"")) … … 314 318 template<typename T> class Particular_UI : private UI 315 319 { 316 // to permit acces to the Particular_UI<T>::ui to the UI class 317 friend UI; 320 public: 318 321 319 322 //! default constructor, which is intentionally declared as private … … 324 327 //! the only instance of this class (each type T has its own instance) 325 328 //! which is used as a factory for processing related UI 326 static Particular_UI<T>& ui;329 static const Particular_UI<T>& ui; 327 330 328 331 bdmroot* new_instance() const