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 "vtkIOCoreModule.h" // For export macro
30 #include "vtkObject.h"
31 
33 {
34 public:
35  vtkTypeMacro(vtkOutputStream,vtkObject);
36  static vtkOutputStream *New();
37  void PrintSelf(ostream& os, vtkIndent indent);
38 
39  //BTX
41 
42  vtkSetMacro(Stream, ostream*);
43  vtkGetMacro(Stream, ostream*);
44  //ETX
46 
50  virtual int StartWriting();
51 
53  virtual int Write(void const* data, size_t length);
54 
59  virtual int EndWriting();
60 
61 protected:
63  ~vtkOutputStream();
64 
65  // The real output stream.
66  ostream* Stream;
67  int WriteStream(const char* data, size_t length);
68 
69 private:
70  vtkOutputStream(const vtkOutputStream&); // Not implemented.
71  void operator=(const vtkOutputStream&); // Not implemented.
72 };
73 
74 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:61
#define VTKIOCORE_EXPORT
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:38
Wraps a binary output stream with a VTK interface.
static vtkObject * New()