K
Karthik D
Hello All,
I am a newbie to C++ code particularly templates.Below is a
template class defintion and I couldn't find the ObjPtr/ObjFnPtr class
definition anywhere in source code.
template<class ObjPtr, class ObjFunPtr>
class MemberFunctor0 : public Functor
{
public:
MemberFunctor0(const ObjPtr& obj, const ObjFunPtr& objfn)
: _obj(obj), _objfn(objfn)
{}
virtual void operator()()
{ ((*_obj).*_objfn)(); }
private:
ObjPtr _obj;
ObjFunPtr _objfn;
};
Is this a way a template class could be defined?But what does
ObjPtr/ObjFnPtr contains?
Could someone kindly clarify?
Actually I wanted to print the function name of callback in
the code which is contained in _objfn or so?
Thanks & Regards,
Karthik
I am a newbie to C++ code particularly templates.Below is a
template class defintion and I couldn't find the ObjPtr/ObjFnPtr class
definition anywhere in source code.
template<class ObjPtr, class ObjFunPtr>
class MemberFunctor0 : public Functor
{
public:
MemberFunctor0(const ObjPtr& obj, const ObjFunPtr& objfn)
: _obj(obj), _objfn(objfn)
{}
virtual void operator()()
{ ((*_obj).*_objfn)(); }
private:
ObjPtr _obj;
ObjFunPtr _objfn;
};
Is this a way a template class could be defined?But what does
ObjPtr/ObjFnPtr contains?
Could someone kindly clarify?
Actually I wanted to print the function name of callback in
the code which is contained in _objfn or so?
Thanks & Regards,
Karthik