VTK
vtkXMLFileReadTester.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkXMLFileReadTester.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm 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 =========================================================================*/
23 #ifndef __vtkXMLFileReadTester_h
24 #define __vtkXMLFileReadTester_h
25 
26 #include "vtkIOXMLModule.h" // For export macro
27 #include "vtkXMLParser.h"
28 
29 class VTKIOXML_EXPORT vtkXMLFileReadTester: public vtkXMLParser
30 {
31 public:
33  void PrintSelf(ostream& os, vtkIndent indent);
34  static vtkXMLFileReadTester* New();
35 
38  int TestReadFile();
39 
41 
42  vtkSetStringMacro(FileName);
43  vtkGetStringMacro(FileName);
45 
47 
49  vtkGetStringMacro(FileDataType);
51 
53 
55  vtkGetStringMacro(FileVersion);
57 
58 protected:
61 
62  void StartElement(const char* name, const char** atts);
63  int ParsingComplete();
64  void ReportStrayAttribute(const char*, const char*, const char*) {}
65  void ReportMissingAttribute(const char*, const char*) {}
66  void ReportBadAttribute(const char*, const char*, const char*) {}
67  void ReportUnknownElement(const char*) {}
69 
70  char* FileName;
71  char* FileDataType;
72  char* FileVersion;
73  int Done;
74 
75  vtkSetStringMacro(FileDataType);
76  vtkSetStringMacro(FileVersion);
77 
78 private:
79  vtkXMLFileReadTester(const vtkXMLFileReadTester&); // Not implemented.
80  void operator=(const vtkXMLFileReadTester&); // Not implemented.
81 };
82 
83 #endif