vtkByteSwap Class Reference

#include <vtkByteSwap.h>

Inheritance diagram for vtkByteSwap:

Inheritance graph
[legend]
Collaboration diagram for vtkByteSwap:

Collaboration graph
[legend]

List of all members.


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.


Public Types

typedef vtkObject 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)

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)

Protected Member Functions

 vtkByteSwap ()
 ~vtkByteSwap ()

Member Typedef Documentation

Reimplemented from vtkObject.

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]

Create an object with Debug turned off, modified time initialized to zero, and reference counting on.

Reimplemented from vtkObject.

virtual const char* vtkByteSwap::GetClassName (  )  [virtual]

Reimplemented from vtkObject.

static int vtkByteSwap::IsTypeOf ( const char *  name  )  [static]

Return 1 if this class type 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.

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]

Reimplemented from vtkObject.

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:

Generated on Wed Aug 24 11:30:09 2011 for VTK by  doxygen 1.5.6