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

perform machine dependent byte swapping More...

#include <vtkByteSwap.h>

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

Public Types

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

Public Member Functions

virtual const char * GetClassName ()
 
virtual int IsA (const char *type)
 
 VTK_BYTE_SWAP_DECL (float)
 
 VTK_BYTE_SWAP_DECL (double)
 
 VTK_BYTE_SWAP_DECL (char)
 
 VTK_BYTE_SWAP_DECL (short)
 
 VTK_BYTE_SWAP_DECL (int)
 
 VTK_BYTE_SWAP_DECL (long)
 
 VTK_BYTE_SWAP_DECL (signed char)
 
 VTK_BYTE_SWAP_DECL (unsigned char)
 
 VTK_BYTE_SWAP_DECL (unsigned short)
 
 VTK_BYTE_SWAP_DECL (unsigned int)
 
 VTK_BYTE_SWAP_DECL (unsigned long)
 
- Public Member Functions inherited from vtkObject
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)
 
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)
 
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 &os)
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
int GetReferenceCount ()
 

Static Public Member Functions

static vtkByteSwapNew ()
 
static int IsTypeOf (const char *type)
 
static vtkByteSwapSafeDownCast (vtkObject *o)
 
static void SwapVoidRange (void *buffer, int numWords, int wordSize)
 
static void Swap2LE (void *p)
 
static void Swap4LE (void *p)
 
static void Swap8LE (void *p)
 
static void Swap2LERange (void *p, int num)
 
static void Swap4LERange (void *p, int num)
 
static void Swap8LERange (void *p, int num)
 
static bool SwapWrite2LERange (const void *p, int num, FILE *f)
 
static bool SwapWrite4LERange (const void *p, int num, FILE *f)
 
static bool SwapWrite8LERange (const void *p, int num, FILE *f)
 
static void SwapWrite2LERange (const void *p, int num, ostream *os)
 
static void SwapWrite4LERange (const void *p, int num, ostream *os)
 
static void SwapWrite8LERange (const void *p, int num, ostream *os)
 
static void Swap2BE (void *p)
 
static void Swap4BE (void *p)
 
static void Swap8BE (void *p)
 
static void Swap2BERange (void *p, int num)
 
static void Swap4BERange (void *p, int num)
 
static void Swap8BERange (void *p, int num)
 
static bool SwapWrite2BERange (const void *p, int num, FILE *f)
 
static bool SwapWrite4BERange (const void *p, int num, FILE *f)
 
static bool SwapWrite8BERange (const void *p, int num, FILE *f)
 
static void SwapWrite2BERange (const void *p, int num, ostream *os)
 
static void SwapWrite4BERange (const void *p, int num, ostream *os)
 
static void SwapWrite8BERange (const void *p, int num, ostream *os)
 
- Static Public Member Functions inherited from vtkObject
static int IsTypeOf (const char *type)
 
static vtkObjectSafeDownCast (vtkObject *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

 vtkByteSwap ()
 
 ~vtkByteSwap ()
 
- 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 &os)
 
virtual void ReportReferences (vtkGarbageCollector *)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Additional Inherited Members

- Protected Attributes inherited from vtkObject
unsigned char Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
int ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Detailed Description

perform machine dependent byte swapping

vtkByteSwap is used by other classes to perform machine dependent byte swapping. Byte swapping is often used when reading or writing binary files.

Tests:
vtkByteSwap (Tests)

Definition at line 31 of file vtkByteSwap.h.

Member Typedef Documentation

Definition at line 35 of file vtkByteSwap.h.

Constructor & Destructor Documentation

vtkByteSwap::vtkByteSwap ( )
protected
vtkByteSwap::~vtkByteSwap ( )
protected

Member Function Documentation

static vtkByteSwap* vtkByteSwap::New ( )
static
virtual const char* vtkByteSwap::GetClassName ( )
virtual

Reimplemented from vtkObject.

static int vtkByteSwap::IsTypeOf ( const char *  type)
static
virtual int vtkByteSwap::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 vtkByteSwap* vtkByteSwap::SafeDownCast ( vtkObject o)
static
vtkByteSwap::VTK_BYTE_SWAP_DECL ( float  )
vtkByteSwap::VTK_BYTE_SWAP_DECL ( double  )
vtkByteSwap::VTK_BYTE_SWAP_DECL ( char  )
vtkByteSwap::VTK_BYTE_SWAP_DECL ( short  )
vtkByteSwap::VTK_BYTE_SWAP_DECL ( int  )
vtkByteSwap::VTK_BYTE_SWAP_DECL ( long  )
vtkByteSwap::VTK_BYTE_SWAP_DECL ( signed  char)
vtkByteSwap::VTK_BYTE_SWAP_DECL ( unsigned  char)
vtkByteSwap::VTK_BYTE_SWAP_DECL ( unsigned  short)
vtkByteSwap::VTK_BYTE_SWAP_DECL ( unsigned  int)
vtkByteSwap::VTK_BYTE_SWAP_DECL ( unsigned  long)
static void vtkByteSwap::Swap2LE ( void *  p)
static

