template<typename T>
class FunctorPointerSlot : public SlotFunctorBase
{
public:
FunctorPointerSlot(T* functor) :
d_functor(functor)
{}
virtual bool operator()(const EventArgs& args)
{
return (*d_functor)(args);
}
private:
T* d_functor;
};
这个类和FunctorReferenceSlot 相似,它只是把引用换成了指针类型而已。
FunctorPointerSlot 是某个类的指针的封装
最新推荐文章于 2022-07-21 08:46:56 发布