Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
vtkPVPluginTracker Class Reference

a global manager for each processes to keep track of plugins loaded on that process. More...

#include <vtkPVPluginTracker.h>

Inheritance diagram for vtkPVPluginTracker:
Inheritance graph
[legend]
Collaboration diagram for vtkPVPluginTracker:
Collaboration graph
[legend]

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...
 
vtkPVPluginGetPlugin (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)
 
vtkCommandGetCommand (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)
 
vtkCommandGetCommand (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 &)
 

Static Public Member Functions

static vtkPVPluginTrackerNew ()
 
static int IsTypeOf (const char *type)
 
static vtkPVPluginTrackerSafeDownCast (vtkObject *o)
 
static vtkPVPluginTrackerGetInstance ()
 Provides access to the singleton. More...
 
static void RegisterStaticPluginSearchFunction (vtkPluginSearchFunction function)
 Sets the function used to load static plugins. More...
 
static void RegisterStaticPluginListFunction (vtkPluginListFunction function)
 Sets the function used to load static plugins. More...
 
- Static Public Member Functions inherited from vtkObject
static vtkObjectNew ()
 
static void BreakOnError ()
 
static void SetGlobalWarningDisplay (int val)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
static void SetGlobalWarningDisplay (int val)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
- Static Public Member Functions inherited from vtkObjectBase
static vtkTypeBool IsTypeOf (const char *name)
 
static vtkObjectBaseNew ()
 
static vtkObjectBaseNew ()
 

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
 

Detailed Description

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 32 of file vtkPVPluginTracker.h.

Member Typedef Documentation

◆ Superclass

Definition at line 36 of file vtkPVPluginTracker.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
RegisterAvailablePluginEvent 

Definition at line 120 of file vtkPVPluginTracker.h.

Constructor & Destructor Documentation

◆ vtkPVPluginTracker()

vtkPVPluginTracker::vtkPVPluginTracker ( )
protected

◆ ~vtkPVPluginTracker()

vtkPVPluginTracker::~vtkPVPluginTracker ( )
overrideprotected

Member Function Documentation

◆ New()

static vtkPVPluginTracker* vtkPVPluginTracker::New ( )
static

◆ GetClassName()

virtual const char* vtkPVPluginTracker::GetClassName ( )
virtual

◆ IsTypeOf()

static int vtkPVPluginTracker::IsTypeOf ( const char *  type)
static

◆ IsA()

virtual int vtkPVPluginTracker::IsA ( const char *  type)
virtual

Reimplemented from vtkObjectBase.

◆ SafeDownCast()

static vtkPVPluginTracker* vtkPVPluginTracker::SafeDownCast ( vtkObject o)
static

◆ PrintSelf()

void vtkPVPluginTracker::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
overridevirtual

Reimplemented from vtkObject.

◆ GetInstance()

static vtkPVPluginTracker* vtkPVPluginTracker::GetInstance ( )
static

Provides access to the singleton.

This will create the vtkPVPluginTracker singleton the first time this method is called.

◆ RegisterPlugin()

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.

◆ RegisterAvailablePlugin()

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.

◆ LoadPluginConfigurationXMLs()

void vtkPVPluginTracker::LoadPluginConfigurationXMLs ( const char *  appname)

Called to load application-specific configuration xml.

The xml is of the form:

<Plugins>
<Plugin name="[plugin name]" filename="[optional file name]" auto_load="[bool]" />
...
</Plugins>

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.

◆ LoadPluginConfigurationXML() [1/2]

void vtkPVPluginTracker::LoadPluginConfigurationXML ( const char *  filename,
bool  forceLoad = false 
)

Called to load application-specific configuration xml.

The xml is of the form:

<Plugins>
<Plugin name="[plugin name]" filename="[optional file name]" auto_load="[bool]" />
...
</Plugins>

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.

◆ LoadPluginConfigurationXML() [2/2]

void vtkPVPluginTracker::LoadPluginConfigurationXML ( vtkPVXMLElement ,
bool  forceLoad = false 
)

Called to load application-specific configuration xml.

The xml is of the form:

<Plugins>
<Plugin name="[plugin name]" filename="[optional file name]" auto_load="[bool]" />
...
</Plugins>

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.

◆ LoadPluginConfigurationXMLFromString()

void vtkPVPluginTracker::LoadPluginConfigurationXMLFromString ( const char *  xmlcontents,
bool  forceLoad = false 
)

Called to load application-specific configuration xml.

The xml is of the form:

<Plugins>
<Plugin name="[plugin name]" filename="[optional file name]" auto_load="[bool]" />
...
</Plugins>

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.

◆ GetNumberOfPlugins()

unsigned int vtkPVPluginTracker::GetNumberOfPlugins ( )

Methods to iterate over registered plugins.

◆ GetPlugin()

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.

◆ GetPluginName()

const char* vtkPVPluginTracker::GetPluginName ( unsigned int  index)

This is provided for wrapped languages since they can't directly access the vtkPVPlugin instance.

◆ GetPluginFileName()

const char* vtkPVPluginTracker::GetPluginFileName ( unsigned int  index)

This is provided for wrapped languages since they can't directly access the vtkPVPlugin instance.

◆ GetPluginLoaded()

bool vtkPVPluginTracker::GetPluginLoaded ( unsigned int  index)

This is provided for wrapped languages since they can't directly access the vtkPVPlugin instance.

◆ GetPluginAutoLoad()

bool vtkPVPluginTracker::GetPluginAutoLoad ( unsigned int  index)

This is provided for wrapped languages since they can't directly access the vtkPVPlugin instance.

◆ RegisterStaticPluginSearchFunction()

static void vtkPVPluginTracker::RegisterStaticPluginSearchFunction ( vtkPluginSearchFunction  function)
static

Sets the function used to load static plugins.

◆ RegisterStaticPluginListFunction()

static void vtkPVPluginTracker::RegisterStaticPluginListFunction ( vtkPluginListFunction  function)
static

Sets the function used to load static plugins.


The documentation for this class was generated from the following file: