Skip to content
Snippets Groups Projects
user avatar
Fons Rademakers authored
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.


git-svn-id: http://root.cern.ch/svn/root/trunk@3789 27541ba8-7e3a-0410-8455-c3a389f83636
3b34313a
History