Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

plugin.cpp

Go to the documentation of this file.
00001 
00002 #include <kore/version.h>
00003 #include <kore/plugin.h>
00004 #include <iostream>
00005 
00006 #define PLUGIN_MAJOR 0
00007 #define PLUGIN_MINOR 0
00008 #define PLUGIN_REVISION 1
00009 #define PLUGIN_VERSION "0.0.1"
00010 #define PLUGIN_API_MAJOR 0
00011 #define PLUGIN_API_MINOR 0
00012 #define PLUGIN_API_REVISION 1
00013 #define PLUGIN_API_VERSION "0.0.1"
00014 #define PLUGIN_NAME "Unknown Plugin"
00015 #define PLUGIN_TYPE "Plugin"
00016 #define PLUGIN_DESCRIPTION "Default/Unknown Plugin"
00017 
00018 using namespace kore;
00019 
00020 Plugin::Plugin()
00021 {
00022     commonInit();
00023     _libHandle = 0;
00024     _libName = 0;
00025     _libPath = 0;
00026     _libFlags = 0;
00027 }
00028 Plugin::Plugin(HMODULE libhandle, const char* libname, const char* libpath, int flags)
00029 {
00030     commonInit();
00031     _libHandle = libhandle;
00032     _libName = libname;
00033     _libPath = libpath;
00034     _libFlags = flags;
00035     //cout << "HMODULE: " << libhandle << endl;
00036 }
00037 Plugin::~Plugin()
00038 {
00039     delete _pluginInfo;
00040     delete _pluginVersion;
00041     delete _pluginAPIVersion;
00042 }
00043 void Plugin::commonInit()
00044 {
00045     _pluginVersion = new Version(PLUGIN_MAJOR,PLUGIN_MINOR,PLUGIN_REVISION,PLUGIN_VERSION);
00046     _pluginAPIVersion = new Version(PLUGIN_API_MAJOR,PLUGIN_API_MINOR,PLUGIN_API_REVISION,PLUGIN_API_VERSION);
00047     _pluginInfo = new Info(this, PLUGIN_NAME, PLUGIN_TYPE, PLUGIN_DESCRIPTION, _pluginVersion, _pluginAPIVersion);
00048     setInfo(_pluginInfo);
00049 }
00050 HMODULE Plugin::libHandle() const
00051 {
00052     return _libHandle;
00053 }
00054 
00055 void Plugin::pluginLoaded()
00056 {
00057     //cout << "Plugin::pluginLoaded()" << endl;
00058 }
00059 void Plugin::unloadingPlugin()
00060 {
00061     //cout << "Plugin::unloadingPlugin()" << endl;
00062 }
00063 
00064 void Plugin::initPlugin()
00065 {
00066 }
00067 void Plugin::finalizePlugin()
00068 {
00069 }

Generated on Sat Feb 16 05:44:10 2002 for Korelib by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001