المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : How to override TR1 "function class"' operator()(****)//many parameters ? Thanks! The



C++ Programming
04-05-2009, 07:51 PM
#pragma once
using namespace std::tr1::function;

template
class CDelegate : public function
{
public:
explicit CDelegate()
{
this->_Reset();
}

CDelegate(const _Myt& _Right)
{
this->_Reset((const _Mybase&)_Right);
}

//How to write here?
//operator()(****) //many parameters
//{
// m_funcs[0](****); //many parameters
// m_funcs[1](****); //many parameters
//}

~CDelegate()
{
this->_Tidy();
}

protected:
function m_funcs[2];
//reference_wrapper
};