VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/IO/Infovis/vtkFixedWidthTextReader.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkFixedWidthTextReader.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00015 /*-------------------------------------------------------------------------
00016   Copyright 2008 Sandia Corporation.
00017   Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
00018   the U.S. Government retains certain rights in this software.
00019 -------------------------------------------------------------------------*/
00020 
00049 #ifndef vtkFixedWidthTextReader_h
00050 #define vtkFixedWidthTextReader_h
00051 
00052 #include "vtkIOInfovisModule.h" // For export macro
00053 #include "vtkTableAlgorithm.h"
00054 
00055 class vtkTable;
00056 
00057 class VTKIOINFOVIS_EXPORT vtkFixedWidthTextReader : public vtkTableAlgorithm
00058 {
00059 public:
00060   static vtkFixedWidthTextReader* New();
00061   vtkTypeMacro(vtkFixedWidthTextReader,vtkTableAlgorithm);
00062   void PrintSelf(ostream& os, vtkIndent indent);
00063 
00064   vtkGetStringMacro(FileName);
00065   vtkSetStringMacro(FileName);
00066 
00068 
00069   vtkSetMacro(FieldWidth, int);
00070   vtkGetMacro(FieldWidth, int);
00072 
00074 
00076   vtkSetMacro(StripWhiteSpace, bool);
00077   vtkGetMacro(StripWhiteSpace, bool);
00078   vtkBooleanMacro(StripWhiteSpace, bool);
00080 
00082 
00083   vtkGetMacro(HaveHeaders,bool);
00084   vtkSetMacro(HaveHeaders,bool);
00085   vtkBooleanMacro(HaveHeaders, bool);
00087 
00088  protected:
00089   vtkFixedWidthTextReader();
00090   ~vtkFixedWidthTextReader();
00091 
00092   int RequestData(
00093     vtkInformation*,
00094     vtkInformationVector**,
00095     vtkInformationVector*);
00096 
00097   void OpenFile();
00098 
00099   char* FileName;
00100   bool HaveHeaders;
00101   bool StripWhiteSpace;
00102   int FieldWidth;
00103 
00104 private:
00105   vtkFixedWidthTextReader(const vtkFixedWidthTextReader&); // Not implemented
00106   void operator=(const vtkFixedWidthTextReader&);   // Not implemented
00107 };
00108 
00109 #endif
00110