Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

dox/IO/vtkXMLFileReadTester.h

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