vtkBase64OutputStream.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00033 #ifndef __vtkBase64OutputStream_h
00034 #define __vtkBase64OutputStream_h
00035
00036 #include "vtkOutputStream.h"
00037
00038 class VTK_IO_EXPORT vtkBase64OutputStream : public vtkOutputStream
00039 {
00040 public:
00041 vtkTypeRevisionMacro(vtkBase64OutputStream,vtkOutputStream);
00042 static vtkBase64OutputStream *New();
00043 void PrintSelf(ostream& os, vtkIndent indent);
00044
00048 int StartWriting();
00049
00051 int Write(const unsigned char* data, unsigned long length);
00052
00057 int EndWriting();
00058
00059 protected:
00060 vtkBase64OutputStream();
00061 ~vtkBase64OutputStream();
00062
00063
00064 unsigned int BufferLength;
00065 unsigned char Buffer[2];
00066
00067
00068 int EncodeTriplet(unsigned char c0, unsigned char c1, unsigned char c2);
00069 int EncodeEnding(unsigned char c0, unsigned char c1);
00070 int EncodeEnding(unsigned char c0);
00071
00072 private:
00073 vtkBase64OutputStream(const vtkBase64OutputStream&);
00074 void operator=(const vtkBase64OutputStream&);
00075 };
00076
00077 #endif