Log of /trunk/core/base/inc/TPluginManager.h
Parent Directory
Revision
37497 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Dec 10 12:22:54 2010 UTC (4 years, 1 month ago) by
rdm
File length: 9501 byte(s)
Diff to
previous 32284
Add new method WritePluginRecords() which writes out the plugin information
in the TEnv format:
Plugin.TFile: ^rfio: TRFIOFile RFIO "<constructor>"
This is needed for iOS where we cannot ship the etc/plugins directory
as part of the app bundle. A single system.plugins file will work though.
Revision
32284 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Feb 8 15:57:44 2010 UTC (4 years, 11 months ago) by
rdm
File length: 9420 byte(s)
Diff to
previous 22961
- add explanation on processing order of plugin directories.
- add TPluginHandler::Print() (code was all in TPluginManager::Print()).
Revision
22961 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Apr 3 13:32:57 2008 UTC (6 years, 9 months ago) by
rdm
File length: 9065 byte(s)
Diff to
previous 20877
move the directories:
base clib cont meta metautils newdelete pcre rint thread unix utils
winnt zip
under the new core meta directory.
Revision
19373 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Jul 17 14:43:18 2007 UTC (7 years, 6 months ago) by
rdm
Original Path:
trunk/base/inc/TPluginManager.h
File length: 8903 byte(s)
Diff to
previous 17055
Updated TPluginManager. Plugin handlers can now be specified wia macros
in a list of plugin directories. These new features are implemented via
two new methods described below. These changes are fully backward compatible
and plugin descriptions in rootrc files still work. However, using the new
macros we only load in program memory the handlers for the needed plugins,
instead of the almost 100 handlers of all plugins. For example after starting
root.exe, only these handlers are loaded:
root [0] gPluginMgr->Print()
=====================================================================
Base Regexp Class Plugin
=====================================================================
TSystem ^rfio: TRFIOSystem RFIO
TSystem ^castor: TRFIOSystem RFIO
TSystem ^dcache: TDCacheSystem DCache
TSystem ^dcap: TDCacheSystem DCache
TSystem ^alien: TAlienSystem RAliEn
TSystem ^root: TXNetSystem Netx
=====================================================================
6 plugin handlers registered
[*] plugin not available
=====================================================================
For more see below:
void TPluginManager::LoadHandlersFromPluginDirs(const char *base)
Load plugin handlers specified via macros in a list of plugin
directories. The $ROOTSYS/etc/plugins is the default top plugin directory
specified in $ROOTSYS/etc/system.rootrc. The macros must have names
like <BaseClass>/PX0_<PluginClass>.C, e.g.:
TFile/P10_TRFIOFile.C, TSQLServer/P20_TMySQLServer.C, etc.
to allow easy sorting and grouping. Macros not beginning with 'P' and
ending with ".C" are ignored. If base is specified only plugin macros for
that base class are loaded. The macros typically should look like:
void P10_TDCacheFile()
{
gPluginMgr->AddHandler("TFile", "^dcache", "TDCacheFile",
"DCache", "TDCacheFile(const char*,Option_t*,const char*,Int_t)");
}
In general these macros should not cause side effects, by changing global
ROOT state via, e.g. gSystem calls, etc. However, in specific cases
this might be useful, e.g. adding a library search path, adding a specific
dependency, check on some OS or ROOT capability or downloading
of the plugin.
Int_t TPluginManager::WritePluginMacros(const char *dir, const char *plugin)
Write in the specified directory the plugin macros. If plugin is specified
and if it is a base class all macros for that base will be written. If it
is a plugin class name, only that one macro will be written. If plugin
is 0 all macros are written. Returns -1 if dir does not exist, 0 otherwise.
This method allows the regeneration of the entire tree of plugin macros
in case we ever decide to change something in the macros.
Revision
15134 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue May 23 04:47:42 2006 UTC (8 years, 8 months ago) by
brun
Original Path:
trunk/base/inc/TPluginManager.h
File length: 7130 byte(s)
Diff to
previous 6373
From Federico Carminati:
"I have implemented all copy and equal operators needed to silence all
warnings in AliRoot, as requested. I have implemented shallow copies as
would do the default operators synthetized by the compiler.
Most operators are protected. If users complain, you just have to move
them into the public area, but class derivation is of course supported.
It has been a terrible job, I have modified 278 files, but the changes
are backward compabile, and this goes a long way to permitting user to
use the effc++ flag with root headers."
Revision
6373 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Apr 4 00:10:16 2003 UTC (11 years, 9 months ago) by
rdm
Original Path:
trunk/base/inc/TPluginManager.h
File length: 6671 byte(s)
Diff to
previous 4980
new features in the plugin manager: constructors can now be global functions.
In the rootrc file a global function is specified by starting the ctor with
"::". Also added support for plugin macros, instead of the lib name just
use the macro name (typically myplugin.C). The macro will be searched for in
the standard macro path.
Added new default argument to TROOT::LoadMacro() to check for the macros
existence (symmetric with LoadClass()). Used by the plugin manager to check
if a macro exists.
Revision
3791 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Jan 27 15:53:40 2002 UTC (12 years, 11 months ago) by
rdm
Original Path:
trunk/base/inc/TPluginManager.h
File length: 4866 byte(s)
Diff to
previous 3789
added new default argument check=kFALSE to TROOT::LoadClass(). If check
is true LoadClass() only checks for the existence and readability of the
library and does not attempt to load the library. The plugin manager
uses this new functionality in its Print() method to show which plugins
are available.
Revision
3789 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Added
Sun Jan 27 13:53:35 2002 UTC (12 years, 11 months ago) by
rdm
Original Path:
trunk/base/inc/TPluginManager.h
File length: 4782 byte(s)
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.
This form allows you to request diffs between any two revisions of this file.
For each of the two "sides" of the diff,
enter a numeric revision.