VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkDataObjectWriter.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 =========================================================================*/ 00032 #ifndef __vtkDataObjectWriter_h 00033 #define __vtkDataObjectWriter_h 00034 00035 #include "vtkIOLegacyModule.h" // For export macro 00036 #include "vtkWriter.h" 00037 #include "vtkDataWriter.h" // Needs data because it calls methods on it 00038 #include "vtkStdString.h" // For string used in api 00039 00040 class VTKIOLEGACY_EXPORT vtkDataObjectWriter : public vtkWriter 00041 { 00042 public: 00043 static vtkDataObjectWriter *New(); 00044 vtkTypeMacro(vtkDataObjectWriter,vtkWriter); 00045 void PrintSelf(ostream& os, vtkIndent indent); 00046 00048 00049 void SetFileName(const char *filename) {this->Writer->SetFileName(filename);}; 00050 char *GetFileName() {return this->Writer->GetFileName();}; 00051 void SetHeader(const char *header) {this->Writer->SetHeader(header);}; 00052 char *GetHeader() {return this->Writer->GetHeader();}; 00053 void SetFileType(int type) {this->Writer->SetFileType(type);}; 00054 int GetFileType() {return this->Writer->GetFileType();}; 00055 void SetFileTypeToASCII() {this->Writer->SetFileType(VTK_ASCII);}; 00056 void SetFileTypeToBinary() {this->Writer->SetFileType(VTK_BINARY);}; 00057 void SetWriteToOutputString(int b) {this->Writer->SetWriteToOutputString(b);}; 00058 void WriteToOutputStringOn() {this->Writer->WriteToOutputStringOn();}; 00059 void WriteToOutputStringOff() {this->Writer->WriteToOutputStringOff();}; 00060 int GetWriteToOutputString() {return this->Writer->GetWriteToOutputString();}; 00061 char* GetOutputString() {return this->Writer->GetOutputString();}; 00062 vtkStdString GetOutputStdString() {return this->Writer->GetOutputStdString();}; 00063 int GetOutputStringLength() {return this->Writer->GetOutputStringLength();}; 00064 unsigned char* GetBinaryOutputString() {return this->Writer->GetBinaryOutputString();}; 00065 void SetFieldDataName(const char *fieldname) {this->Writer->SetFieldDataName(fieldname);}; 00066 char *GetFieldDataName() {return this->Writer->GetFieldDataName();}; 00068 00069 protected: 00070 vtkDataObjectWriter(); 00071 ~vtkDataObjectWriter(); 00072 00073 void WriteData(); 00074 vtkDataWriter *Writer; 00075 00076 virtual int FillInputPortInformation(int port, vtkInformation *info); 00077 00078 private: 00079 vtkDataObjectWriter(const vtkDataObjectWriter&); // Not implemented. 00080 void operator=(const vtkDataObjectWriter&); // Not implemented. 00081 }; 00082 00083 #endif