VTK  9.0.1
vtkFixedWidthTextReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkFixedWidthTextReader.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 /*-------------------------------------------------------------------------
16  Copyright 2008 Sandia Corporation.
17  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18  the U.S. Government retains certain rights in this software.
19 -------------------------------------------------------------------------*/
20 
50 #ifndef vtkFixedWidthTextReader_h
51 #define vtkFixedWidthTextReader_h
52 
53 #include "vtkIOInfovisModule.h" // For export macro
54 #include "vtkTableAlgorithm.h"
55 
56 class vtkCommand;
57 class vtkTable;
58 
59 class VTKIOINFOVIS_EXPORT vtkFixedWidthTextReader : public vtkTableAlgorithm
60 {
61 public:
62  static vtkFixedWidthTextReader* New();
64  void PrintSelf(ostream& os, vtkIndent indent) override;
65 
66  vtkGetStringMacro(FileName);
67  vtkSetStringMacro(FileName);
68 
70 
73  vtkSetMacro(FieldWidth, int);
74  vtkGetMacro(FieldWidth, int);
76 
78 
82  vtkSetMacro(StripWhiteSpace, bool);
83  vtkGetMacro(StripWhiteSpace, bool);
84  vtkBooleanMacro(StripWhiteSpace, bool);
86 
88 
91  vtkGetMacro(HaveHeaders, bool);
92  vtkSetMacro(HaveHeaders, bool);
93  vtkBooleanMacro(HaveHeaders, bool);
95 
97 
101  void SetTableErrorObserver(vtkCommand*);
102  vtkGetObjectMacro(TableErrorObserver, vtkCommand);
104 
105 protected:
107  ~vtkFixedWidthTextReader() override;
108 
110 
111  void OpenFile();
112 
113  char* FileName;
117 
118 private:
120  void operator=(const vtkFixedWidthTextReader&) = delete;
121  vtkCommand* TableErrorObserver;
122 };
123 
124 #endif
vtkCommand
superclass for callback/observer methods
Definition: vtkCommand.h:377
vtkTableAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkTable
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:62
vtkFixedWidthTextReader::StripWhiteSpace
bool StripWhiteSpace
Definition: vtkFixedWidthTextReader.h:115
vtkTableAlgorithm
Superclass for algorithms that produce only vtkTables as output.
Definition: vtkTableAlgorithm.h:48
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkFixedWidthTextReader::FileName
char * FileName
Definition: vtkFixedWidthTextReader.h:113
vtkTableAlgorithm.h
vtkFixedWidthTextReader::HaveHeaders
bool HaveHeaders
Definition: vtkFixedWidthTextReader.h:114
vtkFixedWidthTextReader
reader for pulling in text files with fixed-width fields
Definition: vtkFixedWidthTextReader.h:59
vtkTableAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkFixedWidthTextReader::FieldWidth
int FieldWidth
Definition: vtkFixedWidthTextReader.h:116
vtkTableAlgorithm::New
static vtkTableAlgorithm * New()