VTK  9.2.6
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 class vtkArray;
50 
51 class VTKIOCORE_EXPORT vtkArrayReader : public vtkArrayDataAlgorithm
52 {
53 public:
54  static vtkArrayReader* New();
56  void PrintSelf(ostream& os, vtkIndent indent) override;
57 
59 
62  vtkGetFilePathMacro(FileName);
63  vtkSetFilePathMacro(FileName);
65 
67 
71  virtual void SetInputString(const vtkStdString& string);
72  virtual vtkStdString GetInputString();
74 
76 
79  vtkSetMacro(ReadFromInputString, bool);
80  vtkGetMacro(ReadFromInputString, bool);
81  vtkBooleanMacro(ReadFromInputString, bool);
83 
89  static vtkArray* Read(istream& stream);
90 
94  static vtkArray* Read(const vtkStdString& str);
95 
96 protected:
98  ~vtkArrayReader() override;
99 
101 
102  char* FileName;
105 
106 private:
107  vtkArrayReader(const vtkArrayReader&) = delete;
108  void operator=(const vtkArrayReader&) = delete;
109 };
110 
111 #endif
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:38
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:67
a simple class to control print indentation
Definition: vtkIndent.h:39
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.