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
30class VTKIOXML_EXPORT vtkXMLFileReadTester: public vtkXMLParser
31{
32public:
34 void PrintSelf(ostream& os, vtkIndent indent);
36
42
44
47 vtkSetStringMacro(FileName);
50
52
56 vtkGetStringMacro(FileDataType);
58
60
64 vtkGetStringMacro(FileVersion);
66
67protected:
70
71 void StartElement(const char* name, const char** atts);
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;
82 int Done;
83
84 vtkSetStringMacro(FileDataType);
85 vtkSetStringMacro(FileVersion);
86
87private:
88 vtkXMLFileReadTester(const vtkXMLFileReadTester&) VTK_DELETE_FUNCTION;
89 void operator=(const vtkXMLFileReadTester&) VTK_DELETE_FUNCTION;
90};
91
92#endif
a simple class to control print indentation
Definition: vtkIndent.h:40
Utility class for vtkXMLReader and subclasses.
int TestReadFile()
Try to read the file given by FileName.
static vtkXMLFileReadTester * New()
void ReportMissingAttribute(const char *, const char *)
void StartElement(const char *name, const char **atts)
void ReportBadAttribute(const char *, const char *, const char *)
void ReportUnknownElement(const char *)
void ReportStrayAttribute(const char *, const char *, const char *)
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
Parse XML to handle element tags and attributes.
Definition: vtkXMLParser.h:43
@ name
Definition: vtkX3D.h:219
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.