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

vtkXMLFileReadTester.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkXMLFileReadTester.h,v $
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 =========================================================================*/
00033 #ifndef __vtkXMLFileReadTester_h
00034 #define __vtkXMLFileReadTester_h
00035 
00036 #include "vtkXMLParser.h"
00037 
00038 class VTK_IO_EXPORT vtkXMLFileReadTester: public vtkXMLParser
00039 {
00040 public:
00041   vtkTypeRevisionMacro(vtkXMLFileReadTester,vtkXMLParser);
00042   void PrintSelf(ostream& os, vtkIndent indent);  
00043   static vtkXMLFileReadTester* New();
00044   
00047   int TestReadFile();
00048   
00050 
00051   vtkSetStringMacro(FileName);
00052   vtkGetStringMacro(FileName);
00054   
00056 
00058   vtkGetStringMacro(FileDataType);
00060   
00062 
00064   vtkGetStringMacro(FileVersion);
00066   
00067 protected:
00068   vtkXMLFileReadTester();
00069   ~vtkXMLFileReadTester();
00070   
00071   void StartElement(const char* name, const char** atts);
00072   int ParsingComplete();
00073   void ReportStrayAttribute(const char*, const char*, const char*) {}
00074   void ReportMissingAttribute(const char*, const char*) {}
00075   void ReportBadAttribute(const char*, const char*, const char*) {}
00076   void ReportUnknownElement(const char*) {}
00077   void ReportXmlParseError() {}
00078   
00079   char* FileName;
00080   char* FileDataType;
00081   char* FileVersion;
00082   int Done;
00083   
00084   vtkSetStringMacro(FileDataType);
00085   vtkSetStringMacro(FileVersion);
00086   
00087 private:
00088   vtkXMLFileReadTester(const vtkXMLFileReadTester&);  // Not implemented.
00089   void operator=(const vtkXMLFileReadTester&);  // Not implemented.
00090 };
00091 
00092 #endif