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

IO/vtkOutputStream.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkOutputStream.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 __vtkOutputStream_h
00041 #define __vtkOutputStream_h
00042 
00043 #include "vtkObject.h"
00044 
00045 class VTK_IO_EXPORT vtkOutputStream : public vtkObject
00046 {
00047 public:
00048   vtkTypeRevisionMacro(vtkOutputStream,vtkObject);
00049   static vtkOutputStream *New();
00050   void PrintSelf(ostream& os, vtkIndent indent);
00051   
00052   //BTX
00054   /*! Get/Set the real output stream. */
00055   vtkSetMacro(Stream, ostream*);
00056   vtkGetMacro(Stream, ostream*);
00057   //ETX
00059   
00063   virtual int StartWriting();
00064   
00066 
00067   virtual int Write(const unsigned char* data, unsigned long length);
00068   int Write(const char* data, unsigned long length);
00070   
00075   virtual int EndWriting();
00076   
00077 protected:
00078   vtkOutputStream();
00079   ~vtkOutputStream();  
00080   
00081   // The real output stream.
00082   ostream* Stream;
00083   
00084 private:
00085   vtkOutputStream(const vtkOutputStream&);  // Not implemented.
00086   void operator=(const vtkOutputStream&);  // Not implemented.
00087 };
00088 
00089 #endif