Swap 2, 4, or 8 bytes for storage as Little Endian.

static void vtkByteSwap::Swap4LE ( void *  p)
static

Swap 2, 4, or 8 bytes for storage as Little Endian.

static void vtkByteSwap::Swap8LE ( void *  p)
static

Swap 2, 4, or 8 bytes for storage as Little Endian.

static void vtkByteSwap::Swap2LERange ( void *  p,
int  num 
)
static

Swap a block of 2-, 4-, or 8-byte segments for storage as Little Endian.

static void vtkByteSwap::Swap4LERange ( void *  p,
int  num 
)
static

Swap a block of 2-, 4-, or 8-byte segments for storage as Little Endian.

static void vtkByteSwap::Swap8LERange ( void *  p,
int  num 
)
static

Swap a block of 2-, 4-, or 8-byte segments for storage as Little Endian.

static bool vtkByteSwap::SwapWrite2LERange ( const void *  p,
int  num,
FILE *  f 
)
static

Swap a block of 2-, 4-, or 8-byte segments for storage as Little Endian. The results are written directly to a file to avoid temporary storage.

static bool vtkByteSwap::SwapWrite4LERange ( const void *  p,
int  num,
FILE *  f 
)
static

Swap a block of 2-, 4-, or 8-byte segments for storage as Little Endian. The results are written directly to a file to avoid temporary storage.

static bool vtkByteSwap::SwapWrite8LERange ( const void *  p,
int  num,
FILE *  f 
)
static

Swap a block of 2-, 4-, or 8-byte segments for storage as Little Endian. The results are written directly to a file to avoid temporary storage.

static void vtkByteSwap::SwapWrite2LERange ( const void *  p,
int  num,
ostream *  os 
)
static

Swap a block of 2-, 4-, or 8-byte segments for storage as Little Endian. The results are written directly to a file to avoid temporary storage.

static void vtkByteSwap::SwapWrite4LERange ( const void *  p,
int  num,
ostream *  os 
)
static

Swap a block of 2-, 4-, or 8-byte segments for storage as Little Endian. The results are written directly to a file to avoid temporary storage.

static void vtkByteSwap::SwapWrite8LERange ( const void *  p,
int  num,
ostream *  os 
)
static

Swap a block of 2-, 4-, or 8-byte segments for storage as Little Endian. The results are written directly to a file to avoid temporary storage.

static void vtkByteSwap::Swap2BE ( void *  p)
static

Swap 2, 4, or 8 bytes for storage as Big Endian.

static void vtkByteSwap::Swap4BE ( void *  p)
static

Swap 2, 4, or 8 bytes for storage as Big Endian.

static void vtkByteSwap::Swap8BE ( void *  p)
static

Swap 2, 4, or 8 bytes for storage as Big Endian.

static void vtkByteSwap::Swap2BERange ( void *  p,
int  num 
)
static

Swap a block of 2-, 4-, or 8-byte segments for storage as Big Endian.

static void vtkByteSwap::Swap4BERange ( void *  p,
int  num 
)
static

Swap a block of 2-, 4-, or 8-byte segments for storage as Big Endian.

static void vtkByteSwap::Swap8BERange ( void *  p,
int  num 
)
static

Swap a block of 2-, 4-, or 8-byte segments for storage as Big Endian.

static bool vtkByteSwap::SwapWrite2BERange ( const void *  p,
int  num,
FILE *  f 
)
static

Swap a block of 2-, 4-, or 8-byte segments for storage as Big Endian. The results are written directly to a file to avoid temporary storage.

static bool vtkByteSwap::SwapWrite4BERange ( const void *  p,
int  num,
FILE *  f 
)
static

Swap a block of 2-, 4-, or 8-byte segments for storage as Big Endian. The results are written directly to a file to avoid temporary storage.

static bool vtkByteSwap::SwapWrite8BERange ( const void *  p,
int  num,
FILE *  f 
)
static

Swap a block of 2-, 4-, or 8-byte segments for storage as Big Endian. The results are written directly to a file to avoid temporary storage.

static void vtkByteSwap::SwapWrite2BERange ( const void *  p,
int  num,
ostream *  os 
)
static

Swap a block of 2-, 4-, or 8-byte segments for storage as Big Endian. The results are written directly to a file to avoid temporary storage.

static void vtkByteSwap::SwapWrite4BERange ( const void *  p,
int  num,
ostream *  os 
)
static

Swap a block of 2-, 4-, or 8-byte segments for storage as Big Endian. The results are written directly to a file to avoid temporary storage.

static void vtkByteSwap::SwapWrite8BERange ( const void *  p,
int  num,
ostream *  os 
)
static

Swap a block of 2-, 4-, or 8-byte segments for storage as Big Endian. The results are written directly to a file to avoid temporary storage.

static void vtkByteSwap::SwapVoidRange ( void *  buffer,
int  numWords,
int  wordSize 
)
static

Swaps the bytes of a buffer. Uses an arbitrary word size, but assumes the word size is divisible by two.


The documentation for this class was generated from the following file: