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

Used to load ParaView plugins. More...

#include <vtkPVPluginLoader.h>

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

Public Types

typedef vtkObject Superclass
 

Public Member Functions

virtual const char * GetClassName ()
 
virtual int IsA (const char *type)
 
void PrintSelf (ostream &os, vtkIndent indent) override
 
bool LoadPluginByName (const char *name, bool acceptDelayed=true)
 Tries to the load the plugin by name using tracked plugins. More...
 
bool LoadPlugin (const char *filename)
 Tries to the load the plugin given the path to the plugin file. More...
 
bool LoadPluginSilently (const char *filename)
 
bool LoadDelayedLoadPlugin (const std::string &name, const std::vector< std::string > &xmls, const std::string &filename)
 Load a delayed load plugin with provided name, XMLs and an actual plugin filename The actual loading will take place the first time a VTK object for a XML proxy needs to be created. More...
 
void LoadPluginsFromPluginSearchPath ()
 Loads all plugins under the directories mentioned in the SearchPaths. More...
 
void LoadPluginsFromPluginConfigFile ()
 Use PV_PLUGIN_CONFILE_FILE xml file to load specified plugins It can contain path to multiples xml pluginc config files sperated by env separator. More...
 
void LoadPluginsFromPath (const char *path)
 Loads all plugin libraries at a path. More...
 
void LoadPluginConfigurationXMLFromString (const char *xmlcontents)
 Simply forwards the call to vtkPVPluginTracker to load configuration xml. More...
 
void LoadPluginConfigurationXML (const char *configurationFile)
 Simply forwards the call to vtkPVPluginTracker to load configuration xml. More...
 
virtual char * GetFileName ()
 Returns the full filename for the plugin attempted to load most recently using LoadPlugin(). More...
 
virtual char * GetPluginName ()
 Get the plugin name. More...
 
virtual char * GetPluginVersion ()
 Get the plugin version string. More...
 
virtual char * GetErrorString ()
 Get the error string if the plugin failed to load. More...
 
virtual char * GetSearchPaths ()
 Get a string of standard search paths (path1;path2;path3) search paths are based on PV_PLUGIN_PATH, plugin dir relative to executable. More...
 
virtual bool GetLoaded ()
 Returns the status of most recent LoadPlugin call. 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 vtkPVPluginLoaderNew ()
 
static int IsTypeOf (const char *type)
 
static vtkPVPluginLoaderSafeDownCast (vtkObject *o)
 
static void PluginLibraryUnloaded (const char *pluginname)
 Internal method used in pqParaViewPlugin.cxx.in to tell the vtkPVPluginLoader that a library was unloaded so it doesn't try to unload it again. 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

 vtkPVPluginLoader ()
 
 ~vtkPVPluginLoader () override
 
bool LoadPluginInternal (const char *filename, bool no_errors)
 
bool LoadPluginInternal (vtkPVPlugin *plugin)
 Called by LoadPluginInternal() to do the final steps in loading of a plugin. More...
 
bool IsLoaded (const char *filename, bool acceptDelayed=false)
 Return true if a plugin pointing provided filename is already loaded, return false otherwise. More...
 
virtual void SetErrorString (const char *)
 
virtual void SetPluginName (const char *)
 
virtual void SetPluginVersion (const char *)
 
virtual void SetFileName (const char *)
 
virtual void SetSearchPaths (const char *)
 
- 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 &)
 

Protected Attributes

char * ErrorString
 
char * PluginName
 
char * PluginVersion
 
char * FileName
 
char * SearchPaths
 
bool Loaded
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
vtkAtomicInt32 ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 
using PluginLoaderCallback = std::function< bool(const char *)>
 
static int RegisterLoadPluginCallback (PluginLoaderCallback callback)
 
static void UnregisterLoadPluginCallback (int id)
 

Detailed Description

Used to load ParaView plugins.

