Main Page | Modules | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

SLPluginRegister Class Reference
[Plugins system]

This is the static object in charge of registering plugins. More...

#include <SLPluginRegister.hpp>

Collaboration diagram for SLPluginRegister:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void registerPlugin (const SLPlugin *plugin)
SLPluginFeaturegetFeature (SLPluginFeature::Type::Types type, const SLString *name=NULL) throw (NotFoundException)
void shutdown () throw (SLPluginDynLoader::IOException)

Detailed Description

This is the static object in charge of registering plugins.

Author:
Alexandre Sauve
There is only one (static) instance of this object in the program (SLPluginRegister.cpp). When they are loaded, each plugin register himself by calling SL_PLUGIN_REGISTER

see the Plugins module for details.


Member Function Documentation

SLPluginFeature* SLPluginRegister::getFeature SLPluginFeature::Type::Types  type,
const SLString name = NULL
throw (NotFoundException)
 

This function allow to request features from plugins.

Warning:
you should use SL_FEATURE_GET instead of this method.

the features must be disposed by the caller with SL_FEATURE_DISPOSE

Returns:
a SLPluginFeature instance
See also:
SLPluginFeature::Type
Parameters:
type is the desired kind of feature.
name is optionnal and allow to select the exact plugin name providing the feature. This is for future extention and should not be used.
Example of code :
SLPluginFeature::DBAccess *db = SL_FEATURE_GET(DBAccess); // code using db SL_FEATURE_DISPOSE(db);

void SLPluginRegister::registerPlugin const SLPlugin plugin  ) 
 

This function should be called with SL_PLUGIN_REGISTER see the Plugins Module

void SLPluginRegister::shutdown  )  throw (SLPluginDynLoader::IOException)
 

This method should be the last call of the program. It unloads all previously registerred plugins.


The documentation for this class was generated from the following file:
Generated on Mon Apr 19 01:03:39 2004 for segusoLand by doxygen 1.3.6-20040222