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 = 0, bool proxyname = false);
67 
71  vtkSMProxy* CreateWriter(
72  const char* filename, vtkSMSourceProxy*, unsigned int outputport, const char* writerProxyName);
73 
80  std::string GetCorrectWriterName(const char* filename, vtkSMSourceProxy* source,
81  unsigned int outputport, const char* writerProxyName);
82 
90  const char* GetSupportedFileTypes(vtkSMSourceProxy* source, unsigned int outputport);
92  {
93  return this->GetSupportedFileTypes(source, 0);
94  }
95 
97 
100  vtkStringList* GetPossibleWriters(vtkSMSourceProxy* source, unsigned int outputport);
101  const char* GetSupportedWriterProxies(vtkSMSourceProxy* source, unsigned int outputport);
103 
104  // Returns the number of registered prototypes.
105  unsigned int GetNumberOfRegisteredPrototypes();
106 
111  void UpdateAvailableWriters();
112 
114 
118  void AddGroup(const char* groupName);
119  void RemoveGroup(const char* groupName);
120  void GetGroups(vtkStringList* groups);
122 
133  static void AddWriterToWhitelist(const char* writerxmlgroup, const char* writerxmlname);
134 
135 protected:
137  ~vtkSMWriterFactory() override;
138 
139 private:
140  vtkSMWriterFactory(const vtkSMWriterFactory&) = delete;
141  void operator=(const vtkSMWriterFactory&) = delete;
142 
143  class vtkInternals;
144  vtkInternals* Internals;
145 };
146 
147 #endif
#define VTKREMOTINGSERVERMANAGER_EXPORT
vtkSMSession is the default ParaView session.
Definition: vtkSMSession.h:22
const char * GetSupportedFileTypes(vtkSMSourceProxy *source)
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:20
void PrintSelf(ostream &os, vtkIndent indent) override