a global manager for each processes to keep track of plugins loaded on that process. More...
#include <vtkPVPluginTracker.h>
Public Types | |
enum | { RegisterAvailablePluginEvent = vtkCommand::UserEvent + 91 } |
typedef vtkObject | Superclass |
Public Member Functions | |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
void | PrintSelf (ostream &os, vtkIndent indent) override |
void | RegisterPlugin (vtkPVPlugin *) |
Called by vtkPVPluginLoader after a plugin is loaded on the process. More... | |
unsigned int | RegisterAvailablePlugin (const char *filename) |
This API is used to register available plugins without actually loading them. More... | |
unsigned int | GetNumberOfPlugins () |
Methods to iterate over registered plugins. More... | |
vtkPVPlugin * | GetPlugin (unsigned int index) |
Returns the plugin instance. More... | |
void | LoadPluginConfigurationXMLs (const char *appname) |
Called to load application-specific configuration xml. More... | |
void | LoadPluginConfigurationXML (const char *filename, bool forceLoad=false) |
Called to load application-specific configuration xml. More... | |
void | LoadPluginConfigurationXML (vtkPVXMLElement *, bool forceLoad=false) |
Called to load application-specific configuration xml. More... | |
void | LoadPluginConfigurationXMLFromString (const char *xmlcontents, bool forceLoad=false) |
Called to load application-specific configuration xml. More... | |
const char * | GetPluginName (unsigned int index) |
This is provided for wrapped languages since they can't directly access the vtkPVPlugin instance. More... | |
const char * | GetPluginFileName (unsigned int index) |
This is provided for wrapped languages since they can't directly access the vtkPVPlugin instance. More... | |
bool | GetPluginLoaded (unsigned int index) |
This is provided for wrapped languages since they can't directly access the vtkPVPlugin instance. More... | |
bool | GetPluginAutoLoad (unsigned int index) |
This is provided for wrapped languages since they can't directly access the vtkPVPlugin instance. More... | |
Public Member Functions inherited from vtkObject | |
vtkBaseTypeMacro (vtkObject, vtkObjectBase) | |
virtual void | DebugOn () |
virtual void | DebugOff () |
bool | GetDebug () |
void | SetDebug (bool debugFlag) |
virtual void | Modified () |
virtual vtkMTimeType | GetMTime () |
void | RemoveObserver (unsigned long tag) |
void | RemoveObservers (unsigned long event) |
void | RemoveObservers (const char *event) |
void | RemoveAllObservers () |
int | HasObserver (unsigned long event) |
int | HasObserver (const char *event) |
int | InvokeEvent (unsigned long event) |
int | InvokeEvent (const char *event) |
unsigned long | AddObserver (unsigned long event, vtkCommand *, float priority=0.0f) |
unsigned long | AddObserver (const char *event, vtkCommand *, float priority=0.0f) |
vtkCommand * | GetCommand (unsigned long tag) |
void | RemoveObserver (vtkCommand *) |
void | RemoveObservers (unsigned long event, vtkCommand *) |
void | RemoveObservers (const char *event, vtkCommand *) |
int | HasObserver (unsigned long event, vtkCommand *) |
int | HasObserver (const char *event, vtkCommand *) |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f) |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
unsigned long | AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
int | InvokeEvent (unsigned long event, void *callData) |
int | InvokeEvent (const char *event, void *callData) |
unsigned long | AddObserver (unsigned long event, vtkCommand *, float priority=0.0f) |
unsigned long | AddObserver (const char *event, vtkCommand *, float priority=0.0f) |
vtkCommand * | GetCommand (unsigned long tag) |
void | RemoveObserver (vtkCommand *) |
void | RemoveObservers (unsigned long event, vtkCommand *) |
void | RemoveObservers (const char *event, vtkCommand *) |
int | HasObserver (unsigned long event, vtkCommand *) |
int | HasObserver (const char *event, vtkCommand *) |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f) |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
unsigned long | AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
int | InvokeEvent (unsigned long event, void *callData) |
int | InvokeEvent (const char *event, void *callData) |
Public Member Functions inherited from vtkObjectBase | |
const char * | GetClassName () const |
virtual void | Delete () |
virtual void | FastDelete () |
void | Print (ostream &os) |
virtual void | Register (vtkObjectBase *o) |
virtual void | UnRegister (vtkObjectBase *o) |
void | SetReferenceCount (int) |
virtual void | PrintHeader (ostream &os, vtkIndent indent) |
virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
int | GetReferenceCount () |
void | PrintRevisions (ostream &) |
virtual void | PrintHeader (ostream &os, vtkIndent indent) |
virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
int | GetReferenceCount () |
void | PrintRevisions (ostream &) |
Protected Member Functions | |
vtkPVPluginTracker () | |
~vtkPVPluginTracker () override | |
Protected Member Functions inherited from vtkObject | |
vtkObject () | |
virtual | ~vtkObject () |
void | RegisterInternal (vtkObjectBase *, vtkTypeBool check) VTK_OVERRIDE |
void | UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) VTK_OVERRIDE |
void | InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL) |
void | InternalReleaseFocus () |
void | InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL) |
void | InternalReleaseFocus () |
Protected Member Functions inherited from vtkObjectBase | |
vtkObjectBase () | |
virtual | ~vtkObjectBase () |
virtual void | CollectRevisions (ostream &) |
virtual void | ReportReferences (vtkGarbageCollector *) |
vtkObjectBase (const vtkObjectBase &) | |
void | operator= (const vtkObjectBase &) |
Additional Inherited Members | |
Protected Attributes inherited from vtkObject | |
bool | Debug |
vtkTimeStamp | MTime |
vtkSubjectHelper * | SubjectHelper |
Protected Attributes inherited from vtkObjectBase | |
vtkAtomicInt32 | ReferenceCount |
vtkWeakPointerBase ** | WeakPointers |
a global manager for each processes to keep track of plugins loaded on that process.
vtkPVPluginTracker is a singleton that's present on each process to keep track of plugins loaded on that process. Whenever is plugin is loaded (either statically using PV_PLUGIN_IMPORT() or dynamically, it gets registered with the on every process that it is loaded. Whenever a plugin is registered, this class fires a vtkCommand::RegisterEvent that handlers can listen to, to process the plugin.
Definition at line 41 of file vtkPVPluginTracker.h.
Definition at line 45 of file vtkPVPluginTracker.h.
anonymous enum |
Enumerator | |
---|---|
RegisterAvailablePluginEvent |
Definition at line 129 of file vtkPVPluginTracker.h.
|
protected |
|
overrideprotected |
|
static |
|
virtual |
|
static |
|
virtual |
Reimplemented from vtkObjectBase.
|
static |
|
overridevirtual |
Reimplemented from vtkObject.
|
static |
Provides access to the singleton.
This will create the vtkPVPluginTracker singleton the first time this method is called.
void vtkPVPluginTracker::RegisterPlugin | ( | vtkPVPlugin * | ) |
Called by vtkPVPluginLoader after a plugin is loaded on the process.
This registers the plugin instance with the manager. It fires an event (vtkCommand::RegisterEvent) signalling that a plugin was loaded. Handlers that the process the plugin by detecting the interfaces implemented by the plugin and the processing those on a case-by-case basis. Note there's no call to unregister a plugin. Once a plugin has been loaded, it cannot be unloaded for the lifetime of the process.
unsigned int vtkPVPluginTracker::RegisterAvailablePlugin | ( | const char * | filename | ) |
This API is used to register available plugins without actually loading them.
This fires vtkPVPluginTracker::RegisterAvailablePluginEvent
to notify a new plugin has been made available.
void vtkPVPluginTracker::LoadPluginConfigurationXMLs | ( | const char * | appname | ) |
Called to load application-specific configuration xml.
The xml is of the form:
This method will process the XML, locate the plugin shared library and either load the plugin or call RegisterAvailablePlugin based on the status of the auto_load flag. auto_load flag is optional and is 0 by default. filename is also optional, if not provided this method will look in different place to find the plugin, eg. paraview lib dir. It will NOT look in PV_PLUGIN_PATH.
void vtkPVPluginTracker::LoadPluginConfigurationXML | ( | const char * | filename, |
bool | forceLoad = false |
||
) |
Called to load application-specific configuration xml.
The xml is of the form:
This method will process the XML, locate the plugin shared library and either load the plugin or call RegisterAvailablePlugin based on the status of the auto_load flag. auto_load flag is optional and is 0 by default. filename is also optional, if not provided this method will look in different place to find the plugin, eg. paraview lib dir. It will NOT look in PV_PLUGIN_PATH.
void vtkPVPluginTracker::LoadPluginConfigurationXML | ( | vtkPVXMLElement * | , |
bool | forceLoad = false |
||
) |
Called to load application-specific configuration xml.
The xml is of the form:
This method will process the XML, locate the plugin shared library and either load the plugin or call RegisterAvailablePlugin based on the status of the auto_load flag. auto_load flag is optional and is 0 by default. filename is also optional, if not provided this method will look in different place to find the plugin, eg. paraview lib dir. It will NOT look in PV_PLUGIN_PATH.
void vtkPVPluginTracker::LoadPluginConfigurationXMLFromString | ( | const char * | xmlcontents, |
bool | forceLoad = false |
||
) |
Called to load application-specific configuration xml.
The xml is of the form:
This method will process the XML, locate the plugin shared library and either load the plugin or call RegisterAvailablePlugin based on the status of the auto_load flag. auto_load flag is optional and is 0 by default. filename is also optional, if not provided this method will look in different place to find the plugin, eg. paraview lib dir. It will NOT look in PV_PLUGIN_PATH.
unsigned int vtkPVPluginTracker::GetNumberOfPlugins | ( | ) |
Methods to iterate over registered plugins.
vtkPVPlugin* vtkPVPluginTracker::GetPlugin | ( | unsigned int | index | ) |
Returns the plugin instance.
This is non-null only for loaded plugins. If a plugin was merely registered as a "available" plugin, then one can only use the methods to query some primitive information about that plugin.
const char* vtkPVPluginTracker::GetPluginName | ( | unsigned int | index | ) |
This is provided for wrapped languages since they can't directly access the vtkPVPlugin instance.
const char* vtkPVPluginTracker::GetPluginFileName | ( | unsigned int | index | ) |
This is provided for wrapped languages since they can't directly access the vtkPVPlugin instance.
bool vtkPVPluginTracker::GetPluginLoaded | ( | unsigned int | index | ) |
This is provided for wrapped languages since they can't directly access the vtkPVPlugin instance.
bool vtkPVPluginTracker::GetPluginAutoLoad | ( | unsigned int | index | ) |
This is provided for wrapped languages since they can't directly access the vtkPVPlugin instance.
|
static |
Sets the function used to load static plugins.
|
static |