hIo = s;
m_pFilter = pFilter;
}
char ReadFile()
{...
}
};
int main()
{
IoProcess * p = new FileProcess( "a", new FilterA());
IoPorcess* pp = new NetProcess(sock ,new FilterB());
}
这里看上去与设计模式的 BRIDGE 有很像,嘿嘿 ,所以设计模式也是抽象的某种特例吧。