VTK  9.3.20240328
vtkXMLFileReadTester.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
12 #ifndef vtkXMLFileReadTester_h
13 #define vtkXMLFileReadTester_h
14 
15 #include "vtkIOXMLModule.h" // For export macro
16 #include "vtkXMLParser.h"
17 
18 VTK_ABI_NAMESPACE_BEGIN
19 class VTKIOXML_EXPORT vtkXMLFileReadTester : public vtkXMLParser
20 {
21 public:
23  void PrintSelf(ostream& os, vtkIndent indent) override;
25 
30  int TestReadFile();
31 
33 
37  vtkGetStringMacro(FileDataType);
39 
41 
45  vtkGetStringMacro(FileVersion);
47 
48 protected:
51 
52  void StartElement(const char* name, const char** atts) override;
53  int ParsingComplete() override;
54  void ReportStrayAttribute(const char*, const char*, const char*) override {}
55  void ReportMissingAttribute(const char*, const char*) override {}
56  void ReportBadAttribute(const char*, const char*, const char*) override {}
57  void ReportUnknownElement(const char*) override {}
58  void ReportXmlParseError() override {}
59 
60  char* FileDataType;
61  char* FileVersion;
62  int Done;
63 
64  vtkSetStringMacro(FileDataType);
65  vtkSetStringMacro(FileVersion);
66 
67 private:
69  void operator=(const vtkXMLFileReadTester&) = delete;
70 };
71 
72 VTK_ABI_NAMESPACE_END
73 #endif
a simple class to control print indentation
Definition: vtkIndent.h:108
Utility class for vtkXMLReader and subclasses.
int TestReadFile()
Try to read the file given by FileName.
void ReportXmlParseError() override
void ReportStrayAttribute(const char *, const char *, const char *) override
void ReportUnknownElement(const char *) override
int ParsingComplete() override
static vtkXMLFileReadTester * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkXMLFileReadTester() override
void ReportBadAttribute(const char *, const char *, const char *) override
void StartElement(const char *name, const char **atts) override
void ReportMissingAttribute(const char *, const char *) override
Parse XML to handle element tags and attributes.
Definition: vtkXMLParser.h:29
@ name
Definition: vtkX3D.h:219