VTK
vtkOutputStream.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkOutputStream.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
26 #ifndef __vtkOutputStream_h
27 #define __vtkOutputStream_h
28 
29 #include "vtkObject.h"
30 
32 {
33 public:
34  vtkTypeMacro(vtkOutputStream,vtkObject);
35  static vtkOutputStream *New();
36  void PrintSelf(ostream& os, vtkIndent indent);
37 
38  //BTX
40 
41  vtkSetMacro(Stream, ostream*);
42  vtkGetMacro(Stream, ostream*);
43  //ETX
45 
49  virtual int StartWriting();
50 
52 
53  virtual int Write(const unsigned char* data, unsigned long length);
54  int Write(const char* data, unsigned long length);
56 
61  virtual int EndWriting();
62 
63 protected:
65  ~vtkOutputStream();
66 
67  // The real output stream.
68  ostream* Stream;
69 
70 private:
71  vtkOutputStream(const vtkOutputStream&); // Not implemented.
72  void operator=(const vtkOutputStream&); // Not implemented.
73 };
74 
75 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:60
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:37
Wraps a binary output stream with a VTK interface.
#define VTK_IO_EXPORT
static vtkObject * New()