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 =========================================================================*/
23 #ifndef __vtkXMLFileReadTester_h
24 #define __vtkXMLFileReadTester_h
25 
26 #include "vtkXMLParser.h"
27 
29 {
30 public:
32  void PrintSelf(ostream& os, vtkIndent indent);
33  static vtkXMLFileReadTester* New();
34 
37  int TestReadFile();
38 
40 
41  vtkSetStringMacro(FileName);
42  vtkGetStringMacro(FileName);
44 
46 
48  vtkGetStringMacro(FileDataType);
50 
52 
54  vtkGetStringMacro(FileVersion);
56 
57 protected:
60 
61  void StartElement(const char* name, const char** atts);
62  int ParsingComplete();
63  void ReportStrayAttribute(const char*, const char*, const char*) {}
64  void ReportMissingAttribute(const char*, const char*) {}
65  void ReportBadAttribute(const char*, const char*, const char*) {}
66  void ReportUnknownElement(const char*) {}
68 
69  char* FileName;
70  char* FileDataType;
71  char* FileVersion;
72  int Done;
73 
74  vtkSetStringMacro(FileDataType);
75  vtkSetStringMacro(FileVersion);
76 
77 private:
78  vtkXMLFileReadTester(const vtkXMLFileReadTester&); // Not implemented.
79  void operator=(const vtkXMLFileReadTester&); // Not implemented.
80 };
81 
82 #endif
Parse XML to handle element tags and attributes.
Definition: vtkXMLParser.h:40
void ReportUnknownElement(const char *)
void ReportStrayAttribute(const char *, const char *, const char *)
virtual void StartElement(const char *name, const char **atts)
void ReportMissingAttribute(const char *, const char *)
Utility class for vtkXMLReader and subclasses.
a simple class to control print indentation
Definition: vtkIndent.h:37
void PrintSelf(ostream &os, vtkIndent indent)
void ReportBadAttribute(const char *, const char *, const char *)
virtual int ParsingComplete()
#define VTK_IO_EXPORT
static vtkXMLParser * New()