Changeset 149
- Timestamp:
- 08/20/08 17:30:02 (16 years ago)
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
bdm/userinfo.h
r146 r149 108 108 virtual bool DisassemblyBindedData( DOMElement &element ) = 0; 109 109 }; 110 /* 110 111 111 class BindedAttribute : public BindingFrame 112 112 { … … 116 116 public: 117 117 BindedAttribute( string attributeName ) 118 : transcodedAttributeName( XMLString::transcode attributeName.c_str() ) )118 : transcodedAttributeName( XMLString::transcode( attributeName.c_str() ) ) 119 119 { 120 120 } … … 140 140 element.setAttribute( transcodedAttributeName, transcoded_str ); 141 141 XMLString::release( (XMLCh**) &transcoded_str ); 142 return true; 142 143 } 143 144 }; … … 350 351 virtual void Absorb(T* &pTypedInstance) = 0; 351 352 352 static const TypedUserInfo<T> &instance;353 static const TypedUserInfo<T> * pInstance; 353 354 }; 354 355 … … 387 388 BindedType<U>( CompoundUserInfo<T> *parent, string name ) 388 389 : name( name), help(""), 389 factory( TypedUserInfo<U>::instance )390 factory( *TypedUserInfo<U>::pInstance ) 390 391 { 391 392 parent->bindedElements.push_back( this ); -
tests/testUI.cpp
r146 r149 21 21 }; 22 22 23 const TypedUserInfo<int> & IntUI::instance =IntUI();23 const TypedUserInfo<int>* IntUI::pInstance = new IntUI(); 24 24 25 25 … … 42 42 }; 43 43 44 const TypedUserInfo<string> & StringUI::instance = StringUI();44 const TypedUserInfo<string>* StringUI::pInstance = new StringUI(); 45 45 46 46 class Car … … 83 83 }; 84 84 85 const TypedUserInfo<Car> & CarUI::instance =CarUI( );85 const TypedUserInfo<Car>* CarUI::pInstance = new CarUI( ); 86 86 87 87