Boost logo

Boost Users :

From: Surya Kiran Gullapalli (suryakiran.gullapalli_at_[hidden])
Date: 2007-09-04 10:04:20


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


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net