VTK  9.7.20260805
vtkXMLGenericDataObjectReader.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
18
19#ifndef vtkXMLGenericDataObjectReader_h
20#define vtkXMLGenericDataObjectReader_h
21
22#include "vtkIOXMLModule.h" // For export macro
23#include "vtkSmartPointer.h" // for API
24#include "vtkXMLDataReader.h"
25
26VTK_ABI_NAMESPACE_BEGIN
27class vtkImageData;
30class vtkPolyData;
35
36class VTKIOXML_EXPORT vtkXMLGenericDataObjectReader : public vtkXMLDataReader
37{
38public:
40 void PrintSelf(ostream& os, vtkIndent indent) override;
42
44
50
52
67
72
77
81 void SetupEmptyOutput() override;
82
87 virtual int ReadOutputType(const char* name, bool& parallel);
88
93 static vtkSmartPointer<vtkXMLReader> CreateReader(int data_object_type, bool parallel);
94
98 int CanReadFileWithDataType(const char* dsname) override;
99
100protected:
103
107 const char* GetDataSetName() override;
108
111 virtual int RequestUpdateExtent(vtkInformation* request, vtkInformationVector** inputVector,
112 vtkInformationVector* outputVector);
113
116
117 vtkXMLReader* Reader; // actual reader
118
119private:
121 void operator=(const vtkXMLGenericDataObjectReader&) = delete;
122
123 int ReadOutputType(std::istream* stream, bool& parallel);
124 int ReadOutputType(vtkXMLFileReadTester* tester, bool& parallel);
125
131 int GetTypeIdFromClassName(const std::string& dsname);
132};
133
134VTK_ABI_NAMESPACE_END
135#endif
general representation of visualization data
topologically and geometrically regular array of data
a simple class to control print indentation
Definition vtkIndent.h:29
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Composite dataset that organizes datasets into blocks.
a multi-resolution dataset based on vtkCartesianGrid allowing overlaps
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition vtkPolyData.h:72
a dataset that is topologically regular with variable spacing in the three coordinate directions
Hold a reference to a vtkObjectBase instance.
topologically regular array of data
dataset represents arbitrary combinations of all possible cell types
Utility class for vtkXMLReader and subclasses.
vtkDataObject * GetOutput(int idx)
Get the reader's output.
static vtkXMLGenericDataObjectReader * New()
virtual int RequestUpdateExtent(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
virtual int ReadOutputType(const char *name, bool &parallel)
This method can be used to find out the type of output expected without needing to read the whole fil...
vtkImageData * GetImageDataOutput()
Get the output as various concrete types.
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
vtkIdType GetNumberOfPoints() override
Overridden method.
static vtkSmartPointer< vtkXMLReader > CreateReader(int data_object_type, bool parallel)
Helper to create a reader based on the data object type.
void SetupEmptyOutput() override
Overridden method.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkMultiBlockDataSet * GetMultiBlockDataSetOutput()
Get the output as various concrete types.
vtkPolyData * GetPolyDataOutput()
Get the output as various concrete types.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
vtkStructuredGrid * GetStructuredGridOutput()
Get the output as various concrete types.
vtkIdType GetNumberOfCells() override
Overridden method.
int CanReadFileWithDataType(const char *dsname) override
Return 1 if provided dsname is supported, 0 otherwise.
~vtkXMLGenericDataObjectReader() override
int FillOutputPortInformation(int, vtkInformation *) override
Fill the output port information objects for this algorithm.
const char * GetDataSetName() override
Overridden method.
vtkOverlappingAMR * GetOverlappingAMROutput()
Get the output as various concrete types.
int RequestDataObject(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
vtkRectilinearGrid * GetRectilinearGridOutput()
Get the output as various concrete types.
vtkUnstructuredGrid * GetUnstructuredGridOutput()
Get the output as various concrete types.
vtkDataObject * GetOutput()
Get the reader's output.
int vtkIdType
Definition vtkType.h:363