VTK  9.3.20240419
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:
49  void PrintSelf(ostream& os, vtkIndent indent) override;
50 
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 
87  vtkGetObjectMacro(TableErrorObserver, vtkCommand);
89 
90 protected:
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
superclass for callback/observer methods
Definition: vtkCommand.h:384
reader for pulling in text files with fixed-width fields
static vtkFixedWidthTextReader * New()
void SetTableErrorObserver(vtkCommand *)
Set/get the ErrorObserver for the internal vtkTable This is useful for applications that want to catc...
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
~vtkFixedWidthTextReader() override
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition: vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only vtkTables as output.
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:168