00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkXMLMaterialParser.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 =========================================================================*/ 00015 00016 /* 00017 * Copyright 2004 Sandia Corporation. 00018 * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive 00019 * license for use of this work by or on behalf of the 00020 * U.S. Government. Redistribution and use in source and binary forms, with 00021 * or without modification, are permitted provided that this Notice and any 00022 * statement of authorship are reproduced on all copies. 00023 */ 00024 00076 #ifndef __vtkXMLMaterialParser_h 00077 #define __vtkXMLMaterialParser_h 00078 00079 #include "vtkXMLParser.h" 00080 00081 class vtkXMLMaterial; 00082 class vtkXMLMaterialParserInternals; 00083 00084 class VTK_IO_EXPORT vtkXMLMaterialParser : public vtkXMLParser 00085 { 00086 public: 00087 static vtkXMLMaterialParser *New(); 00088 vtkTypeMacro(vtkXMLMaterialParser,vtkXMLParser); 00089 void PrintSelf(ostream& os, vtkIndent indent); 00090 00092 00093 vtkGetObjectMacro(Material, vtkXMLMaterial); 00094 void SetMaterial(vtkXMLMaterial*); 00096 00098 00100 virtual int Parse(); 00101 virtual int Parse(const char* inputString); 00102 virtual int Parse(const char* inputString, unsigned int length); 00104 00107 virtual int InitializeParser(); 00108 protected: 00109 vtkXMLMaterialParser(); 00110 ~vtkXMLMaterialParser(); 00111 00113 virtual void StartElement(const char* name, const char** atts); 00114 00116 virtual void EndElement(const char*); 00117 00119 virtual void CharacterDataHandler( const char* data, int length ); 00120 00121 vtkXMLMaterial* Material; 00122 vtkXMLMaterialParserInternals* Internals; 00123 00124 private: 00125 vtkXMLMaterialParser(const vtkXMLMaterialParser&); // Not implemented 00126 void operator=(const vtkXMLMaterialParser&); // Not implemented 00127 }; 00128 #endif