TPluginManager
class description - source file - inheritance tree
public:
TPluginManager TPluginManager()
TPluginManager TPluginManager(TPluginManager&)
virtual void ~TPluginManager()
void AddHandler(const char* base, const char* regexp, const char* className, const char* pluginName)
static TClass* Class()
TPluginHandler* FindHandler(const char* base, const char* uri)
virtual TClass* IsA() const
void LoadHandlersFromEnv(TEnv* env)
virtual void Print(Option_t* opt) const
void RemoveHandler(const char* base, const char* regexp = "0")
virtual void ShowMembers(TMemberInspector& insp, char* parent)
virtual void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
private:
TList* fHandlers list of plugin handlers
TPluginManager
This class implements a plugin library manager. It keeps track of
a list of plugin handlers. A plugin handler knows which plugin
library to load to get a specific class that is used to extend the
functionality of a specific base class. For example, to extend the
base class TFile to be able to read RFIO files one needs to load
the plugin library libRFIO.so which defines the TRFIOFile class.
This loading should be triggered when a given URI contains a
regular expression defined by the handler. Handlers can be defined
for example as resources in the .rootrc file, e.g.:
Plugin.TFile: ^rfio: TRFIOFile RFIO
Plugin.TSQLServer: ^mysql: TMySQLServer MySQL
+Plugin.TSQLServer: ^pgsql: TPgSQLServer PgSQL
Plugin handlers can also be registered at run time, e.g.:
gROOT->GetPluginManager()->AddHandler("TSQLServer", "^sapdb:",
"TSapDBServer", "SapDB");
A list of currently defined handlers can be printed using:
gROOT->GetPluginManager()->Print();
The use of the plugin library manager removes all textual references
to hard-coded class and library names and the resulting dependencies
in the base classes. The plugin manager is used to extend a.o.
TFile, TSQLServer, TGrid, etc. functionality.
~TPluginManager()
Clean up the plugin manager.
void LoadHandlersFromEnv(TEnv *env)
Load plugin handlers specified in config file, like:
Plugin.TFile: ^rfio: TRFIOFile RFIO
Plugin.TSQLServer: ^mysql: TMySQLServer MySQL
+Plugin.TSQLServer: ^pgsql: TPgSQLServer PgSQL
The + allows the extension of an already defined resource (see TEnv).
void AddHandler(const char *base, const char *regexp,
const char *className, const char *pluginName)
Add plugin handler to the list of handlers. If there is already a
handler defined for the same base and regexp it will be replaced.
void RemoveHandler(const char *base, const char *regexp)
Remove handler for the specified base class and the specified
regexp. If regexp=0 remove all handlers for the specified base.
TPluginHandler* FindHandler(const char *base, const char *uri)
Returns the handler if there exists a handler for the specified URI.
Returns 0 in case handler is not found.
void Print(Option_t *) const
Print list of registered plugin handlers.
Inline Functions
TPluginManager TPluginManager()
TClass* Class()
TClass* IsA() const
void ShowMembers(TMemberInspector& insp, char* parent)
void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
TPluginManager TPluginManager(TPluginManager&)
Author: Fons Rademakers 26/1/2002
Last update: root/base:$Name: $:$Id: TPluginManager.cxx,v 1.5 2002/02/23 10:35:56 brun Exp $
Copyright (C) 1995-2002, Rene Brun and Fons Rademakers. *
ROOT page - Class index - Top of the page
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.