VTK
vtkBase64InputStream.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkBase64InputStream.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 =========================================================================*/
22 #ifndef vtkBase64InputStream_h
23 #define vtkBase64InputStream_h
24 
25 #include "vtkIOCoreModule.h" // For export macro
26 #include "vtkInputStream.h"
27 
29 {
30 public:
33  void PrintSelf(ostream& os, vtkIndent indent);
34 
38  void StartReading();
39 
42  int Seek(vtkTypeInt64 offset);
43 
45  size_t Read(void* data, size_t length);
46 
48 
52  void EndReading();
53 protected:
57 
58  // Number of decoded bytes left in Buffer from last call to Read.
60  unsigned char Buffer[2];
61 
62  // Reads 4 bytes from the input stream and decodes them into 3 bytes.
63  int DecodeTriplet(unsigned char& c0, unsigned char& c1, unsigned char& c2);
64 
65 private:
66  vtkBase64InputStream(const vtkBase64InputStream&); // Not implemented.
67  void operator=(const vtkBase64InputStream&); // Not implemented.
68 };
69 
70 #endif
vtkBase64InputStream::New
static vtkBase64InputStream * New()
VTKIOCORE_EXPORT
#define VTKIOCORE_EXPORT
Definition: vtkIOCoreModule.h:15
vtkgl::data
GLsizei GLsizei GLenum GLenum const GLvoid * data
Definition: vtkgl.h:11339
vtkIOCoreModule.h
vtkBase64InputStream::BufferLength
int BufferLength
Definition: vtkBase64InputStream.h:59
vtkBase64InputStream::Read
size_t Read(void *data, size_t length)
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkBase64InputStream::DecodeTriplet
int DecodeTriplet(unsigned char &c0, unsigned char &c1, unsigned char &c2)
vtkgl::length
GLuint GLsizei GLsizei * length
Definition: vtkgl.h:11992
vtkInputStream.h
vtkBase64InputStream::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkBase64InputStream
Reads base64-encoded input from a stream.
Definition: vtkBase64InputStream.h:29
vtkgl::offset
GLintptr offset
Definition: vtkgl.h:11844
vtkBase64InputStream::EndReading
void EndReading()
vtkBase64InputStream::StartReading
void StartReading()
vtkBase64InputStream::~vtkBase64InputStream
~vtkBase64InputStream()
vtkBase64InputStream::vtkBase64InputStream
vtkBase64InputStream()
vtkInputStream
Wraps a binary input stream with a VTK interface.
Definition: vtkInputStream.h:33
vtkBase64InputStream::Seek
int Seek(vtkTypeInt64 offset)