VTK
vtkXMLCompositeDataReader.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: ParaView
4 Module: vtkXMLCompositeDataReader.h
5
6 Copyright (c) Kitware, Inc.
7 All rights reserved.
8 See Copyright.txt or http://www.paraview.org/HTML/Copyright.html 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=========================================================================*/
29#ifndef vtkXMLCompositeDataReader_h
30#define vtkXMLCompositeDataReader_h
31
32#include "vtkIOXMLModule.h" // For export macro
33#include "vtkXMLReader.h"
34
38
39struct vtkXMLCompositeDataReaderInternals;
40
41class VTKIOXML_EXPORT vtkXMLCompositeDataReader : public vtkXMLReader
42{
43public:
45 void PrintSelf(ostream& os, vtkIndent indent);
46
48
54
55protected:
58
59 // Get the name of the data set being read.
60 virtual const char* GetDataSetName();
61
62 // Returns the primary element pass to ReadPrimaryElement().
64
65 virtual void ReadXMLData();
66 virtual int ReadPrimaryElement(vtkXMLDataElement* ePrimary);
67
68 // Setup the output with no data available. Used in error cases.
69 virtual void SetupEmptyOutput();
70
72
73 // Create a default executive.
75
77
81
82
83
84 // Adds a child data object to the composite parent. childXML is the XML for
85 // the child data object need to obtain certain meta-data about the child.
87 vtkDataObject* child, vtkXMLDataElement* childXML);
88
89 // Read the XML element for the subtree of a the composite dataset.
90 // dataSetIndex is used to rank the leaf nodes in an inorder traversal.
91 virtual void ReadComposite(vtkXMLDataElement* element,
92 vtkCompositeDataSet* composite, const char* filePath,
93 unsigned int &dataSetIndex)=0;
94
95 // Read the vtkDataSet (a leaf) in the composite dataset.
96 virtual vtkDataSet* ReadDataset(vtkXMLDataElement* xmlElem, const char* filePath);
97
98 // Counts "DataSet" elements in the subtree.
99 unsigned int CountLeaves(vtkXMLDataElement* elem);
100
105 int ShouldReadDataSet(unsigned int datasetIndex);
106
107private:
108 vtkXMLCompositeDataReader(const vtkXMLCompositeDataReader&) VTK_DELETE_FUNCTION;
109 void operator=(const vtkXMLCompositeDataReader&) VTK_DELETE_FUNCTION;
110
111 vtkXMLCompositeDataReaderInternals* Internal;
112};
113
114#endif
abstract superclass for composite (multi-block or AMR) datasets
general representation of visualization data
Definition: vtkDataObject.h:65
abstract class to specify dataset behavior
Definition: vtkDataSet.h:63
Superclass for all pipeline executives in VTK.
Definition: vtkExecutive.h:50
a simple class to control print indentation
Definition: vtkIndent.h:40
Key for integer values in vtkInformation.
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Reader for multi-group datasets.
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkXMLDataElement * GetPrimaryElement()
vtkCompositeDataSet * GetOutput(int)
void AddChild(vtkCompositeDataSet *parent, vtkDataObject *child, vtkXMLDataElement *childXML)
vtkCompositeDataSet * GetOutput()
Get the output data object for a port on this algorithm.
virtual int ReadPrimaryElement(vtkXMLDataElement *ePrimary)
virtual void ReadComposite(vtkXMLDataElement *element, vtkCompositeDataSet *composite, const char *filePath, unsigned int &dataSetIndex)=0
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
virtual vtkExecutive * CreateDefaultExecutive()
Create a default executive.
virtual void SetupEmptyOutput()
virtual vtkDataSet * ReadDataset(vtkXMLDataElement *xmlElem, const char *filePath)
unsigned int CountLeaves(vtkXMLDataElement *elem)
vtkXMLReader * GetReaderOfType(const char *type)
virtual int FillOutputPortInformation(int, vtkInformation *info)
Fill the output port information objects for this algorithm.
virtual void ReadXMLData()
virtual const char * GetDataSetName()
int ShouldReadDataSet(unsigned int datasetIndex)
Given the inorder index for a leaf node, this method tells if the current process should read the dat...
Represents an XML element and those nested inside.
Superclass for VTK's XML format readers.
Definition: vtkXMLReader.h:44
@ info
Definition: vtkX3D.h:376
@ type
Definition: vtkX3D.h:516