VTK
vtkXMLHyperTreeGridWriter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkXMLHyperTreeGridWriter.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 =========================================================================*/
26 #ifndef vtkXMLHyperTreeGridWriter_h
27 #define vtkXMLHyperTreeGridWriter_h
28 
29 #include "vtkIOXMLModule.h" // For export macro
30 #include "vtkXMLWriter.h"
31 #include "vtkNew.h" // For ivar
32 
34 class vtkBitArray;
35 class vtkIdTypeArray;
36 class vtkHyperTreeGrid;
38 
39 class VTKIOXML_EXPORT vtkXMLHyperTreeGridWriter : public vtkXMLWriter
40 {
41 public:
43  void PrintSelf(ostream& os, vtkIndent indent) override;
45 
50 
54  const char* GetDefaultFileExtension() override;
55 
56 protected:
58  ~vtkXMLHyperTreeGridWriter() override;
59 
60  const char* GetDataSetName() override;
61 
62  // specify that we require HyperTreeGrid input
64 
65  // The most important method, make the XML file for my input.
66  int WriteData() override;
67 
68  // <HyperTreeGrid ...
69  int StartPrimaryElement(vtkIndent);
70 
71  // ... dim, size, origin>
72  void WritePrimaryElementAttributes(ostream &, vtkIndent) override;
73 
74  // Grid coordinates (if origin and scale are not specified)
75  int WriteGridCoordinates(vtkIndent);
76 
77  // Tree Structure
78  int WriteDescriptor(vtkIndent);
79 
80  // Writes PointData and CellData attribute data.
81  int WriteAttributeData(vtkIndent);
82 
83  // </HyperTreeGrid>
84  int FinishPrimaryElement(vtkIndent);
85 
86  // Helper to simplify writing appended array data
87  void WriteAppendedArrayDataHelper(vtkAbstractArray *array,
88  OffsetsManager &offsets);
89 
91 
94 
97 
99 
100 private:
102  void operator=(const vtkXMLHyperTreeGridWriter&) = delete;
103 };
104 
105 #endif
virtual const char * GetDataSetName()=0
vtkDataObject * GetInput()
Assign a data object as input.
Definition: vtkXMLWriter.h:235
Store vtkAlgorithm input/output information.
Abstract superclass for all arrays.
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
dynamic, self-adjusting array of vtkIdType
Helper class due to PIMPL excess.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual int WriteData()
Definition: vtkXMLWriter.h:360
Objects for depth-first traversal HyperTreeGrids.
Superclass for VTK&#39;s XML file writers.
Definition: vtkXMLWriter.h:62
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual void WritePrimaryElementAttributes(ostream &os, vtkIndent indent)
virtual const char * GetDefaultFileExtension()=0
Get the default file extension for files written by this writer.
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
OffsetsManagerGroup * AttributeDataOMG
dynamic, self-adjusting array of bits
Definition: vtkBitArray.h:36
static vtkAlgorithm * New()
Write VTK XML HyperTreeGrid files.