VTK
dox/IO/vtkArrayDataReader.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkArrayDataReader.h
00005   
00006 -------------------------------------------------------------------------
00007   Copyright 2008 Sandia Corporation.
00008   Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
00009   the U.S. Government retains certain rights in this software.
00010 -------------------------------------------------------------------------
00011 
00012   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00013   All rights reserved.
00014   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00015 
00016      This software is distributed WITHOUT ANY WARRANTY; without even
00017      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00018      PURPOSE.  See the above copyright notice for more information.
00019 
00020 =========================================================================*/
00021 
00038 #ifndef __vtkArrayDataReader_h
00039 #define __vtkArrayDataReader_h
00040 
00041 #include "vtkArrayDataAlgorithm.h"
00042 
00043 class VTK_IO_EXPORT vtkArrayDataReader :
00044   public vtkArrayDataAlgorithm
00045 {
00046 public:
00047   static vtkArrayDataReader* New();
00048   vtkTypeMacro(vtkArrayDataReader, vtkArrayDataAlgorithm);
00049   void PrintSelf(ostream& os, vtkIndent indent);
00050 
00052 
00053   vtkGetStringMacro(FileName);
00054   vtkSetStringMacro(FileName);
00056   
00058 
00061   virtual void SetInputString(const vtkStdString& string);
00062   virtual vtkStdString GetInputString();
00064   
00066 
00068   vtkSetMacro(ReadFromInputString, bool);
00069   vtkGetMacro(ReadFromInputString, bool);
00070   vtkBooleanMacro(ReadFromInputString, bool);
00072 
00075   static vtkArrayData* Read(istream& stream);
00076 
00078   static vtkArrayData* Read(vtkStdString str);
00079 
00080 protected:
00081   vtkArrayDataReader();
00082   ~vtkArrayDataReader();
00083 
00084   int RequestData(
00085     vtkInformation*, 
00086     vtkInformationVector**, 
00087     vtkInformationVector*);
00088 
00089   char* FileName;
00090   vtkStdString InputString;
00091   bool ReadFromInputString;
00092 
00093 private:
00094   vtkArrayDataReader(const vtkArrayDataReader&); // Not implemented
00095   void operator=(const vtkArrayDataReader&);   // Not implemented
00096 };
00097 
00098 #endif