vtkPVPluginLoader can be used to load plugins for ParaView. vtkPVPluginLoader loads the plugin on the local process.

vtkPVPluginLoader logs plugin related messages using at PARAVIEW_LOG_PLUGIN_VERBOSITY level. See vtkPVLogger::SetPluginVerbosity for information on using environment variables to override or elevate the verbosity level.

This class only needed when loading plugins from shared libraries dynamically. For statically importing plugins, one directly uses PV_PLUGIN_IMPORT() macro defined in vtkPVPlugin.h.

Definition at line 30 of file vtkPVPluginLoader.h.

Member Typedef Documentation

◆ Superclass

Definition at line 34 of file vtkPVPluginLoader.h.

◆ PluginLoaderCallback

Definition at line 143 of file vtkPVPluginLoader.h.

Constructor & Destructor Documentation

◆ vtkPVPluginLoader()

vtkPVPluginLoader::vtkPVPluginLoader ( )
protected

◆ ~vtkPVPluginLoader()

vtkPVPluginLoader::~vtkPVPluginLoader ( )
overrideprotected

Member Function Documentation

◆ New()

static vtkPVPluginLoader* vtkPVPluginLoader::New ( )
static

◆ GetClassName()

virtual const char* vtkPVPluginLoader::GetClassName ( )
virtual

◆ IsTypeOf()

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

◆ IsA()

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

Reimplemented from vtkObjectBase.

◆ SafeDownCast()

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

◆ PrintSelf()

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

Reimplemented from vtkObject.

◆ LoadPluginByName()

bool vtkPVPluginLoader::LoadPluginByName ( const char *  name,
bool  acceptDelayed = true 
)

Tries to the load the plugin by name using tracked plugins.

◆ LoadPlugin()

bool vtkPVPluginLoader::LoadPlugin ( const char *  filename)
inline

Tries to the load the plugin given the path to the plugin file.

Definition at line 45 of file vtkPVPluginLoader.h.

◆ LoadPluginSilently()

bool vtkPVPluginLoader::LoadPluginSilently ( const char *  filename)
inline

Definition at line 46 of file vtkPVPluginLoader.h.

◆ LoadDelayedLoadPlugin()

bool vtkPVPluginLoader::LoadDelayedLoadPlugin ( const std::string name,
const std::vector< std::string > &  xmls,
const std::string filename 
)

Load a delayed load plugin with provided name, XMLs and an actual plugin filename The actual loading will take place the first time a VTK object for a XML proxy needs to be created.

◆ LoadPluginConfigurationXMLFromString()

void vtkPVPluginLoader::LoadPluginConfigurationXMLFromString ( const char *  xmlcontents)

Simply forwards the call to vtkPVPluginTracker to load configuration xml.

◆ LoadPluginConfigurationXML()

void vtkPVPluginLoader::LoadPluginConfigurationXML ( const char *  configurationFile)

Simply forwards the call to vtkPVPluginTracker to load configuration xml.

◆ LoadPluginsFromPluginSearchPath()

void vtkPVPluginLoader::LoadPluginsFromPluginSearchPath ( )

Loads all plugins under the directories mentioned in the SearchPaths.

◆ LoadPluginsFromPluginConfigFile()

void vtkPVPluginLoader::LoadPluginsFromPluginConfigFile ( )

Use PV_PLUGIN_CONFILE_FILE xml file to load specified plugins It can contain path to multiples xml pluginc config files sperated by env separator.

It allow user to fine pick which plugins to load, instead of using PV_PLUGIN_PATH the format a xml plugin file should be the following :

<?xml version="1.0"?>
<Plugins>
<Plugin name="MyPlugin" filename="absolute/path/to/libMyPlugin.so"/>
...
</Plugins>

◆ LoadPluginsFromPath()

void vtkPVPluginLoader::LoadPluginsFromPath ( const char *  path)

Loads all plugin libraries at a path.

◆ GetFileName()

