00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkXMLFileReadTester.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00023 #ifndef __vtkXMLFileReadTester_h 00024 #define __vtkXMLFileReadTester_h 00025 00026 #include "vtkXMLParser.h" 00027 00028 class VTK_IO_EXPORT vtkXMLFileReadTester: public vtkXMLParser 00029 { 00030 public: 00031 vtkTypeMacro(vtkXMLFileReadTester,vtkXMLParser); 00032 void PrintSelf(ostream& os, vtkIndent indent); 00033 static vtkXMLFileReadTester* New(); 00034 00037 int TestReadFile(); 00038 00040 00041 vtkSetStringMacro(FileName); 00042 vtkGetStringMacro(FileName); 00044 00046 00048 vtkGetStringMacro(FileDataType); 00050 00052 00054 vtkGetStringMacro(FileVersion); 00056 00057 protected: 00058 vtkXMLFileReadTester(); 00059 ~vtkXMLFileReadTester(); 00060 00061 void StartElement(const char* name, const char** atts); 00062 int ParsingComplete(); 00063 void ReportStrayAttribute(const char*, const char*, const char*) {} 00064 void ReportMissingAttribute(const char*, const char*) {} 00065 void ReportBadAttribute(const char*, const char*, const char*) {} 00066 void ReportUnknownElement(const char*) {} 00067 void ReportXmlParseError() {} 00068 00069 char* FileName; 00070 char* FileDataType; 00071 char* FileVersion; 00072 int Done; 00073 00074 vtkSetStringMacro(FileDataType); 00075 vtkSetStringMacro(FileVersion); 00076 00077 private: 00078 vtkXMLFileReadTester(const vtkXMLFileReadTester&); // Not implemented. 00079 void operator=(const vtkXMLFileReadTester&); // Not implemented. 00080 }; 00081 00082 #endif