library: libCore
#include "TPluginManager.h"


class description - header file - source file
viewCVS header - viewCVS source

class TPluginHandler: public TObject

Inheritance Inherited Members Includes Libraries
Class Charts

Function Members (Methods)

Display options:
Show inherited
Show non-public
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tTObject::Compare(const TObject* obj) const
virtual voidTObject::Copy(TObject& object) const
virtual voidTObject::Delete(Option_t* option = "")
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() const
virtual TObject*TObject::DrawClone(Option_t* option = "") const
virtual voidTObject::Dump() const
virtual voidTObject::Error(const char* method, const char* msgfmt) const
Long_tExecPlugin(Int_t nargs)
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
const char*GetClass() const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
virtual const char*TObject::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
virtual const char*TObject::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() const
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTObject::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTObject::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTObject::Print(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") const
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTObject::SetDrawOption(Option_t* option = "")
static voidTObject::SetDtorOnly(void* obj)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = "0", Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = "0", Int_t option = 0, Int_t bufsize = 0) const
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
TPluginHandler(const TPluginHandler&)
TPluginHandler(const char* base, const char* regexp, const char* className, const char* pluginName, const char* ctor)
Bool_tCanHandle(const char* base, const char* uri)
const char*GetBase() const
const char*GetCtor() const
const char*GetPlugin() const
const char*GetRegexp() const
TPluginHandler&operator=(const TPluginHandler&)

Data Members

enum TObject::EStatusBits { kCanDelete
enum TObject::[unnamed] { kIsOnHeap
TStringfBasebase class which will be extended by plugin
TStringfRegexpregular expression which must be matched in URI
TStringfClassclass to be loaded from plugin library
TStringfPluginplugin library which should contain fClass
TStringfCtorctor used to instantiate object of fClass
TMethodCall*fCallEnv!ctor method call environment
TFunction*fMethod!ctor method or global function
Int_tfCanCall!if 1 fCallEnv is ok, -1 fCallEnv is not ok
Bool_tfIsMacroplugin is a macro and not a library
Bool_tfIsGlobalplugin ctor is a global function

Class Description

 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 and how to create an object   
 of this class. For example, to extend the base class TFile to be     
 able to read RFIO files one needs to load the plugin library  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   "<constructor>"   
   Plugin.TSQLServer:  ^mysql:  TMySQLServer MySQL  "<constructor>"   
   +Plugin.TSQLServer: ^pgsql:  TPgSQLServer PgSQL  "<constructor>"   
   Plugin.TVirtualFitter: *     TFitter      Minuit "TFitter(Int_t)"  
 Where the + in front of Plugin.TSQLServer says that it extends the   
 existing definition of TSQLServer, usefull when there is more than   
 one plugin that can extend the same base class. The "<constructor>"  
 should be the constructor or a static method that generates an       
 instance of the specified class. Global methods should start with    
 "::" in their name, like "::CreateFitter()".                         
 Instead of being a shared library a plugin can also be a CINT        
 script, so instead of one can have Dialog.C.            
 The * is a placeholder in case there is no need for a URI to         
 differentiate between different plugins for the same base class.     
 For the default plugins see $ROOTSYS/etc/system.rootrc.              
 Plugin handlers can also be registered at run time, e.g.:            
   gROOT->GetPluginManager()->AddHandler("TSQLServer", "^sapdb:",     
                                         "TSapDBServer", "SapDB",     
             "TSapDBServer(const char*,const char*, const char*)");   
 A list of currently defined handlers can be printed using:           
   gROOT->GetPluginManager()->Print(); // use option="a" to see ctors 
 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.                        

TPluginHandler(const char *base, const char *regexp, const char *className, const char *pluginName, const char *ctor)
 Create a plugin handler. Called by TPluginManager.
 Cleanup plugin handler object.
Bool_t CanHandle(const char *base, const char *uri)
 Check if regular expression appears in the URI, if so return kTRUE.
 If URI = 0 always return kTRUE.
void SetupCallEnv()
 Setup ctor or static method call environment.
Int_t CheckPlugin()
 Check if the plugin library for this handler exits. Returns 0
 when it exists and -1 in case the plugin does not exist.
Int_t LoadPlugin()
 Load the plugin library for this handler. Returns 0 on successful loading
 and -1 in case the library does not exist or in case of error.
Long_t ExecPlugin(Int_t va_(nargs), ...)
 Execute ctor for this plugin and return pointer to object of specific
 class. User must cast the returned long to the correct class.
 This method accepts a variable number of arguments to be passed
 to the ctor, where nargs is the number of arguments, followed
 by nargs arguments. Returns 0 in case of error.
{ }
TPluginHandler(const char *base, const char *regexp, const char *className, const char *pluginName, const char *ctor)
TPluginHandler& operator=(const TPluginHandler&)
const char * GetBase()
{ return fBase; }
const char * GetRegexp()
{ return fRegexp; }
const char * GetPlugin()
{ return fPlugin; }
const char * GetCtor()
{ return fCtor; }
const char * GetClass()
{ return fClass; }

Author: Fons Rademakers 26/1/2002
Last update: root/base:$Name: $:$Id: TPluginManager.cxx,v 1.32 2006/12/06 10:21:03 rdm Exp $
Copyright (C) 1995-2002, Rene Brun and Fons Rademakers. *

ROOT page - Class index - Class Hierarchy - 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.