文件名称:plugin-src
-
所属分类:
- 标签属性:
- 上传时间:2014-04-17
-
文件大小:4.83kb
-
已下载:0次
-
提 供 者:
-
相关连接:无
-
下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
Making a Plugin System-Now, lets say that you are making a program, maybe a game, and you decide that you want to make it moddable without your intervention. Now, of course, you think of how that might be possible, and without forcing the users to inject code directly into your executable, or modifying the source code directly. How would you do this?
Well, of course, the answer is a plugin system. I ll briefly explain how it works: A plugin system is simply where a specified folder is searched for DLLs (or the like), and if any are found, adds the contents to the program. Of course, because the program doesn t actually know what is in the DLLs, the normal way is for the DLL s to define a set entry point and calling functions defined by the program itself, which can then use the functionality exposed in those DLLs. The way this can be done is up to you, whether defining functions to implement or maybe getting the DLL to provide an instance of a base class, and then use the functionality from that. In this
Well, of course, the answer is a plugin system. I ll briefly explain how it works: A plugin system is simply where a specified folder is searched for DLLs (or the like), and if any are found, adds the contents to the program. Of course, because the program doesn t actually know what is in the DLLs, the normal way is for the DLL s to define a set entry point and calling functions defined by the program itself, which can then use the functionality exposed in those DLLs. The way this can be done is up to you, whether defining functions to implement or maybe getting the DLL to provide an instance of a base class, and then use the functionality from that. In this
(系统自动生成,下载前可以参看下载内容)
下载文件列表
plugin-src/
plugin-src/main.cpp
plugin-src/main.hpp
plugin-src/Makefile
plugin-src/test1.cpp
plugin-src/test2.cpp
plugin-src/test3.cpp
plugin-src/main.cpp
plugin-src/main.hpp
plugin-src/Makefile
plugin-src/test1.cpp
plugin-src/test2.cpp
plugin-src/test3.cpp