VTK  9.0.20201124
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) override;
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() override;
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&) = delete;
78  void operator=(const vtkOutputStream&) = delete;
79 };
80 
81 #endif
vtkX3D::data
Definition: vtkX3D.h:321
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:62
vtkX3D::length
Definition: vtkX3D.h:399
vtkOutputStream::Stream
ostream * Stream
Definition: vtkOutputStream.h:73
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkObject::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkObject.h
vtkOutputStream
Wraps a binary output stream with a VTK interface.
Definition: vtkOutputStream.h:33