VTK
dox/IO/XML/vtkXMLUnstructuredGridWriter.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkXMLUnstructuredGridWriter.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 __vtkXMLUnstructuredGridWriter_h
00033 #define __vtkXMLUnstructuredGridWriter_h
00034 
00035 #include "vtkIOXMLModule.h" // For export macro
00036 #include "vtkXMLUnstructuredDataWriter.h"
00037 
00038 
00039 class vtkUnstructuredGrid;
00040 
00041 class VTKIOXML_EXPORT vtkXMLUnstructuredGridWriter : public vtkXMLUnstructuredDataWriter
00042 {
00043 public:
00044   vtkTypeMacro(vtkXMLUnstructuredGridWriter,vtkXMLUnstructuredDataWriter);
00045   void PrintSelf(ostream& os, vtkIndent indent);
00046   static vtkXMLUnstructuredGridWriter* New();
00047 
00048   //BTX
00050 
00051   vtkUnstructuredGrid* GetInput();
00052   //ETX
00054 
00056   const char* GetDefaultFileExtension();
00057 
00058 protected:
00059   vtkXMLUnstructuredGridWriter();
00060   ~vtkXMLUnstructuredGridWriter();
00061 
00062   // see algorithm for more info
00063   virtual int FillInputPortInformation(int port, vtkInformation* info);
00064 
00065   virtual void AllocatePositionArrays();
00066   virtual void DeletePositionArrays();
00067 
00068   const char* GetDataSetName();
00069 
00070   void WriteInlinePieceAttributes();
00071   void WriteInlinePiece(vtkIndent indent);
00072 
00073   void WriteAppendedPieceAttributes(int index);
00074   void WriteAppendedPiece(int index, vtkIndent indent);
00075   void WriteAppendedPieceData(int index);
00076 
00077   virtual vtkIdType GetNumberOfInputCells();
00078   void CalculateSuperclassFraction(float* fractions);
00079 
00080   // Positions of attributes for each piece.
00081   vtkTypeInt64* NumberOfCellsPositions;
00082   OffsetsManagerArray *CellsOM; //one per piece
00083 
00084 private:
00085   vtkXMLUnstructuredGridWriter(const vtkXMLUnstructuredGridWriter&);  // Not implemented.
00086   void operator=(const vtkXMLUnstructuredGridWriter&);  // Not implemented.
00087 };
00088 
00089 #endif