Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

vtkPaletteColorBaseParser.h

Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- 00002 * 00003 * $Id: vtkPaletteColorBaseParser.h,v 1.1 2004/06/02 11:35:08 xpxqx Exp $ 00004 * 00005 * Copyright (c) 2004 Sean McInerney 00006 * All rights reserved. 00007 * 00008 * See Copyright.txt or http://vtkextensions.sourceforge.net/Copyright.html 00009 * 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 */ 00016 #ifndef VTK_PALETTE_COLOR_BASE_PARSER_H_ 00017 # define VTK_PALETTE_COLOR_BASE_PARSER_H_ 00018 # include "vtkAbstractPaletteColorParser.h" 00019 00020 VTK_EXTENSIONS_PALETTE_NAMESPACE_BEGIN 00021 00022 class vtkPaletteColorBase; 00023 00034 class VTK_EXTENSIONS_PALETTE_EXPORT vtkPaletteColorBaseParser 00035 : public vtkAbstractPaletteColorParser 00036 { 00037 public: 00038 vtkTypeRevisionMacro ( vtkPaletteColorBaseParser, 00039 vtkAbstractPaletteColorParser ); 00040 void PrintSelf (ostream&, vtkIndent); 00041 00043 virtual void SetElement (vtkPaletteColorBase* element); 00044 00045 //BTX 00047 void CharacterData (const XML_Char* data, 00048 int length); 00049 //ETX 00050 00056 vtkNestingExpatBase* ReturnToParent (void); 00057 00058 protected: 00059 vtkPaletteColorBaseParser (void); 00060 ~vtkPaletteColorBaseParser(); 00061 00062 //BTX 00064 vtkPaletteColorBaseParser (vtkPaletteElementParser* parent); 00065 00067 void SetupHandlers (void); 00068 00069 void ResetBuffer (void); 00070 void ClearBuffer (void); 00071 00072 vtkIdType BufferSize; 00073 vtkIdType DataSize; 00074 XML_Char* Buffer; 00075 //ETX 00076 00077 private: 00078 void SetElement (vtkAbstractPaletteColor* a) 00079 { return this->Superclass::SetElement(a); } 00080 00081 private: 00088 vtkPaletteColorBaseParser (const vtkPaletteColorBaseParser&); 00089 void operator= (const vtkPaletteColorBaseParser&); 00091 }; 00092 00093 // ---------------------------------------------------------------------------- 00094 inline void 00095 vtkPaletteColorBaseParser::ResetBuffer (void) 00096 { 00097 vtkDebugMacro(<< "ResetBuffer()"); 00098 00099 if (this->Buffer != (XML_Char *) 0) 00100 { 00101 this->Buffer[0] = XML_Char(0); 00102 } 00103 this->DataSize = 0; 00104 } 00105 00106 inline void 00107 vtkPaletteColorBaseParser::ClearBuffer (void) 00108 { 00109 vtkDebugMacro(<< "ClearBuffer()"); 00110 00111 if (this->Buffer != (XML_Char *) 0) 00112 { 00113 delete [] this->Buffer; 00114 this->Buffer = NULL; 00115 } 00116 this->BufferSize = 0; 00117 this->DataSize = 0; 00118 } 00119 00120 VTK_EXTENSIONS_PALETTE_NAMESPACE_END 00121 00122 #endif /* VTK_PALETTE_COLOR_BASE_PARSER_H_ */ 00123 /* 00124 * End of: $Id: vtkPaletteColorBaseParser.h,v 1.1 2004/06/02 11:35:08 xpxqx Exp $. 00125 * 00126 */

Generated on Tue Aug 10 03:38:10 2004 for vtkExtensions by doxygen 1.3.7