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 =========================================================================*/
24 #ifndef vtkXMLFileReadTester_h
25 #define vtkXMLFileReadTester_h
26 
27 #include "vtkIOXMLModule.h" // For export macro
28 #include "vtkXMLParser.h"
29 
30 class VTKIOXML_EXPORT vtkXMLFileReadTester: public vtkXMLParser
31 {
32 public:
34  void PrintSelf(ostream& os, vtkIndent indent);
35  static vtkXMLFileReadTester* New();
36 
41  int TestReadFile();
42 
44 
47  vtkSetStringMacro(FileName);
48  vtkGetStringMacro(FileName);
50 
52 
56  vtkGetStringMacro(FileDataType);
58 
60 
64  vtkGetStringMacro(FileVersion);
66 
67 protected:
70 
71  void StartElement(const char* name, const char** atts);
72  int ParsingComplete();
73  void ReportStrayAttribute(const char*, const char*, const char*) {}
74  void ReportMissingAttribute(const char*, const char*) {}
75  void ReportBadAttribute(const char*, const char*, const char*) {}
76  void ReportUnknownElement(const char*) {}
78 
79  char* FileName;
80  char* FileDataType;
81  char* FileVersion;
82  int Done;
83 
84  vtkSetStringMacro(FileDataType);
85  vtkSetStringMacro(FileVersion);
86 
87 private:
88  vtkXMLFileReadTester(const vtkXMLFileReadTester&) VTK_DELETE_FUNCTION;
89  void operator=(const vtkXMLFileReadTester&) VTK_DELETE_FUNCTION;
90 };
91 
92 #endif
Parse XML to handle element tags and attributes.
Definition: vtkXMLParser.h:42
void ReportUnknownElement(const char *)
void ReportStrayAttribute(const char *, const char *, const char *)
virtual void StartElement(const char *name, const char **atts)
void ReportMissingAttribute(const char *, const char *)
Utility class for vtkXMLReader and subclasses.
a simple class to control print indentation
Definition: vtkIndent.h:39
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
void ReportBadAttribute(const char *, const char *, const char *)
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
virtual int ParsingComplete()
static vtkXMLParser * New()