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 
47 #ifndef vtkFixedWidthTextReader_h
48 #define vtkFixedWidthTextReader_h
49 
50 #include "vtkIOInfovisModule.h" // For export macro
51 #include "vtkTableAlgorithm.h"
52 
53 class vtkCommand;
54 class vtkTable;
55 
56 class VTKIOINFOVIS_EXPORT vtkFixedWidthTextReader : public vtkTableAlgorithm
57 {
58 public:
59  static vtkFixedWidthTextReader* New();
61  void PrintSelf(ostream& os, vtkIndent indent);
62 
63  vtkGetStringMacro(FileName);
64  vtkSetStringMacro(FileName);
65 
67 
70  vtkSetMacro(FieldWidth, int);
71  vtkGetMacro(FieldWidth, int);
73 
75 
79  vtkSetMacro(StripWhiteSpace, bool);
80  vtkGetMacro(StripWhiteSpace, bool);
81  vtkBooleanMacro(StripWhiteSpace, bool);
83 
85 
88  vtkGetMacro(HaveHeaders,bool);
89  vtkSetMacro(HaveHeaders,bool);
90  vtkBooleanMacro(HaveHeaders, bool);
92 
94 
98  void SetTableErrorObserver(vtkCommand *);
99  vtkGetObjectMacro(TableErrorObserver,vtkCommand);
101 
102  protected:
105 
106  int RequestData(
110 
111  void OpenFile();
112 
113  char* FileName;
117 
118 private:
119  vtkFixedWidthTextReader(const vtkFixedWidthTextReader&) VTK_DELETE_FUNCTION;
120  void operator=(const vtkFixedWidthTextReader&) VTK_DELETE_FUNCTION;
121  vtkCommand *TableErrorObserver;
122 };
123 
124 #endif
125 
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:341
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:68
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.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.