Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

dox/IO/vtkBase64Utilities.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkBase64Utilities.h,v $ 00005 Language: C++ 00006 00007 Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 00008 All rights reserved. 00009 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00010 00011 This software is distributed WITHOUT ANY WARRANTY; without even 00012 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00013 PURPOSE. See the above copyright notice for more information. 00014 00015 =========================================================================*/ 00025 #ifndef __vtkBase64Utilities_h 00026 #define __vtkBase64Utilities_h 00027 00028 #include "vtkObject.h" 00029 00030 class VTK_IO_EXPORT vtkBase64Utilities : public vtkObject 00031 { 00032 public: 00033 static vtkBase64Utilities *New(); 00034 vtkTypeRevisionMacro(vtkBase64Utilities,vtkObject); 00035 00037 00038 static void EncodeTriplet(unsigned char i0, 00039 unsigned char i1, 00040 unsigned char i2, 00041 unsigned char *o0, 00042 unsigned char *o1, 00043 unsigned char *o2, 00044 unsigned char *o3); 00046 00048 00049 static void EncodePair(unsigned char i0, 00050 unsigned char i1, 00051 unsigned char *o0, 00052 unsigned char *o1, 00053 unsigned char *o2, 00054 unsigned char *o3); 00056 00058 00059 static void EncodeSingle(unsigned char i0, 00060 unsigned char *o0, 00061 unsigned char *o1, 00062 unsigned char *o2, 00063 unsigned char *o3); 00065 00067 00077 static unsigned long Encode(const unsigned char *input, 00078 unsigned long length, 00079 unsigned char *output, 00080 int mark_end = 0); 00082 00083 00085 00086 static int DecodeTriplet(unsigned char i0, 00087 unsigned char i1, 00088 unsigned char i2, 00089 unsigned char i3, 00090 unsigned char *o0, 00091 unsigned char *o1, 00092 unsigned char *o2); 00094 00096 00105 static unsigned long Decode(const unsigned char *input, 00106 unsigned long length, 00107 unsigned char *output, 00108 unsigned long max_input_length = 0); 00110 00111 protected: 00112 vtkBase64Utilities() {}; 00113 ~vtkBase64Utilities() {}; 00114 00115 private: 00116 vtkBase64Utilities(const vtkBase64Utilities&); // Not implemented. 00117 void operator=(const vtkBase64Utilities&); // Not implemented. 00118 }; 00119 00120 #endif