VTK  9.3.0
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 
28 #include "vtkArrayDataAlgorithm.h"
29 #include "vtkIOCoreModule.h" // For export macro
30 #include "vtkStdString.h" // For vtkStdString
31 
32 VTK_ABI_NAMESPACE_BEGIN
33 class vtkArray;
34 
35 class VTKIOCORE_EXPORT vtkArrayReader : public vtkArrayDataAlgorithm
36 {
37 public:
38  static vtkArrayReader* New();
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 
80 protected:
82  ~vtkArrayReader() override;
83 
85 
86  char* FileName;
89 
90 private:
91  vtkArrayReader(const vtkArrayReader&) = delete;
92  void operator=(const vtkArrayReader&) = delete;
93 };
94 
95 VTK_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 vtkArray * Read(const vtkStdString &str)
Read an arbitrary array from a string.
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.
static vtkArrayReader * New()
bool ReadFromInputString
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
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:29
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:29