VTK
dox/IO/XML/vtkXMLFileReadTester.h
Go to the documentation of this file.
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 "vtkIOXMLModule.h" // For export macro
00027 #include "vtkXMLParser.h"
00028 
00029 class VTKIOXML_EXPORT vtkXMLFileReadTester: public vtkXMLParser
00030 {
00031 public:
00032   vtkTypeMacro(vtkXMLFileReadTester,vtkXMLParser);
00033   void PrintSelf(ostream& os, vtkIndent indent);
00034   static vtkXMLFileReadTester* New();
00035 
00038   int TestReadFile();
00039 
00041 
00042   vtkSetStringMacro(FileName);
00043   vtkGetStringMacro(FileName);
00045 
00047 
00049   vtkGetStringMacro(FileDataType);
00051 
00053 
00055   vtkGetStringMacro(FileVersion);
00057 
00058 protected:
00059   vtkXMLFileReadTester();
00060   ~vtkXMLFileReadTester();
00061 
00062   void StartElement(const char* name, const char** atts);
00063   int ParsingComplete();
00064   void ReportStrayAttribute(const char*, const char*, const char*) {}
00065   void ReportMissingAttribute(const char*, const char*) {}
00066   void ReportBadAttribute(const char*, const char*, const char*) {}
00067   void ReportUnknownElement(const char*) {}
00068   void ReportXmlParseError() {}
00069 
00070   char* FileName;
00071   char* FileDataType;
00072   char* FileVersion;
00073   int Done;
00074 
00075   vtkSetStringMacro(FileDataType);
00076   vtkSetStringMacro(FileVersion);
00077 
00078 private:
00079   vtkXMLFileReadTester(const vtkXMLFileReadTester&);  // Not implemented.
00080   void operator=(const vtkXMLFileReadTester&);  // Not implemented.
00081 };
00082 
00083 #endif