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 =========================================================================*/
23 #ifndef vtkXMLHyperTreeGridWriter_h
24 #define vtkXMLHyperTreeGridWriter_h
25 
26 #include "vtkIOXMLModule.h" // For export macro
27 #include "vtkXMLWriter.h"
28 #include "vtkNew.h" // For ivar
29 
31 class vtkBitArray;
32 class vtkIdTypeArray;
33 class vtkHyperTreeGrid;
35 
36 class VTKIOXML_EXPORT vtkXMLHyperTreeGridWriter : public vtkXMLWriter
37 {
38 public:
40  void PrintSelf(ostream& os, vtkIndent indent) override;
42 
47 
51  const char* GetDefaultFileExtension() override;
52 
53 protected:
55  ~vtkXMLHyperTreeGridWriter() override;
56 
57  const char* GetDataSetName() override;
58 
59  // specify that we require HyperTreeGrid input
61 
62  // The most important method, make the XML file for my input.
63  int WriteData() override;
64 
65  // <HyperTreeGrid ...
66  int StartPrimaryElement(vtkIndent);
67 
68  // ... dim, size, origin>
69  void WritePrimaryElementAttributes(ostream &, vtkIndent) override;
70 
71  // Grid coordinates (if origin and scale are not specified)
72  int WriteGridCoordinates(vtkIndent);
73 
74  // Tree Structure
75  int WriteDescriptor(vtkIndent);
76 
77  // Writes PointData and CellData attribute data.
78  int WriteAttributeData(vtkIndent);
79 
80  // </HyperTreeGrid>
81  int FinishPrimaryElement(vtkIndent);
82 
83  // Helper to simplify writing appended array data
84  void WriteAppendedArrayDataHelper(vtkAbstractArray *array,
85  OffsetsManager &offsets);
86 
88 
91 
94 
96 
97 private:
99  void operator=(const vtkXMLHyperTreeGridWriter&) = delete;
100 };
101 
102 #endif
virtual const char * GetDataSetName()=0
vtkDataObject * GetInput()
Assign a data object as input.
Definition: vtkXMLWriter.h:232
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:357
Objects for depth-first traversal HyperTreeGrids.
Superclass for VTK's XML file writers.
Definition: vtkXMLWriter.h:59
a simple class to control print indentation
Definition: vtkIndent.h:33
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:33
static vtkAlgorithm * New()
Write VTK XML HyperTreeGrid files.