4 Sep
2007
4 Sep
'07
2:04 p.m.
Hello, I'm having the following class structure. template <class T> class TemplatedClass { TemplatedClass () { member = shared_ptr<T> (CreateA()) ; } private: shared_ptr<T> member ; operator->() { return T.get() ; } } ; class BasePlugin { virtual void foo (void) = 0 ; } class DerivedPlugin_A : public BasePlugin { virtual void foo (void) { cout << "FOO in derived A" << endl ;} } ; DerivedPlugin_A* CreateA () { return new DerivedPlugin_A ; } TemplatedClass <BasePlugin> t ; t->foo() ; How do i write a boost::function wrapper for t->foo() ; Please help. Thanks in advance, Surya