VTK  9.3.20240424
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
18VTK_ABI_NAMESPACE_BEGIN
19class VTKIOXML_EXPORT vtkXMLFileReadTester : public vtkXMLParser
20{
21public:
23 void PrintSelf(ostream& os, vtkIndent indent) override;
25
31
33
37 vtkGetStringMacro(FileDataType);
39
41
45 vtkGetStringMacro(FileVersion);
47
48protected:
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
62 int Done;
63
64 vtkSetStringMacro(FileDataType);
65 vtkSetStringMacro(FileVersion);
66
67private:
69 void operator=(const vtkXMLFileReadTester&) = delete;
70};
71
72VTK_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.
static vtkXMLFileReadTester * New()
void ReportXmlParseError() override
void ReportStrayAttribute(const char *, const char *, const char *) override
void ReportUnknownElement(const char *) override
int ParsingComplete() override
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.