00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkWriter.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 =========================================================================*/ 00038 #ifndef __vtkWriter_h 00039 #define __vtkWriter_h 00040 00041 #include "vtkAlgorithm.h" 00042 00043 class vtkDataObject; 00044 00045 #define VTK_ASCII 1 00046 #define VTK_BINARY 2 00047 00048 class VTK_IO_EXPORT vtkWriter : public vtkAlgorithm 00049 { 00050 public: 00051 vtkTypeRevisionMacro(vtkWriter,vtkAlgorithm); 00052 void PrintSelf(ostream& os, vtkIndent indent); 00053 00057 virtual int Write(); 00058 00061 void EncodeArrayName(char* resname, const char* name); 00062 00064 00065 void SetInput(vtkDataObject *input); 00066 void SetInput(int index, vtkDataObject *input); 00068 //BTX 00069 vtkDataObject *GetInput(); 00070 vtkDataObject *GetInput(int port); 00071 //ETX 00072 00073 protected: 00074 vtkWriter(); 00075 ~vtkWriter(); 00076 00077 virtual int ProcessRequest(vtkInformation *request, 00078 vtkInformationVector **inputVector, 00079 vtkInformationVector *outputVector); 00080 virtual int RequestData(vtkInformation *request, 00081 vtkInformationVector **inputVector, 00082 vtkInformationVector *outputVector); 00083 00084 virtual void WriteData() = 0; //internal method subclasses must respond to 00085 vtkTimeStamp WriteTime; 00086 private: 00087 vtkWriter(const vtkWriter&); // Not implemented. 00088 void operator=(const vtkWriter&); // Not implemented. 00089 }; 00090 00091 #endif