ParaView
vtkPVPluginTracker.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkPVPluginTracker.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
28 #ifndef vtkPVPluginTracker_h
29 #define vtkPVPluginTracker_h
30 
31 #include "vtkObject.h"
32 #include "vtkPVClientServerCoreCoreModule.h" //needed for exports
33 #include "vtkSmartPointer.h" // needed for vtkSmartPointer;
34 
35 class vtkPVPlugin;
36 class vtkPVXMLElement;
37 
38 typedef bool (*vtkPluginSearchFunction)(const char*);
39 
40 class VTKPVCLIENTSERVERCORECORE_EXPORT vtkPVPluginTracker : public vtkObject
41 {
42 public:
43  static vtkPVPluginTracker* New();
44  vtkTypeMacro(vtkPVPluginTracker, vtkObject);
45  void PrintSelf(ostream& os, vtkIndent indent);
46 
51  static vtkPVPluginTracker* GetInstance();
52 
63  void RegisterPlugin(vtkPVPlugin*);
64 
69  unsigned int RegisterAvailablePlugin(const char* filename);
70 
72 
88  void LoadPluginConfigurationXML(const char* filename, bool forceLoad = false);
89  void LoadPluginConfigurationXML(vtkPVXMLElement*, bool forceLoad = false);
90  void LoadPluginConfigurationXMLFromString(const char* xmlcontents, bool forceLoad = false);
92 
96  unsigned int GetNumberOfPlugins();
97 
103  vtkPVPlugin* GetPlugin(unsigned int index);
104 
106 
110  const char* GetPluginName(unsigned int index);
111  const char* GetPluginFileName(unsigned int index);
112  bool GetPluginLoaded(unsigned int index);
113  bool GetPluginAutoLoad(unsigned int index);
115 
119  static void SetStaticPluginSearchFunction(vtkPluginSearchFunction function);
120 
121 protected:
124 
125 private:
126  vtkPVPluginTracker(const vtkPVPluginTracker&) VTK_DELETE_FUNCTION;
127  void operator=(const vtkPVPluginTracker&) VTK_DELETE_FUNCTION;
128 
129  class vtkPluginsList;
130  vtkPluginsList* PluginsList;
131 
132  static vtkPluginSearchFunction StaticPluginSearchFunction;
133 };
134 
135 #endif
136 
137 // VTK-HeaderTest-Exclude: vtkPVPluginTracker.h
a global manager for each processes to keep track of plugins loaded on that process.
bool(* vtkPluginSearchFunction)(const char *)
defines the core interface for any ParaView plugin.
Definition: vtkPVPlugin.h:50
This is used by vtkPVXMLParser to represent an XML document starting at the root element.