base64 encode and decode utilities.
More...
#include <vtkBase64Utilities.h>
|
virtual const char * | GetClassName () |
|
virtual int | IsA (const char *type) |
|
virtual void | DebugOn () |
|
virtual void | DebugOff () |
|
unsigned char | GetDebug () |
|
void | SetDebug (unsigned char debugFlag) |
|
virtual void | Modified () |
|
virtual unsigned long | GetMTime () |
|
virtual void | PrintSelf (ostream &os, vtkIndent indent) |
|
unsigned long | AddObserver (unsigned long event, vtkCommand *, float priority=0.0f) |
|
unsigned long | AddObserver (const char *event, vtkCommand *, float priority=0.0f) |
|
vtkCommand * | GetCommand (unsigned long tag) |
|
void | RemoveObserver (vtkCommand *) |
|
void | RemoveObservers (unsigned long event, vtkCommand *) |
|
void | RemoveObservers (const char *event, vtkCommand *) |
|
int | HasObserver (unsigned long event, vtkCommand *) |
|
int | HasObserver (const char *event, vtkCommand *) |
|
void | RemoveObserver (unsigned long tag) |
|
void | RemoveObservers (unsigned long event) |
|
void | RemoveObservers (const char *event) |
|
void | RemoveAllObservers () |
|
int | HasObserver (unsigned long event) |
|
int | HasObserver (const char *event) |
|
template<class U , class T > |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f) |
|
template<class U , class T > |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
|
int | InvokeEvent (unsigned long event, void *callData) |
|
int | InvokeEvent (const char *event, void *callData) |
|
int | InvokeEvent (unsigned long event) |
|
int | InvokeEvent (const char *event) |
|
const char * | GetClassName () const |
|
virtual void | Delete () |
|
virtual void | FastDelete () |
|
void | Print (ostream &os) |
|
virtual void | Register (vtkObjectBase *o) |
|
virtual void | UnRegister (vtkObjectBase *o) |
|
void | SetReferenceCount (int) |
|
void | PrintRevisions (ostream &os) |
|
virtual void | PrintHeader (ostream &os, vtkIndent indent) |
|
virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
|
int | GetReferenceCount () |
|
|
static vtkBase64Utilities * | New () |
|
static int | IsTypeOf (const char *type) |
|
static vtkBase64Utilities * | SafeDownCast (vtkObject *o) |
|
|
static void | EncodeTriplet (unsigned char i0, unsigned char i1, unsigned char i2, unsigned char *o0, unsigned char *o1, unsigned char *o2, unsigned char *o3) |
|
|
static void | EncodePair (unsigned char i0, unsigned char i1, unsigned char *o0, unsigned char *o1, unsigned char *o2, unsigned char *o3) |
|
|
static void | EncodeSingle (unsigned char i0, unsigned char *o0, unsigned char *o1, unsigned char *o2, unsigned char *o3) |
|
|
static unsigned long | Encode (const unsigned char *input, unsigned long length, unsigned char *output, int mark_end=0) |
|
|
static int | DecodeTriplet (unsigned char i0, unsigned char i1, unsigned char i2, unsigned char i3, unsigned char *o0, unsigned char *o1, unsigned char *o2) |
|
|
static unsigned long | Decode (const unsigned char *input, unsigned long length, unsigned char *output, unsigned long max_input_length=0) |
|
static int | IsTypeOf (const char *type) |
|
static vtkObject * | SafeDownCast (vtkObject *o) |
|
static vtkObject * | New () |
|
static void | BreakOnError () |
|
static void | SetGlobalWarningDisplay (int val) |
|
static void | GlobalWarningDisplayOn () |
|
static void | GlobalWarningDisplayOff () |
|
static int | GetGlobalWarningDisplay () |
|
static int | IsTypeOf (const char *name) |
|
static vtkObjectBase * | New () |
|
base64 encode and decode utilities.
vtkBase64Utilities implements base64 encoding and decoding.
Definition at line 26 of file vtkBase64Utilities.h.
vtkBase64Utilities::vtkBase64Utilities |
( |
| ) |
|
|
inlineprotected |
vtkBase64Utilities::~vtkBase64Utilities |
( |
| ) |
|
|
inlineprotected |
virtual const char* vtkBase64Utilities::GetClassName |
( |
| ) |
|
|
virtual |
static int vtkBase64Utilities::IsTypeOf |
( |
const char * |
type | ) |
|
|
static |
virtual int vtkBase64Utilities::IsA |
( |
const char * |
name | ) |
|
|
virtual |
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkObject.
static void vtkBase64Utilities::EncodeTriplet |
( |
unsigned char |
i0, |
|
|
unsigned char |
i1, |
|
|
unsigned char |
i2, |
|
|
unsigned char * |
o0, |
|
|
unsigned char * |
o1, |
|
|
unsigned char * |
o2, |
|
|
unsigned char * |
o3 |
|
) |
| |
|
static |
Encode 3 bytes into 4 bytes
static void vtkBase64Utilities::EncodePair |
( |
unsigned char |
i0, |
|
|
unsigned char |
i1, |
|
|
unsigned char * |
o0, |
|
|
unsigned char * |
o1, |
|
|
unsigned char * |
o2, |
|
|
unsigned char * |
o3 |
|
) |
| |
|
static |
Encode 2 bytes into 4 bytes
static void vtkBase64Utilities::EncodeSingle |
( |
unsigned char |
i0, |
|
|
unsigned char * |
o0, |
|
|
unsigned char * |
o1, |
|
|
unsigned char * |
o2, |
|
|
unsigned char * |
o3 |
|
) |
| |
|
static |
Encode 1 byte into 4 bytes
static unsigned long vtkBase64Utilities::Encode |
( |
const unsigned char * |
input, |
|
|
unsigned long |
length, |
|
|
unsigned char * |
output, |
|
|
int |
mark_end = 0 |
|
) |
| |
|
static |
Encode 'length' bytes from the input buffer and store the encoded stream into the output buffer. Return the length of the encoded stream. Note that the output buffer must be allocated by the caller (length * 1.5 should be a safe estimate). If 'mark_end' is true than an extra set of 4 bytes is added to the end of the stream if the input is a multiple of 3 bytes. These bytes are invalid chars and therefore they will stop the decoder thus enabling the caller to decode a stream without actually knowing how much data to expect (if the input is not a multiple of 3 bytes then the extra padding needed to complete the encode 4 bytes will stop the decoding anyway).
static int vtkBase64Utilities::DecodeTriplet |
( |
unsigned char |
i0, |
|
|
unsigned char |
i1, |
|
|
unsigned char |
i2, |
|
|
unsigned char |
i3, |
|
|
unsigned char * |
o0, |
|
|
unsigned char * |
o1, |
|
|
unsigned char * |
o2 |
|
) |
| |
|
static |
Decode 4 bytes into 3 bytes.
static unsigned long vtkBase64Utilities::Decode |
( |
const unsigned char * |
input, |
|
|
unsigned long |
length, |
|
|
unsigned char * |
output, |
|
|
unsigned long |
max_input_length = 0 |
|
) |
| |
|
static |
Decode bytes from the input buffer and store the decoded stream into the output buffer until 'length' bytes have been decoded. Return the real length of the decoded stream (which should be equal to 'length'). Note that the output buffer must be allocated by the caller. If 'max_input_length' is not null, then it specifies the number of encoded bytes that should be at most read from the input buffer. In that case the 'length' parameter is ignored. This enables the caller to decode a stream without actually knowing how much decoded data to expect (of course, the buffer must be large enough).
The documentation for this class was generated from the following file: