Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# IO/vtkInputStream.h

Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program:   Visualization Toolkit
    00004   Module:    $RCSfile: vtkInputStream.h,v $
    00005   Language:  C++
    00006
    00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen
    00008   All rights reserved.
    00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
    00010
    00011      This software is distributed WITHOUT ANY WARRANTY; without even
    00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
    00013      PURPOSE.  See the above copyright notice for more information.
    00014
    00015 =========================================================================*/
    00040 #ifndef __vtkInputStream_h
    00041 #define __vtkInputStream_h
    00042
    00043 #include "vtkObject.h"
    00044
    00045 class VTK_IO_EXPORT vtkInputStream : public vtkObject
    00046 {
    00047 public:
    00048   vtkTypeRevisionMacro(vtkInputStream,vtkObject);
    00049   static vtkInputStream *New();
    00050   void PrintSelf(ostream& os, vtkIndent indent);
    00051
    00052   //BTX
    00054   /*! Get/Set the real input stream. */
    00055   vtkSetMacro(Stream, istream*);
    00056   vtkGetMacro(Stream, istream*);
    00057   //ETX
    00059
    00063   virtual void StartReading();
    00064
    00067   virtual int Seek(unsigned long offset);
    00068
    00070
    00071   virtual unsigned long Read(unsigned char* data, unsigned long length);
    00072   unsigned long Read(char* data, unsigned long length);
    00074
    00079   virtual void EndReading();
    00080
    00081 protected:
    00082   vtkInputStream();
    00083   ~vtkInputStream();
    00084
    00085   // The real input stream.
    00086   istream* Stream;
    00087
    00088   // The input stream's position when StartReading was called.
    00089   unsigned long StreamStartPosition;
    00090
    00091 private:
    00092   vtkInputStream(const vtkInputStream&);  // Not implemented.
    00093   void operator=(const vtkInputStream&);  // Not implemented.
    00094 };
    00095
    00096 #endif