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

# 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 =========================================================================*/
    00037 #ifndef __vtkXMLFileReadTester_h
    00038 #define __vtkXMLFileReadTester_h
    00039
    00040 #include "vtkXMLParser.h"
    00041
    00042 class VTK_IO_EXPORT vtkXMLFileReadTester: public vtkXMLParser
    00043 {
    00044 public:
    00045   vtkTypeRevisionMacro(vtkXMLFileReadTester,vtkXMLParser);
    00046   void PrintSelf(ostream& os, vtkIndent indent);
    00047   static vtkXMLFileReadTester* New();
    00048
    00051   int TestReadFile();
    00052
    00054
    00055   vtkSetStringMacro(FileName);
    00056   vtkGetStringMacro(FileName);
    00058
    00060
    00062   vtkGetStringMacro(FileDataType);
    00064
    00066
    00068   vtkGetStringMacro(FileVersion);
    00070
    00071 protected:
    00072   vtkXMLFileReadTester();
    00073   ~vtkXMLFileReadTester();
    00074
    00075   void StartElement(const char* name, const char** atts);
    00076   int ParsingComplete();
    00077   void ReportStrayAttribute(const char*, const char*, const char*) {}
    00078   void ReportMissingAttribute(const char*, const char*) {}
    00079   void ReportBadAttribute(const char*, const char*, const char*) {}
    00080   void ReportUnknownElement(const char*) {}
    00081   void ReportXmlParseError() {}
    00082
    00083   char* FileName;
    00084   char* FileDataType;
    00085   char* FileVersion;
    00086   int Done;
    00087
    00088   vtkSetStringMacro(FileDataType);
    00089   vtkSetStringMacro(FileVersion);
    00090
    00091 private:
    00092   vtkXMLFileReadTester(const vtkXMLFileReadTester&);  // Not implemented.
    00093   void operator=(const vtkXMLFileReadTester&);  // Not implemented.
    00094 };
    00095
    00096 #endif