vtkSMWriterFactory.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkSMWriterFactory.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 =========================================================================*/
32 #ifndef vtkSMWriterFactory_h
33 #define vtkSMWriterFactory_h
34 
35 #include "vtkRemotingServerManagerModule.h" //needed for exports
36 #include "vtkSMObject.h"
37 
38 class vtkPVXMLElement;
39 class vtkSMProxy;
40 class vtkSMSession;
42 class vtkSMSourceProxy;
43 class vtkStringList;
44 
46 {
47 public:
48  static vtkSMWriterFactory* New();
50  void PrintSelf(ostream& os, vtkIndent indent) override;
51 
55  void Initialize();
56 
60  void RegisterPrototype(const char* xmlgroup, const char* xmlname);
61 
65  bool CanWrite(vtkSMSourceProxy*, unsigned int outputport);
66 
77  vtkSMProxy* CreateWriter(
78  const char* filename, vtkSMSourceProxy*, unsigned int outputport, bool proxyname = false);
79  vtkSMProxy* CreateWriter(const char* filename, vtkSMSourceProxy* pxy)
80  {
81  return this->CreateWriter(filename, pxy, 0);
82  }
83 
91  const char* GetSupportedFileTypes(vtkSMSourceProxy* source, unsigned int outputport);
93  {
94  return this->GetSupportedFileTypes(source, 0);
95  }
99  const char* GetSupportedWriterProxies(vtkSMSourceProxy* source, unsigned int outputport);
100 
101  // Returns the number of registered prototypes.
102  unsigned int GetNumberOfRegisteredPrototypes();
103 
108  void UpdateAvailableWriters();
109 
111 
115  void AddGroup(const char* groupName);
116  void RemoveGroup(const char* groupName);
117  void GetGroups(vtkStringList* groups);
119 
130  static void AddWriterToWhitelist(const char* writerxmlgroup, const char* writerxmlname);
131 
132 protected:
134  ~vtkSMWriterFactory() override;
135 
136 private:
137  vtkSMWriterFactory(const vtkSMWriterFactory&) = delete;
138  void operator=(const vtkSMWriterFactory&) = delete;
139 
140  class vtkInternals;
141  vtkInternals* Internals;
142 };
143 
144 #endif
#define VTKREMOTINGSERVERMANAGER_EXPORT
vtkSMSession is the default ParaView session.
Definition: vtkSMSession.h:35
const char * GetSupportedFileTypes(vtkSMSourceProxy *source)
vtkSMProxy * CreateWriter(const char *filename, vtkSMSourceProxy *pxy)
superclass for most server manager classes
Definition: vtkSMObject.h:29
proxy for a VTK source on a server
The vtkSMSessionProxyManager is esponsible for creating and managing proxies for a given session...
source
is a factory or creating a writer based on the data type information from the output port...
static vtkSMObject * New()
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:152
This is used by vtkPVXMLParser to represent an XML document starting at the root element.
Manages allocation and freeing for a string list.
Definition: vtkStringList.h:30
void PrintSelf(ostream &os, vtkIndent indent) override