VTK
dox/Rendering/Core/vtkXMLMaterialParser.h
Go to the documentation of this file.
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 "vtkRenderingCoreModule.h" // For export macro
00080 #include "vtkXMLParser.h"
00081 
00082 class vtkXMLMaterial;
00083 class vtkXMLMaterialParserInternals;
00084 
00085 class VTKRENDERINGCORE_EXPORT vtkXMLMaterialParser : public vtkXMLParser
00086 {
00087 public:
00088   static vtkXMLMaterialParser *New();
00089   vtkTypeMacro(vtkXMLMaterialParser,vtkXMLParser);
00090   void PrintSelf(ostream& os, vtkIndent indent);
00091 
00093 
00094   vtkGetObjectMacro(Material, vtkXMLMaterial);
00095   void SetMaterial(vtkXMLMaterial*);
00097 
00099 
00101   virtual int Parse();
00102   virtual int Parse(const char* inputString);
00103   virtual int Parse(const char* inputString, unsigned int length);
00105 
00107 
00109   virtual int InitializeParser();
00110 protected:
00111   vtkXMLMaterialParser();
00112   ~vtkXMLMaterialParser();
00114 
00116   virtual void StartElement(const char* name, const char** atts);
00117 
00119   virtual void EndElement(const char*);
00120 
00122   virtual void CharacterDataHandler( const char* data, int length );
00123 
00124   vtkXMLMaterial* Material;
00125   vtkXMLMaterialParserInternals* Internals;
00126 
00127 private:
00128   vtkXMLMaterialParser(const vtkXMLMaterialParser&); // Not implemented
00129   void operator=(const vtkXMLMaterialParser&); // Not implemented
00130 };
00131 #endif