插件接口更新

This commit is contained in:
2019-08-29 15:28:49 +08:00
parent 6d58e8e90b
commit bc0475fd9d
4 changed files with 32 additions and 14 deletions

View File

@@ -20,16 +20,17 @@ namespace hgl
class Logger
{
protected:
LogLevel min_level; ///<最小输出级别
UTF16String project_code;
Logger *parent; ///<上级输出器
public:
Logger(LogLevel l){min_level=l;}
Logger(LogLevel l,Logger *pl=nullptr){min_level=l;parent=pl;}
virtual ~Logger()=default;
const LogLevel GetLevel()const{return min_level;} ///<取得最小输出级别
const LogLevel GetLevel ()const{return min_level;} ///<取得最小输出级别
Logger * GetParent (){return parent;} ///<取得上级日志输出器
virtual void Close()=0; ///<关闭日志

View File

@@ -4,7 +4,9 @@
#include<hgl/plugin/PlugIn.h>
#include<hgl/platform/ExternalModule.h>
namespace hgl
{
{
struct PlugInInterface;
/**
* 外部插件状态
*/
@@ -26,6 +28,8 @@ namespace hgl
OSString filename; ///<插件对应的真实文件系统名称
ExternalModule *pi_module;
PlugInInterface *plugin_interface;
public:
@@ -36,8 +40,10 @@ namespace hgl
ExternalPlugIn();
virtual ~ExternalPlugIn();
void Free(); ///<释放插件文件
bool Load(const OSString &,const OSString &); ///<加载插件
void Free(); ///<释放插件文件
bool Load(const OSString &,const OSString &); ///<加载插件
virtual bool GetInterface(uint,void *) override;
};//class ExternalPlugIn:public PlugIn
}//namespace hgl
#endif//HGL_EXTERNAL_PLUG_IN_INCLUDE