Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkOutputStream.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkOutputStream.h,v $
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 =========================================================================*/
00036 #ifndef __vtkOutputStream_h
00037 #define __vtkOutputStream_h
00038 
00039 #include "vtkObject.h"
00040 
00041 class VTK_IO_EXPORT vtkOutputStream : public vtkObject
00042 {
00043 public:
00044   vtkTypeRevisionMacro(vtkOutputStream,vtkObject);
00045   static vtkOutputStream *New();
00046   void PrintSelf(ostream& os, vtkIndent indent);
00047   
00048   //BTX
00050 
00051   vtkSetMacro(Stream, ostream*);
00052   vtkGetMacro(Stream, ostream*);
00053   //ETX
00055   
00059   virtual int StartWriting();
00060   
00062 
00063   virtual int Write(const unsigned char* data, unsigned long length);
00064   int Write(const char* data, unsigned long length);
00066   
00071   virtual int EndWriting();
00072   
00073 protected:
00074   vtkOutputStream();
00075   ~vtkOutputStream();  
00076   
00077   // The real output stream.
00078   ostream* Stream;
00079   
00080 private:
00081   vtkOutputStream(const vtkOutputStream&);  // Not implemented.
00082   void operator=(const vtkOutputStream&);  // Not implemented.
00083 };
00084 
00085 #endif