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 
33 class VTKREMOTINGSERVERMANAGER_EXPORT vtkSMWriterFactory : public vtkSMObject
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
vtkSMSessionProxyManager
Definition: vtkSMSessionProxyManager.h:135
vtkSMObject
superclass for most server manager classes
Definition: vtkSMObject.h:17
source
source
vtkSMObject::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
vtkSMObject.h
vtkSMWriterFactory
is a factory or creating a writer based on the data type information from the output port.
Definition: vtkSMWriterFactory.h:33
vtkSMProxy
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:140
vtkSMSourceProxy
proxy for a VTK source on a server
Definition: vtkSMSourceProxy.h:37
vtkSMSession
Definition: vtkSMSession.h:22
vtkIndent
vtkStringList
Manages allocation and freeing for a string list.
Definition: vtkStringList.h:18
vtkPVXMLElement
Definition: vtkPVXMLElement.h:23
vtkSMObject::New
static vtkSMObject * New()
vtkSMWriterFactory::CreateWriter
vtkSMProxy * CreateWriter(const char *filename, vtkSMSourceProxy *pxy)
Definition: vtkSMWriterFactory.h:67
vtkSMWriterFactory::GetSupportedFileTypes
const char * GetSupportedFileTypes(vtkSMSourceProxy *source)
Definition: vtkSMWriterFactory.h:80