C++ 基于Policy 的 模板编程(2)

//--------------------------------------------------------------------------------
typedef WidgetManager<BoxWidget,OpNewCreateor,ContainerVec> BoxWidgetManager;
typedef WidgetManager<SliderWidget,OpNewCreateor,ContainerList> SliderWidgetManager;
//--------------------------------------------------------------------------------


int main()
{
 BoxWidgetManager boxWidgetManager;

BoxWidget * boxWidget = boxWidgetManager.create();


  cout << typeid(BoxWidgetManager).name() << endl; 

system( "pause");
}

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/52681991c9702b5ad56ae801ebde669d.html