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 =========================================================================*/
27 #ifndef vtkOutputStream_h
28 #define vtkOutputStream_h
29 
30 #include "vtkIOCoreModule.h" // For export macro
31 #include "vtkObject.h"
32 
33 class VTKIOCORE_EXPORT vtkOutputStream : public vtkObject
34 {
35 public:
36  vtkTypeMacro(vtkOutputStream,vtkObject);
37  static vtkOutputStream *New();
38  void PrintSelf(ostream& os, vtkIndent indent);
39 
41 
44  vtkSetMacro(Stream, ostream*);
45  vtkGetMacro(Stream, ostream*);
47 
53  virtual int StartWriting();
54 
58  virtual int Write(void const* data, size_t length);
59 
66  virtual int EndWriting();
67 
68 protected:
70  ~vtkOutputStream();
71 
72  // The real output stream.
73  ostream* Stream;
74  int WriteStream(const char* data, size_t length);
75 
76 private:
77  vtkOutputStream(const vtkOutputStream&) VTK_DELETE_FUNCTION;
78  void operator=(const vtkOutputStream&) VTK_DELETE_FUNCTION;
79 };
80 
81 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:59
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
Wraps a binary output stream with a VTK interface.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...