vtkSMWriterFactory.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
20 #ifndef vtkSMWriterFactory_h
21 #define vtkSMWriterFactory_h
22 
23 #include "vtkRemotingServerManagerModule.h" //needed for exports
24 #include "vtkSMObject.h"
25 
26 class vtkPVXMLElement;
27 class vtkSMProxy;
28 class vtkSMSession;
30 class vtkSMSourceProxy;
31 class vtkStringList;
32 
34 {
35 public:
36  static vtkSMWriterFactory* New();
38  void PrintSelf(ostream& os, vtkIndent indent) override;
39 
43  void Initialize();
44 
48  void RegisterPrototype(const char* xmlgroup, const char* xmlname);
49 
53  bool CanWrite(vtkSMSourceProxy*, unsigned int outputport);
54 
65  vtkSMProxy* CreateWriter(
66  const char* filename, vtkSMSourceProxy*, unsigned int outputport, bool proxyname = false);
67  vtkSMProxy* CreateWriter(const char* filename, vtkSMSourceProxy* pxy)
68  {
69  return this->CreateWriter(filename, pxy, 0);
70  }
71 
79  const char* GetSupportedFileTypes(vtkSMSourceProxy* source, unsigned int outputport);
81  {
82  return this->GetSupportedFileTypes(source, 0);
83  }
87  const char* GetSupportedWriterProxies(vtkSMSourceProxy* source, unsigned int outputport);
88 
89  // Returns the number of registered prototypes.
90  unsigned int GetNumberOfRegisteredPrototypes();
91 
96  void UpdateAvailableWriters();
97 
99 
103  void AddGroup(const char* groupName);
104  void RemoveGroup(const char* groupName);
105  void GetGroups(vtkStringList* groups);
107 
118  static void AddWriterToWhitelist(const char* writerxmlgroup, const char* writerxmlname);
119 
120 protected:
122  ~vtkSMWriterFactory() override;
123 
124 private:
125  vtkSMWriterFactory(const vtkSMWriterFactory&) = delete;
126  void operator=(const vtkSMWriterFactory&) = delete;
127 
128  class vtkInternals;
129  vtkInternals* Internals;
130 };
131 
132 #endif
#define VTKREMOTINGSERVERMANAGER_EXPORT
vtkSMSession is the default ParaView session.
Definition: vtkSMSession.h:22
const char * GetSupportedFileTypes(vtkSMSourceProxy *source)
vtkSMProxy * CreateWriter(const char *filename, vtkSMSourceProxy *pxy)
superclass for most server manager classes
Definition: vtkSMObject.h:17
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:140
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:18
void PrintSelf(ostream &os, vtkIndent indent) override