#include "userinfo.h" class IntUI: public ValuedUserInfo { public: void Build(int* &pInstance) { // KDO SE POSTARA O DEALOKACI TOHOTO? NADRAZENE UI? ASI.. // PAK TO CHCE ALE OBDOBNE UDELAT I STRING NIZE, ZKOPIROVAT atd pInstance = new int( atoi( value.c_str()) ); } }; const TypedUserInfo& IntUI::instance = IntUI(); class StringUI: public ValuedUserInfo { public: void Build(string* &pInstance) { pInstance = &value; } }; const TypedUserInfo& StringUI::instance = StringUI(); int main() { int i = 9, *pi = &i; RootElement root("car.xml"); root.Load(); UserInfo::Assembly("clovek",root,pi); //root.Save(); cout << "press any key to quit, pi=" << *pi << endl; getchar(); return 0; }