VTK
|
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 "vtkTableAlgorithm.h" 00053 00054 class vtkTable; 00055 00056 class VTK_INFOVIS_EXPORT vtkFixedWidthTextReader : public vtkTableAlgorithm 00057 { 00058 public: 00059 static vtkFixedWidthTextReader* New(); 00060 vtkTypeMacro(vtkFixedWidthTextReader,vtkTableAlgorithm); 00061 void PrintSelf(ostream& os, vtkIndent indent); 00062 00063 vtkGetStringMacro(FileName); 00064 vtkSetStringMacro(FileName); 00065 00067 00068 vtkSetMacro(FieldWidth, int); 00069 vtkGetMacro(FieldWidth, int); 00071 00073 00075 vtkSetMacro(StripWhiteSpace, bool); 00076 vtkGetMacro(StripWhiteSpace, bool); 00077 vtkBooleanMacro(StripWhiteSpace, bool); 00079 00081 00082 vtkGetMacro(HaveHeaders,bool); 00083 vtkSetMacro(HaveHeaders,bool); 00084 vtkBooleanMacro(HaveHeaders, bool); 00086 00087 protected: 00088 vtkFixedWidthTextReader(); 00089 ~vtkFixedWidthTextReader(); 00090 00091 int RequestData( 00092 vtkInformation*, 00093 vtkInformationVector**, 00094 vtkInformationVector*); 00095 00096 void OpenFile(); 00097 00098 char* FileName; 00099 bool HaveHeaders; 00100 bool StripWhiteSpace; 00101 int FieldWidth; 00102 00103 private: 00104 vtkFixedWidthTextReader(const vtkFixedWidthTextReader&); // Not implemented 00105 void operator=(const vtkFixedWidthTextReader&); // Not implemented 00106 }; 00107 00108 #endif 00109