/*========================================================================= Program: Visualization Toolkit Module: $RCSfile: vtkXMLWriter.cxx,v $ Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen All rights reserved. See Copyright.txt or http://www.kitware.com/Copyright.htm for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "vtkDataManagerWriter.h" #include #include #include #include #include #include "vtkStreamingDemandDrivenPipeline.h" //---------------------------------------------------------------------------- vtkStandardNewMacro( vtkDataManagerWriter ); vtkCxxRevisionMacro(vtkDataManagerWriter, "$Revision: 1.0 $"); //---------------------------------------------------------------------------- vtkDataManagerWriter::vtkDataManagerWriter() { } //---------------------------------------------------------------------------- vtkDataManagerWriter::~vtkDataManagerWriter() { } //---------------------------------------------------------------------------- void vtkDataManagerWriter::SetDataManager(vtkDataManager* input) { } //---------------------------------------------------------------------------- vtkDataManager* vtkDataManagerWriter::GetDataManager() { return NULL; } //---------------------------------------------------------------------------- int vtkDataManagerWriter::ProcessRequest(vtkInformation* request, vtkInformationVector** inputVector, vtkInformationVector* outputVector) { // generate the data if(request->Has(vtkDemandDrivenPipeline::REQUEST_DATA())) { if (!this->OpenFile()) { return 0; } // Write the file. if (!this->StartFile()) { return 0; } // if (!this->WriteHeader()) // { // return 0; // } std::cout<<"actually writing..."<WriteScalarAttribute("UselessIsThisAttribute", 12); ostream& os = *(this->Stream); os << endl; std::cout<<"ended"<WriteFooter()) // { // return 0; // } if (!this->EndFile()) { return 0; } this->CloseFile(); } // We have finished writing. this->UpdateProgress(1); //return this->Superclass::ProcessRequest(request, inputVector, outputVector); return 1; } //---------------------------------------------------------------------------- int vtkDataManagerWriter::FillInputPortInformation( int vtkNotUsed(port), vtkInformation* info) { info->Set(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkObject"); return 1; }