Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members
Public Member Functions | Protected Member Functions | Protected Attributes
engine::Plugin Class Reference

#include <Plugin.h>

Inheritance diagram for engine::Plugin:
engine::Object

List of all members.

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

Detailed Description

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


Constructor & Destructor Documentation

engine::Plugin::Plugin ( std::string &  name,
std::string &  filename 
)

Default constructor - used by PluginManager.

Warning:
: Do not call directly.

References m_hInst, mFileName, mLoaded, engine::Object::mObjectType, and engine::OT_PLUGIN.

engine::Plugin::~Plugin ( )

Default destructor.

References mLoaded.


Member Function Documentation

std::string engine::Plugin::dynlibError ( ) [protected]

Gets the last loading error.

Referenced by load(), and unload().

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.

Parameters:
strName,:The name of the symbol to search for
Returns:
If the function succeeds, the returned value is a handle to the symbol. If the function fails, the returned value is NULL.

References DYNLIB_GETSYM.

Referenced by load(), and unload().

bool engine::Plugin::load ( )
bool engine::Plugin::reload ( )

Reload the plugin.

References load(), and unload().

Referenced by engine::PluginManager::reloadPlugin().

void engine::Plugin::unload ( )

Member Data Documentation

DYNLIB_HANDLE engine::Plugin::m_hInst [protected]

Referenced by load(), Plugin(), and unload().

std::string engine::Plugin::mFileName [protected]

Referenced by getFilename(), load(), and Plugin().

bool engine::Plugin::mLoaded [protected]

Referenced by load(), Plugin(), unload(), and ~Plugin().


The documentation for this class was generated from the following files:

The KG Game Engine
The KG Game Engine Documentation © 2006-2011 by Kat'Oun. Generated on Sat Jul 2 2011 00:50:07 by Doxygen (1.7.4)