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 
49 #ifndef vtkFixedWidthTextReader_h
50 #define vtkFixedWidthTextReader_h
51 
52 #include "vtkIOInfovisModule.h" // For export macro
53 #include "vtkTableAlgorithm.h"
54 
55 class vtkCommand;
56 class vtkTable;
57 
59 {
60 public:
61  static vtkFixedWidthTextReader* New();
63  void PrintSelf(ostream& os, vtkIndent indent);
64 
65  vtkGetStringMacro(FileName);
66  vtkSetStringMacro(FileName);
67 
69 
70  vtkSetMacro(FieldWidth, int);
71  vtkGetMacro(FieldWidth, int);
73 
75 
77  vtkSetMacro(StripWhiteSpace, bool);
78  vtkGetMacro(StripWhiteSpace, bool);
79  vtkBooleanMacro(StripWhiteSpace, bool);
81 
83 
84  vtkGetMacro(HaveHeaders,bool);
85  vtkSetMacro(HaveHeaders,bool);
86  vtkBooleanMacro(HaveHeaders, bool);
88 
90 
92  void SetTableErrorObserver(vtkCommand *);
93  vtkGetObjectMacro(TableErrorObserver,vtkCommand);
95 
96  protected:
99 
100  int RequestData(
104 
105  void OpenFile();
106 
107  char* FileName;
111 
112 private:
113  vtkFixedWidthTextReader(const vtkFixedWidthTextReader&); // Not implemented
114  void operator=(const vtkFixedWidthTextReader&); // Not implemented
115  vtkCommand *TableErrorObserver;
116 };
117 
118 #endif
119 
void PrintSelf(ostream &os, vtkIndent indent)
static vtkTableAlgorithm * New()
Store vtkAlgorithm input/output information.
#define VTKIOINFOVIS_EXPORT
reader for pulling in text files with fixed-width fields
superclass for callback/observer methods
Definition: vtkCommand.h:328
a simple class to control print indentation
Definition: vtkIndent.h:38
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:67
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Superclass for algorithms that produce only vtkTables as output.
Store zero or more vtkInformation instances.