VTK
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 
44 #ifndef vtkFixedWidthTextReader_h
45 #define vtkFixedWidthTextReader_h
46 
47 #include "vtkIOInfovisModule.h" // For export macro
48 #include "vtkTableAlgorithm.h"
49 
50 class vtkCommand;
51 class vtkTable;
52 
53 class VTKIOINFOVIS_EXPORT vtkFixedWidthTextReader : public vtkTableAlgorithm
54 {
55 public:
56  static vtkFixedWidthTextReader* New();
58  void PrintSelf(ostream& os, vtkIndent indent) override;
59 
60  vtkGetStringMacro(FileName);
61  vtkSetStringMacro(FileName);
62 
64 
67  vtkSetMacro(FieldWidth, int);
68  vtkGetMacro(FieldWidth, int);
70 
72 
76  vtkSetMacro(StripWhiteSpace, bool);
77  vtkGetMacro(StripWhiteSpace, bool);
78  vtkBooleanMacro(StripWhiteSpace, bool);
80 
82 
85  vtkGetMacro(HaveHeaders,bool);
86  vtkSetMacro(HaveHeaders,bool);
87  vtkBooleanMacro(HaveHeaders, bool);
89 
91 
95  void SetTableErrorObserver(vtkCommand *);
96  vtkGetObjectMacro(TableErrorObserver,vtkCommand);
98 
99  protected:
101  ~vtkFixedWidthTextReader() override;
102 
103  int RequestData(
106  vtkInformationVector*) override;
107 
108  void OpenFile();
109 
110  char* FileName;
114 
115 private:
117  void operator=(const vtkFixedWidthTextReader&) = delete;
118  vtkCommand *TableErrorObserver;
119 };
120 
121 #endif
122 
vtkCommand
superclass for callback/observer methods
Definition: vtkCommand.h:370
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:112
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:80
vtkFixedWidthTextReader::FileName
char * FileName
Definition: vtkFixedWidthTextReader.h:110
vtkTableAlgorithm.h
vtkFixedWidthTextReader::HaveHeaders
bool HaveHeaders
Definition: vtkFixedWidthTextReader.h:111
vtkFixedWidthTextReader
reader for pulling in text files with fixed-width fields
Definition: vtkFixedWidthTextReader.h:53
vtkTableAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkFixedWidthTextReader::FieldWidth
int FieldWidth
Definition: vtkFixedWidthTextReader.h:113
vtkTableAlgorithm::New
static vtkTableAlgorithm * New()