VTK  9.3.1
vtkFixedWidthTextReader.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 
34 #ifndef vtkFixedWidthTextReader_h
35 #define vtkFixedWidthTextReader_h
36 
37 #include "vtkIOInfovisModule.h" // For export macro
38 #include "vtkTableAlgorithm.h"
39 
40 VTK_ABI_NAMESPACE_BEGIN
41 class vtkCommand;
42 class vtkTable;
43 
44 class VTKIOINFOVIS_EXPORT vtkFixedWidthTextReader : public vtkTableAlgorithm
45 {
46 public:
47  static vtkFixedWidthTextReader* New();
49  void PrintSelf(ostream& os, vtkIndent indent) override;
50 
51  vtkGetFilePathMacro(FileName);
52  vtkSetFilePathMacro(FileName);
53 
55 
58  vtkSetMacro(FieldWidth, int);
59  vtkGetMacro(FieldWidth, int);
61 
63 
67  vtkSetMacro(StripWhiteSpace, bool);
68  vtkGetMacro(StripWhiteSpace, bool);
69  vtkBooleanMacro(StripWhiteSpace, bool);
71 
73 
76  vtkGetMacro(HaveHeaders, bool);
77  vtkSetMacro(HaveHeaders, bool);
78  vtkBooleanMacro(HaveHeaders, bool);
80 
82 
86  void SetTableErrorObserver(vtkCommand*);
87  vtkGetObjectMacro(TableErrorObserver, vtkCommand);
89 
90 protected:
92  ~vtkFixedWidthTextReader() override;
93 
95 
96  void OpenFile();
97 
98  char* FileName;
102 
103 private:
105  void operator=(const vtkFixedWidthTextReader&) = delete;
106  vtkCommand* TableErrorObserver;
107 };
108 
109 VTK_ABI_NAMESPACE_END
110 #endif
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkTableAlgorithm * New()
Store vtkAlgorithm input/output information.
reader for pulling in text files with fixed-width fields
superclass for callback/observer methods
Definition: vtkCommand.h:383
a simple class to control print indentation
Definition: vtkIndent.h:28
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:58
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
Superclass for algorithms that produce only vtkTables as output.
Store zero or more vtkInformation instances.