Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members |
#include <Plugin.h>
Public Member Functions | |
const std::string & | getFilename () const |
Get the file name of the plugin. | |
void * | getSymbol (const std::string &strName) const throw () |
bool | load () |
Load the plugin. | |
Plugin (std::string &name, std::string &filename) | |
bool | reload () |
Reload the plugin. | |
void | unload () |
Unload the plugin. | |
~Plugin () | |
Default destructor. | |
Protected Member Functions | |
std::string | dynlibError () |
Gets the last loading error. | |
Protected Attributes | |
DYNLIB_HANDLE | m_hInst |
std::string | mFileName |
bool | mLoaded |
Resource holding data about a plugin(dynamic library). This class holds the data required to get symbols from libraries loaded at run-time (i.e. from DLL's for so's) Author: Adrian Cearnău (cearny@cearny.ro) since: 27 January 2002
engine::Plugin::Plugin | ( | std::string & | name, |
std::string & | filename | ||
) |
Default constructor - used by PluginManager.
References m_hInst, mFileName, mLoaded, engine::Object::mObjectType, and engine::OT_PLUGIN.
engine::Plugin::~Plugin | ( | ) |
Default destructor.
References mLoaded.
std::string engine::Plugin::dynlibError | ( | ) | [protected] |
const std::string & engine::Plugin::getFilename | ( | ) | const |
Get the file name of the plugin.
References mFileName.
Referenced by engine::PluginManager::removePlugin().
void * engine::Plugin::getSymbol | ( | const std::string & | strName | ) | const throw () |
Returns the address of the given symbol from the loaded library.
strName,: | The name of the symbol to search for |
References DYNLIB_GETSYM.
bool engine::Plugin::load | ( | ) |
Load the plugin.
References DYNLIB_HANDLE, DYNLIB_LOAD, dynlibError(), engine::LogManager::getInstance(), getSymbol(), engine::LL_ERROR, engine::LogManager::logMessage(), m_hInst, mFileName, mLoaded, and engine::Object::mName.
Referenced by engine::PluginManager::loadPlugin(), and reload().
bool engine::Plugin::reload | ( | ) |
Reload the plugin.
References load(), and unload().
Referenced by engine::PluginManager::reloadPlugin().
void engine::Plugin::unload | ( | ) |
Unload the plugin.
References DYNLIB_UNLOAD, dynlibError(), engine::LogManager::getInstance(), getSymbol(), engine::LL_ERROR, engine::LogManager::logMessage(), m_hInst, mLoaded, and engine::Object::mName.
Referenced by reload(), and engine::PluginManager::unloadPlugin().
DYNLIB_HANDLE engine::Plugin::m_hInst [protected] |
std::string engine::Plugin::mFileName [protected] |
Referenced by getFilename(), load(), and Plugin().
bool engine::Plugin::mLoaded [protected] |
The KG Game Engine
Documentation © 2006-2011 by Kat'Oun. Generated on Sat Jul 2 2011 00:50:07 by
Doxygen
(1.7.4)
|