VTK  9.2.20221001
vtkArrayReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkArrayReader.h
5 
6 -------------------------------------------------------------------------
7  Copyright 2008 Sandia Corporation.
8  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
9  the U.S. Government retains certain rights in this software.
10 -------------------------------------------------------------------------
11 
12  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
13  All rights reserved.
14  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
15 
16  This software is distributed WITHOUT ANY WARRANTY; without even
17  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
18  PURPOSE. See the above copyright notice for more information.
19 
20 =========================================================================*/
21 
42 #ifndef vtkArrayReader_h
43 #define vtkArrayReader_h
44 
45 #include "vtkArrayDataAlgorithm.h"
46 #include "vtkIOCoreModule.h" // For export macro
47 #include "vtkStdString.h" // For vtkStdString
48 
49 VTK_ABI_NAMESPACE_BEGIN
50 class vtkArray;
51 
52 class VTKIOCORE_EXPORT vtkArrayReader : public vtkArrayDataAlgorithm
53 {
54 public:
55  static vtkArrayReader* New();
57  void PrintSelf(ostream& os, vtkIndent indent) override;
58 
60 
66 
68 
72  virtual void SetInputString(const vtkStdString& string);
75 
77 
80  vtkSetMacro(ReadFromInputString, bool);
81  vtkGetMacro(ReadFromInputString, bool);
82  vtkBooleanMacro(ReadFromInputString, bool);
84 
90  static vtkArray* Read(istream& stream);
91 
95  static vtkArray* Read(const vtkStdString& str);
96 
97 protected:
99  ~vtkArrayReader() override;
100 
102 
103  char* FileName;
106 
107 private:
108  vtkArrayReader(const vtkArrayReader&) = delete;
109  void operator=(const vtkArrayReader&) = delete;
110 };
111 
112 VTK_ABI_NAMESPACE_END
113 #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()
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:69
a simple class to control print indentation
Definition: vtkIndent.h:120
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:110