64,643
社区成员
发帖
与我相关
我的任务
分享
typedef PIOPlugin (*plgIOPluginCreate_Def)();
template <class T>
class TLibraryBase
{
public:
TLibraryBase() { Handle = NULL; } // Default constructor.
TLibraryBase(const string &FileName) { Load(FileName); } // Load constructor.
~TLibraryBase() { if (Handle != NULL) Unload(); } // Destructor.
void Load(const string &FileName);
void Unload();
string LibName() { return LibFileName; }
T plgCreate;
private:
TPluginHandle Handle;
string LibFileName;
};
template class TLibraryBase<plgIOPluginCreate_Def>;
typedef TLibraryBase<plgIOPluginCreate_Def> TIOLibrary;
那template class TLibraryBase<plgIOPluginCreate_Def>;后,T plgCreate;中的plgCreat表示什么呢?一个函数么? [quote=引用 2 楼 dpxiong19 的回复:] [quote=引用 1 楼 mougaidong 的回复:] plgIOPluginCreate_Def 是函数指针类型定义
那template class TLibraryBase<plgIOPluginCreate_Def>;后,T plgCreate;中的plgCreat表示什么呢?一个函数么? [quote=引用 1 楼 mougaidong 的回复:] plgIOPluginCreate_Def 是函数指针类型定义
那template class TLibraryBase<plgIOPluginCreate_Def>;后,T plgCreate;中的plgCreat表示什么呢?一个函数么? plgIOPluginCreate_Def 是函数指针类型定义
plgIOPluginCreate_Def 是函数指针类型定义