VTK  9.1.0
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
30class VTKIOXML_EXPORT vtkXMLFileReadTester : public vtkXMLParser
31{
32public:
34 void PrintSelf(ostream& os, vtkIndent indent) override;
36
42
44
48 vtkGetStringMacro(FileDataType);
50
52
56 vtkGetStringMacro(FileVersion);
58
59protected:
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
73 int Done;
74
75 vtkSetStringMacro(FileDataType);
76 vtkSetStringMacro(FileVersion);
77
78private:
80 void operator=(const vtkXMLFileReadTester&) = delete;
81};
82
83#endif
a simple class to control print indentation
Definition: vtkIndent.h:113
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.
Definition: vtkXMLParser.h:40
@ name
Definition: vtkX3D.h:225