VTK
vtkInputStream.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkInputStream.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 vtkInputStream_h
27 #define vtkInputStream_h
28 
29 #include "vtkIOCoreModule.h" // For export macro
30 #include "vtkObject.h"
31 
33 {
34 public:
35  vtkTypeMacro(vtkInputStream,vtkObject);
36  static vtkInputStream *New();
37  void PrintSelf(ostream& os, vtkIndent indent);
38 
39  //BTX
41 
42  vtkSetMacro(Stream, istream*);
43  vtkGetMacro(Stream, istream*);
44  //ETX
46 
50  virtual void StartReading();
51 
54  virtual int Seek(vtkTypeInt64 offset);
55 
57  virtual size_t Read(void* data, size_t length);
58 
63  virtual void EndReading();
64 
65 protected:
67  ~vtkInputStream();
68 
69  // The real input stream.
70  istream* Stream;
71  size_t ReadStream(char* data, size_t length);
72 
73  // The input stream's position when StartReading was called.
74  vtkTypeInt64 StreamStartPosition;
75 
76 private:
77  vtkInputStream(const vtkInputStream&); // Not implemented.
78  void operator=(const vtkInputStream&); // Not implemented.
79 };
80 
81 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:61
istream * Stream
Wraps a binary input stream with a VTK interface.
#define VTKIOCORE_EXPORT
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:38
static vtkObject * New()
vtkTypeInt64 StreamStartPosition