ParaView
vtkSMReaderFactory.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkSMReaderFactory.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 =========================================================================*/
35 #ifndef vtkSMReaderFactory_h
36 #define vtkSMReaderFactory_h
37 
38 #include "vtkPVServerManagerCoreModule.h" //needed for exports
39 #include "vtkSMObject.h"
40 
41 class vtkStringList;
42 class vtkPVXMLElement;
43 class vtkSMProxy;
44 class vtkSMSession;
45 
46 class VTKPVSERVERMANAGERCORE_EXPORT vtkSMReaderFactory : public vtkSMObject
47 {
48 public:
49  static vtkSMReaderFactory* New();
51  void PrintSelf(ostream& os, vtkIndent indent);
52 
56  void Initialize();
57 
62  void RegisterPrototype(const char* xmlgroup, const char* xmlname);
63 
71  bool CanReadFile(const char* filename, vtkSMSession* session);
72 
74 
79  vtkGetStringMacro(ReaderName);
81 
83 
88  vtkGetStringMacro(ReaderGroup);
90 
99  vtkStringList* GetPossibleReaders(const char* filename, vtkSMSession* session);
100 
106  vtkStringList* GetReaders(vtkSMSession* session);
107 
114  vtkStringList* GetReaders(const char* filename, vtkSMSession* session);
115 
121  static bool TestFileReadability(const char* filename, vtkSMSession* session);
122 
131  const char* GetSupportedFileTypes(vtkSMSession* session);
132 
134 
140  static bool CanReadFile(const char* filename, vtkSMProxy* reader);
141  static bool CanReadFile(const char* filename, const char* readerxmlgroup,
142  const char* readerxmlname, vtkSMSession* session);
144 
148  unsigned int GetNumberOfRegisteredPrototypes();
149 
154  void UpdateAvailableReaders();
155 
157 
160  void AddGroup(const char* groupName);
161  void RemoveGroup(const char* groupName);
162  void GetGroups(vtkStringList* groups);
164 
175  static void AddReaderToWhitelist(const char* readerxmlgroup, const char* readerxmlname);
176 
177 protected:
180 
181  // To support legacy configuration files.
182  void RegisterPrototype(
183  const char* xmlgroup, const char* xmlname, const char* extensions, const char* description);
184 
185  vtkSetStringMacro(ReaderName);
186  vtkSetStringMacro(ReaderGroup);
187 
188  char* ReaderName;
189  char* ReaderGroup;
191 
192 private:
193  vtkSMReaderFactory(const vtkSMReaderFactory&) VTK_DELETE_FUNCTION;
194  void operator=(const vtkSMReaderFactory&) VTK_DELETE_FUNCTION;
195 
196  class vtkInternals;
197  vtkInternals* Internals;
198 };
199 
200 #endif
void PrintSelf(ostream &os, vtkIndent indent)
vtkSMSession is the default ParaView session.
Definition: vtkSMSession.h:35
is a factory for creating a reader proxy based on the filename/extension.
superclass for most server manager classes
Definition: vtkSMObject.h:31
vtkStringList * Readers
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.