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

# 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 =========================================================================*/
    00035 #ifndef __vtkBase64Utilities_h
    00036 #define __vtkBase64Utilities_h
    00037
    00038 #include "vtkObject.h"
    00039
    00040 class VTK_IO_EXPORT vtkBase64Utilities : public vtkObject
    00041 {
    00042 public:
    00043   static vtkBase64Utilities *New();
    00044   vtkTypeRevisionMacro(vtkBase64Utilities,vtkObject);
    00045
    00047
    00048   static void EncodeTriplet(unsigned char i0,
    00049                             unsigned char i1,
    00050                             unsigned char i2,
    00051                             unsigned char *o0,
    00052                             unsigned char *o1,
    00053                             unsigned char *o2,
    00054                             unsigned char *o3);
    00056
    00058
    00059   static void EncodePair(unsigned char i0,
    00060                          unsigned char i1,
    00061                          unsigned char *o0,
    00062                          unsigned char *o1,
    00063                          unsigned char *o2,
    00064                          unsigned char *o3);
    00066
    00068
    00069   static void EncodeSingle(unsigned char i0,
    00070                            unsigned char *o0,
    00071                            unsigned char *o1,
    00072                            unsigned char *o2,
    00073                            unsigned char *o3);
    00075
    00077
    00087   static unsigned long Encode(const unsigned char *input,
    00088                               unsigned long length,
    00089                               unsigned char *output,
    00090                               int mark_end = 0);
    00092
    00093
    00095
    00096   static int DecodeTriplet(unsigned char i0,
    00097                            unsigned char i1,
    00098                            unsigned char i2,
    00099                            unsigned char i3,
    00100                            unsigned char *o0,
    00101                            unsigned char *o1,
    00102                            unsigned char *o2);
    00104
    00106
    00115   static unsigned long Decode(const unsigned char *input,
    00116                               unsigned long length,
    00117                               unsigned char *output,
    00118                               unsigned long max_input_length = 0);
    00120
    00121 protected:
    00122   vtkBase64Utilities() {};
    00123   ~vtkBase64Utilities() {};
    00124
    00125 private:
    00126   vtkBase64Utilities(const vtkBase64Utilities&);  // Not implemented.
    00127   void operator=(const vtkBase64Utilities&);  // Not implemented.
    00128 };
    00129
    00130 #endif