VTK
dox/IO/vtkArrayReader.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkArrayReader.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 
00041 #ifndef __vtkArrayReader_h
00042 #define __vtkArrayReader_h
00043 
00044 #include "vtkArrayDataAlgorithm.h"
00045 
00046 class VTK_IO_EXPORT vtkArrayReader :
00047   public vtkArrayDataAlgorithm
00048 {
00049 public:
00050   static vtkArrayReader* New();
00051   vtkTypeMacro(vtkArrayReader, vtkArrayDataAlgorithm);
00052   void PrintSelf(ostream& os, vtkIndent indent);
00053 
00055 
00056   vtkGetStringMacro(FileName);
00057   vtkSetStringMacro(FileName);
00059   
00061 
00064   virtual void SetInputString(const vtkStdString& string);
00065   virtual vtkStdString GetInputString();
00067   
00069 
00071   vtkSetMacro(ReadFromInputString, bool);
00072   vtkGetMacro(ReadFromInputString, bool);
00073   vtkBooleanMacro(ReadFromInputString, bool);
00075 
00078   static vtkArray* Read(istream& stream);
00079 
00081   static vtkArray* Read(vtkStdString str);
00082 
00083 protected:
00084   vtkArrayReader();
00085   ~vtkArrayReader();
00086 
00087   int RequestData(
00088     vtkInformation*, 
00089     vtkInformationVector**, 
00090     vtkInformationVector*);
00091 
00092   char* FileName;
00093   vtkStdString InputString;
00094   bool ReadFromInputString;
00095 
00096 private:
00097   vtkArrayReader(const vtkArrayReader&); // Not implemented
00098   void operator=(const vtkArrayReader&);   // Not implemented
00099 };
00100 
00101 #endif
00102