VTK
vtkBase64Utilities.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkBase64Utilities.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 =========================================================================*/
24 #ifndef vtkBase64Utilities_h
25 #define vtkBase64Utilities_h
26 
27 #include "vtkIOCoreModule.h" // For export macro
28 #include "vtkObject.h"
29 
31 {
32 public:
33  static vtkBase64Utilities *New();
35 
37 
38  static void EncodeTriplet(unsigned char i0,
39  unsigned char i1,
40  unsigned char i2,
41  unsigned char *o0,
42  unsigned char *o1,
43  unsigned char *o2,
44  unsigned char *o3);
46 
48 
49  static void EncodePair(unsigned char i0,
50  unsigned char i1,
51  unsigned char *o0,
52  unsigned char *o1,
53  unsigned char *o2,
54  unsigned char *o3);
56 
58 
59  static void EncodeSingle(unsigned char i0,
60  unsigned char *o0,
61  unsigned char *o1,
62  unsigned char *o2,
63  unsigned char *o3);
65 
67 
77  static unsigned long Encode(const unsigned char *input,
78  unsigned long length,
79  unsigned char *output,
80  int mark_end = 0);
82 
83 
85 
86  static int DecodeTriplet(unsigned char i0,
87  unsigned char i1,
88  unsigned char i2,
89  unsigned char i3,
90  unsigned char *o0,
91  unsigned char *o1,
92  unsigned char *o2);
94 
96 
105  static unsigned long Decode(const unsigned char *input,
106  unsigned long length,
107  unsigned char *output,
108  unsigned long max_input_length = 0);
110 
111 protected:
114 
115 private:
116  vtkBase64Utilities(const vtkBase64Utilities&); // Not implemented.
117  void operator=(const vtkBase64Utilities&); // Not implemented.
118 };
119 
120 #endif
121 // VTK-HeaderTest-Exclude: vtkBase64Utilities.h
abstract base class for most VTK objects
Definition: vtkObject.h:61
base64 encode and decode utilities.
#define VTKIOCORE_EXPORT
static vtkObject * New()