VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
vtkBase64Utilities Class Reference

base64 encode and decode utilities. More...

#include <vtkBase64Utilities.h>

Inheritance diagram for vtkBase64Utilities:
[legend]
Collaboration diagram for vtkBase64Utilities:
[legend]

Public Types

typedef vtkObject Superclass
 
- Public Types inherited from vtkObject
typedef vtkObjectBase Superclass
 

Public Member Functions

virtual int IsA (const char *type)
 
vtkBase64UtilitiesNewInstance () const
 
- Public Member Functions inherited from vtkObject
vtkObjectNewInstance () const
 
virtual void DebugOn ()
 
virtual void DebugOff ()
 
bool GetDebug ()
 
void SetDebug (bool 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)
 
vtkCommandGetCommand (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)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, bool(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)
 
- Public Member Functions inherited from vtkObjectBase
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 &)
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
int GetReferenceCount ()
 

Static Public Member Functions

static vtkBase64UtilitiesNew ()
 
static int IsTypeOf (const char *type)
 
static vtkBase64UtilitiesSafeDownCast (vtkObjectBase *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 Public Member Functions inherited from vtkObject
static int IsTypeOf (const char *type)
 
static vtkObjectSafeDownCast (vtkObjectBase *o)
 
static vtkObjectNew ()
 
static void BreakOnError ()
 
static void SetGlobalWarningDisplay (int val)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
- Static Public Member Functions inherited from vtkObjectBase
static int IsTypeOf (const char *name)
 
static vtkObjectBaseNew ()
 

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkBase64Utilities ()
 
 ~vtkBase64Utilities ()
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
virtual ~vtkObject ()
 
virtual void RegisterInternal (vtkObjectBase *, int check)
 
virtual void UnRegisterInternal (vtkObjectBase *, int check)
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 
void InternalReleaseFocus ()
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void CollectRevisions (ostream &)
 
virtual void ReportReferences (vtkGarbageCollector *)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Additional Inherited Members

- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
vtkAtomicInt32 ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Detailed Description

base64 encode and decode utilities.

vtkBase64Utilities implements base64 encoding and decoding.

Tests:
vtkBase64Utilities (Tests)

Definition at line 30 of file vtkBase64Utilities.h.

Member Typedef Documentation

Definition at line 34 of file vtkBase64Utilities.h.

Constructor & Destructor Documentation

vtkBase64Utilities::vtkBase64Utilities ( )
inlineprotected

Definition at line 112 of file vtkBase64Utilities.h.

vtkBase64Utilities::~vtkBase64Utilities ( )
inlineprotected

Definition at line 113 of file vtkBase64Utilities.h.

Member Function Documentation

static vtkBase64Utilities* vtkBase64Utilities::New ( )
static
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 vtkBase64Utilities* vtkBase64Utilities::SafeDownCast ( vtkObjectBase o)
static
virtual vtkObjectBase* vtkBase64Utilities::NewInstanceInternal ( ) const
protectedvirtual

Reimplemented from vtkObject.

vtkBase64Utilities* vtkBase64Utilities::NewInstance ( ) const
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: