VTK  9.4.20241219
vtkArrayReader.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-FileCopyrightText: Copyright 2008 Sandia Corporation
3// SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
4
25#ifndef vtkArrayReader_h
26#define vtkArrayReader_h
27
29#include "vtkIOCoreModule.h" // For export macro
30#include "vtkStdString.h" // For vtkStdString
31
32VTK_ABI_NAMESPACE_BEGIN
33class vtkArray;
34
35class VTKIOCORE_EXPORT vtkArrayReader : public vtkArrayDataAlgorithm
36{
37public:
40 void PrintSelf(ostream& os, vtkIndent indent) override;
41
43
49
51
55 virtual void SetInputString(const vtkStdString& string);
58
60
63 vtkSetMacro(ReadFromInputString, bool);
64 vtkGetMacro(ReadFromInputString, bool);
65 vtkBooleanMacro(ReadFromInputString, bool);
67
73 static vtkArray* Read(istream& stream);
74
78 static vtkArray* Read(const vtkStdString& str);
79
80protected:
82 ~vtkArrayReader() override;
83
85
86 char* FileName;
89
90private:
91 vtkArrayReader(const vtkArrayReader&) = delete;
92 void operator=(const vtkArrayReader&) = delete;
93};
94
95VTK_ABI_NAMESPACE_END
96#endif
Superclass for algorithms that produce vtkArrayDatas as output.
Reads sparse and dense vtkArray data written by vtkArrayWriter.
virtual vtkStdString GetInputString()
The input string to parse.
static vtkArrayReader * New()
vtkSetFilePathMacro(FileName)
Set the filesystem location from which data will be read.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
static vtkArray * Read(istream &stream)
Read an arbitrary array from a stream.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void SetInputString(const vtkStdString &string)
The input string to parse.
~vtkArrayReader() override
static vtkArray * Read(const vtkStdString &str)
Read an arbitrary array from a string.
vtkStdString InputString
vtkGetFilePathMacro(FileName)
Set the filesystem location from which data will be read.
Abstract interface for N-dimensional arrays.
Definition vtkArray.h:52
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Wrapper around std::string to keep symbols short.