ParaView
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>

Inherits vtkObject.

Public Types

typedef vtkObject Superclass
 

Public Member Functions

virtual const char * GetClassName ()
 
virtual int IsA (const char *type)
 
void PrintSelf (ostream &os, vtkIndent indent)
 
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 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...
 

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 SetStaticPluginSearchFunction (vtkPluginSearchFunction function)
 Sets the function used to load static plugins. More...
 

Protected Member Functions

 vtkPVPluginTracker ()
 
 ~vtkPVPluginTracker ()
 

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

Member Typedef Documentation

§ Superclass

typedef vtkObject vtkPVPluginTracker::Superclass

Definition at line 44 of file vtkPVPluginTracker.h.

Constructor & Destructor Documentation

§ vtkPVPluginTracker()

vtkPVPluginTracker::vtkPVPluginTracker ( )
protected

§ ~vtkPVPluginTracker()

vtkPVPluginTracker::~vtkPVPluginTracker ( )
protected

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

§ SafeDownCast()

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

§ PrintSelf()

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

§ 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.

§ 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="[optionnal 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 optionnal and is 0 by default. filaname is also optionnal, 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="[optionnal 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 optionnal and is 0 by default. filaname is also optionnal, 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="[optionnal 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 optionnal and is 0 by default. filaname is also optionnal, 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.

§ SetStaticPluginSearchFunction()

static void vtkPVPluginTracker::SetStaticPluginSearchFunction ( vtkPluginSearchFunction  function)
static

Sets the function used to load static plugins.


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