Plugin managment


Data Structures

class  nrEngine::Binding
 Binding abstract classes for the engine. More...
class  nrEngine::Package
 Package abstract classes for the engine. More...
class  nrEngine::Plugin
 General interface for any plugin in the engine. More...
class  nrEngine::EmptyPlugin
 Simple class for empty plugin. This plugin doesn't have any effect. More...
class  nrEngine::PluginLoader
 Plugin loader does handle loading/creating of plugin libraries for the engine. More...

Typedefs

typedef void * nrEngine::PluginHandle

Detailed Description

Plugins are used to extend the functionality of the underlying system without recompiling it. So our engine does support plugins, which allows programm new functionality to the engine without recompiling it.

One of the best examples of such a plugin is a possibility to extend the resource managment system to new resources. You can program addiditional texture loader for example and "plug in" this into the engine. The new loader could load textures and prepare them as resources, so your program can get use of them.

Another example could be a plugin that runs as task in the engine's kernel and do something. For example an ingame console could be such a task, which can be fully programmed as external plugin.

Each plugin is a simple dynamic library (*.dll, *.so) file, which contains the plugin. Each plugin will be loaded if it is added to the plugin manager. The plgLoad() function of the plugin will be called. If the plugin is unloaded, so call plgUnload().

Each plugin should export some default functions to be able to be loaded by the manager. Plugins could be simple functionality plugins (like any loader) or a new task in the engine's kernel (like a console). This capability of each plugin is readed through special plugin functions.

Also each plugin should provide a function which can be used to access internal functionality of that plugin by using of strings. In our case this subroutine should be called plgCall and accept as first the name of the function and then a parameter list of parameters and their values. We use this to provide the user applications a possibility to call certain functions from plugins which are not replace a default behaviour of the engine but add some new functionality. The good example where it can be used is a scripting. You load a plugins from the script and then call some functions from the plugin whithin scripting.


Typedef Documentation

typedef void* nrEngine::PluginHandle

Each plugin is an dynamic library. So we have to use some handles given by the os api to handle with these libraries. On each os this handle is of different type. So we have to find out which os do we using now and define the right type

Definition at line 75 of file Plugin.h.


Generated on Wed Sep 12 23:19:43 2007 for nrEngine by  doxygen 1.5.1