1 /*========================================================================= 2 3 Program: Visualization Toolkit 4 Module: vtkXMLPRectilinearGridWriter.h 5 6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 7 All rights reserved. 8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 9 10 This software is distributed WITHOUT ANY WARRANTY; without even 11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 12 PURPOSE. See the above copyright notice for more information. 13 14 =========================================================================*/ 15 /** 16 * @class vtkXMLPRectilinearGridWriter 17 * @brief Write PVTK XML RectilinearGrid files. 18 * 19 * vtkXMLPRectilinearGridWriter writes the PVTK XML RectilinearGrid 20 * file format. One rectilinear grid input can be written into a 21 * parallel file format with any number of pieces spread across files. 22 * The standard extension for this writer's file format is "pvtr". 23 * This writer uses vtkXMLRectilinearGridWriter to write the 24 * individual piece files. 25 * 26 * @sa 27 * vtkXMLRectilinearGridWriter 28 */ 29 30 #ifndef vtkXMLPRectilinearGridWriter_h 31 #define vtkXMLPRectilinearGridWriter_h 32 33 #include "vtkIOParallelXMLModule.h" // For export macro 34 #include "vtkXMLPStructuredDataWriter.h" 35 36 class vtkRectilinearGrid; 37 38 class VTKIOPARALLELXML_EXPORT vtkXMLPRectilinearGridWriter : public vtkXMLPStructuredDataWriter 39 { 40 public: 41 static vtkXMLPRectilinearGridWriter* New(); 42 vtkTypeMacro(vtkXMLPRectilinearGridWriter,vtkXMLPStructuredDataWriter); 43 void PrintSelf(ostream& os, vtkIndent indent) override; 44 45 /** 46 * Get/Set the writer's input. 47 */ 48 vtkRectilinearGrid* GetInput(); 49 50 /** 51 * Get the default file extension for files written by this writer. 52 */ 53 const char* GetDefaultFileExtension() override; 54 55 protected: 56 vtkXMLPRectilinearGridWriter(); 57 ~vtkXMLPRectilinearGridWriter() override; 58 59 // see algorithm for more info 60 int FillInputPortInformation(int port, vtkInformation* info) override; 61 62 const char* GetDataSetName() override; 63 vtkXMLStructuredDataWriter* CreateStructuredPieceWriter() override; 64 void WritePData(vtkIndent indent) override; 65 66 private: 67 vtkXMLPRectilinearGridWriter(const vtkXMLPRectilinearGridWriter&) = delete; 68 void operator=(const vtkXMLPRectilinearGridWriter&) = delete; 69 }; 70 71 #endif 72