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

dox/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 =========================================================================*/ 00030 #ifndef __vtkOutputStream_h 00031 #define __vtkOutputStream_h 00032 00033 #include "vtkObject.h" 00034 00035 class VTK_IO_EXPORT vtkOutputStream : public vtkObject 00036 { 00037 public: 00038 vtkTypeRevisionMacro(vtkOutputStream,vtkObject); 00039 static vtkOutputStream *New(); 00040 void PrintSelf(ostream& os, vtkIndent indent); 00041 00042 //BTX 00044 00045 vtkSetMacro(Stream, ostream*); 00046 vtkGetMacro(Stream, ostream*); 00047 //ETX 00049 00053 virtual int StartWriting(); 00054 00056 00057 virtual int Write(const unsigned char* data, unsigned long length); 00058 int Write(const char* data, unsigned long length); 00060 00065 virtual int EndWriting(); 00066 00067 protected: 00068 vtkOutputStream(); 00069 ~vtkOutputStream(); 00070 00071 // The real output stream. 00072 ostream* Stream; 00073 00074 private: 00075 vtkOutputStream(const vtkOutputStream&); // Not implemented. 00076 void operator=(const vtkOutputStream&); // Not implemented. 00077 }; 00078 00079 #endif