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) override;
35  static vtkXMLFileReadTester* New();
36 
41  int TestReadFile();
42 
44 
48  vtkGetStringMacro(FileDataType);
50 
52 
56  vtkGetStringMacro(FileVersion);
58 
59 protected:
61  ~vtkXMLFileReadTester() override;
62 
63  void StartElement(const char* name, const char** atts) override;
64  int ParsingComplete() override;
65  void ReportStrayAttribute(const char*, const char*, const char*) override {}
66  void ReportMissingAttribute(const char*, const char*) override {}
67  void ReportBadAttribute(const char*, const char*, const char*) override {}
68  void ReportUnknownElement(const char*) override {}
69  void ReportXmlParseError() override {}
70 
71  char* FileDataType;
72  char* FileVersion;
73  int Done;
74 
75  vtkSetStringMacro(FileDataType);
76  vtkSetStringMacro(FileVersion);
77 
78 private:
80  void operator=(const vtkXMLFileReadTester&) = delete;
81 };
82 
83 #endif
void ReportMissingAttribute(const char *, const char *) override
Parse XML to handle element tags and attributes.
Definition: vtkXMLParser.h:42
virtual void StartElement(const char *name, const char **atts)
void ReportStrayAttribute(const char *, const char *, const char *) override
void ReportUnknownElement(const char *) override
void ReportBadAttribute(const char *, const char *, const char *) override
Utility class for vtkXMLReader and subclasses.
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual int ParsingComplete()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void ReportXmlParseError() override
static vtkXMLParser * New()