virtual char* vtkPVPluginLoader::GetFileName ( )
virtual

Returns the full filename for the plugin attempted to load most recently using LoadPlugin().

◆ GetPluginName()

virtual char* vtkPVPluginLoader::GetPluginName ( )
virtual

Get the plugin name.

This returns a valid name only after the plugin has been loaded.

◆ GetPluginVersion()

virtual char* vtkPVPluginLoader::GetPluginVersion ( )
virtual

Get the plugin version string.

This returns a valid version string only after the plugin has been loaded.

◆ GetErrorString()

virtual char* vtkPVPluginLoader::GetErrorString ( )
virtual

Get the error string if the plugin failed to load.

Returns nullptr if the plugin was loaded successfully.

◆ GetSearchPaths()

virtual char* vtkPVPluginLoader::GetSearchPaths ( )
virtual

Get a string of standard search paths (path1;path2;path3) search paths are based on PV_PLUGIN_PATH, plugin dir relative to executable.

◆ GetLoaded()

virtual bool vtkPVPluginLoader::GetLoaded ( )
virtual

Returns the status of most recent LoadPlugin call.

◆ RegisterLoadPluginCallback()

static int vtkPVPluginLoader::RegisterLoadPluginCallback ( PluginLoaderCallback  callback)
static

◆ UnregisterLoadPluginCallback()

static void vtkPVPluginLoader::UnregisterLoadPluginCallback ( int  id)
static

◆ PluginLibraryUnloaded()

static void vtkPVPluginLoader::PluginLibraryUnloaded ( const char *  pluginname)
static

Internal method used in pqParaViewPlugin.cxx.in to tell the vtkPVPluginLoader that a library was unloaded so it doesn't try to unload it again.

◆ LoadPluginInternal() [1/2]

bool vtkPVPluginLoader::LoadPluginInternal ( const char *  filename,
bool  no_errors 
)
protected

◆ LoadPluginInternal() [2/2]

bool vtkPVPluginLoader::LoadPluginInternal ( vtkPVPlugin plugin)
protected

Called by LoadPluginInternal() to do the final steps in loading of a plugin.

◆ IsLoaded()

bool vtkPVPluginLoader::IsLoaded ( const char *  filename,
bool  acceptDelayed = false 
)
protected

Return true if a plugin pointing provided filename is already loaded, return false otherwise.

Delayed load plugin are considered not loaded until they actually are as standard plugins.

◆ SetErrorString()

virtual void vtkPVPluginLoader::SetErrorString ( const char *  )
protectedvirtual

◆ SetPluginName()

virtual void vtkPVPluginLoader::SetPluginName ( const char *  )
protectedvirtual

◆ SetPluginVersion()

virtual void vtkPVPluginLoader::SetPluginVersion ( const char *  )
protectedvirtual

◆ SetFileName()

virtual void vtkPVPluginLoader::SetFileName ( const char *  )
protectedvirtual

◆ SetSearchPaths()

virtual void vtkPVPluginLoader::SetSearchPaths ( const char *  )
protectedvirtual

Member Data Documentation

◆ ErrorString

char* vtkPVPluginLoader::ErrorString
protected

Definition at line 177 of file vtkPVPluginLoader.h.

◆ PluginName

char* vtkPVPluginLoader::PluginName
protected

Definition at line 180 of file vtkPVPluginLoader.h.

◆ PluginVersion

char* vtkPVPluginLoader::PluginVersion
protected

Definition at line 181 of file vtkPVPluginLoader.h.

◆ FileName

char* vtkPVPluginLoader::FileName
protected

Definition at line 182 of file vtkPVPluginLoader.h.

◆ SearchPaths

char* vtkPVPluginLoader::SearchPaths
protected

Definition at line 183 of file vtkPVPluginLoader.h.

◆ Loaded

bool vtkPVPluginLoader::Loaded
protected

Definition at line 184 of file vtkPVPluginLoader.h.


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