VTK  9.3.1
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 
46  vtkGetFilePathMacro(FileName);
47  vtkSetFilePathMacro(FileName);
49 
51 
55  virtual void SetInputString(const vtkStdString& string);
56  virtual vtkStdString GetInputString();
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
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:28
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
Reads sparse and dense vtkArray data written by vtkArrayWriter.
Store vtkAlgorithm input/output information.
Abstract interface for N-dimensional arrays.
Definition: vtkArray.h:51
a simple class to control print indentation
Definition: vtkIndent.h:28
bool ReadFromInputString
Superclass for algorithms that produce vtkArrayDatas as output.
vtkStdString InputString
static vtkArrayDataAlgorithm * New()
Store zero or more vtkInformation instances.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.