ULRE/inc/hgl/platform/ExternalModule.h

37 lines
1.3 KiB
C
Raw Normal View History

#ifndef HGL_EXTERNAL_MODULE_INCLUDE
#define HGL_EXTERNAL_MODULE_INCLUDE
#include<hgl/type/DataType.h>
#include<hgl/platform/FuncLoad.h>
#include OS_EXTERNAL_H
namespace hgl
{
/**
* ,Windows/Linux/BSD/MacOSX<br>
* Windows .DLL<br>
* FreeBSD/MacOSX .dylib<br>
* Linux .so
*/
class ExternalModule ///外部模块调用类
{
ExternalModulePointer fp;
public: //方法
ExternalModule(); ///<本类构造函数
ExternalModule(ExternalModulePointer); ///<本类构造函数
virtual ~ExternalModule(); ///<本类析构函数
bool Load(const os_char *); ///<加载一个外部模块
void Clear(); ///<清除当前模块
void *FindFunc(const char *); ///<查找函数
void *GetFunc(const char *); ///<取得函数
int Get(FuncLoad *); ///<加载函数列表
};//class ExternalModule
ExternalModule *LoadExternalModule(const os_char *); ///<加载一个外部模块
}//namespace hgl
#endif//HGL_EXTERNAL_MODULE_INCLUDE