|
ROOT
Reference Guide |
|
Go to the documentation of this file.
12 #ifndef ROOT_TPluginManager
13 #define ROOT_TPluginManager
124 const char *className,
const char *pluginName,
125 const char *ctor,
const char *origin);
149 auto nargs =
sizeof...(params);
168 if ((
gDebug > 1) && (nargs != (
int)
sizeof...(params))) {
169 Warning(
"ExecPlugin",
"Announced number of args different from the real number of argument passed %d vs %lu",
170 nargs, (
unsigned long)
sizeof...(params) );
198 void AddHandler(
const char *base,
const char *regexp,
199 const char *className,
const char *pluginName,
200 const char *ctor = 0,
const char *origin = 0);
201 void RemoveHandler(
const char *base,
const char *regexp = 0);
Bool_t fReadingDirs
table of base classes already checked or loaded
AtomicInt_t fCanCall
ctor method or global function
This class implements a plugin library manager.
THashTable * fBasesLoaded
void SetupCallEnv()
Setup ctor or static method call environment.
Bool_t fIsMacro
if 1 fCallEnv is ok, -1 fCallEnv is not ok, 0 fCallEnv not setup yet.
TPluginManager & operator=(const TPluginManager &pm)
const char * GetBase() const
Long_t ExecPlugin(int nargs, const T &... params)
void Print(Option_t *opt="") const
Print info about the plugin handler.
Int_t WritePluginMacros(const char *dir, const char *plugin=0) const
Write in the specified directory the plugin macros.
TPluginHandler(const TPluginHandler &)
Bool_t CanHandle(const char *base, const char *uri)
Check if regular expression appears in the URI, if so return kTRUE.
TFunction * fMethod
ctor method call environment
~TPluginManager()
Clean up the plugin manager.
const char * GetClass() const
void LoadHandlerMacros(const char *path)
Load all plugin macros from the specified path/base directory.
const char * GetCtor() const
TPluginHandler & operator=(const TPluginHandler &)
Long_t ExecPluginImpl(const T &... params)
void LoadHandlersFromPluginDirs(const char *base=0)
Load plugin handlers specified via macros in a list of plugin directories.
~TPluginHandler()
Cleanup plugin handler object.
THashTable implements a hash table to store TObject's.
R__EXTERN TVirtualMutex * gInterpreterMutex
void AddHandler(const char *base, const char *regexp, const char *className, const char *pluginName, const char *ctor=0, const char *origin=0)
Add plugin handler to the list of handlers.
#define R__LOCKGUARD(mutex)
void SetParams(const T &... params)
TPluginHandler * FindHandler(const char *base, const char *uri=0)
Returns the handler if there exists a handler for the specified URI.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
TPluginManager(const TPluginManager &pm)
true if we are running LoadHandlersFromPluginDirs
const char * GetRegexp() const
Int_t LoadPlugin()
Load the plugin library for this handler.
void Execute(const char *, const char *, int *=0)
Execute method on this object with the given parameter string, e.g.
The TEnv class reads config files, by default named .rootrc.
Mother of all ROOT objects.
#define ClassDef(name, id)
Int_t CheckPlugin() const
Check if the plugin library for this handler exits.
Method or function calling interface.
const char * GetOrigin() const
Int_t WritePluginRecords(const char *envFile, const char *plugin=0) const
Write in the specified environment config file the plugin records.
R__EXTERN TPluginManager * gPluginMgr
const char * GetPlugin() const
std::atomic< Int_t > AtomicInt_t
Global functions class (global functions are obtained from CINT).
void RemoveHandler(const char *base, const char *regexp=0)
Remove handler for the specified base class and the specified regexp.
void Print(Option_t *opt="") const
Print list of registered plugin handlers.
void LoadHandlersFromEnv(TEnv *env)
Load plugin handlers specified in config file, like:
Bool_t CheckForExecPlugin(Int_t nargs)
Check that we can properly run ExecPlugin.