VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions
vtkByteSwap Class Reference

perform machine dependent byte swapping More...

#include <vtkByteSwap.h>

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

List of all members.

Public Types

typedef vtkObject Superclass

Public Member Functions

virtual int IsA (const char *type)
vtkByteSwapNewInstance () const
 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 (vtkObjectBase *o)
static void SwapVoidRange (void *buffer, size_t numWords, size_t wordSize)
static void Swap2LE (void *p)
static void Swap4LE (void *p)
static void Swap8LE (void *p)
static void Swap2LERange (void *p, size_t num)
static void Swap4LERange (void *p, size_t num)
static void Swap8LERange (void *p, size_t num)
static bool SwapWrite2LERange (void const *p, size_t num, FILE *f)
static bool SwapWrite4LERange (void const *p, size_t num, FILE *f)
static bool SwapWrite8LERange (void const *p, size_t num, FILE *f)
static void SwapWrite2LERange (void const *p, size_t num, ostream *os)
static void SwapWrite4LERange (void const *p, size_t num, ostream *os)
static void SwapWrite8LERange (void const *p, size_t num, ostream *os)
static void Swap2BE (void *p)
static void Swap4BE (void *p)
static void Swap8BE (void *p)
static void Swap2BERange (void *p, size_t num)
static void Swap4BERange (void *p, size_t num)
static void Swap8BERange (void *p, size_t num)
static bool SwapWrite2BERange (void const *p, size_t num, FILE *f)
static bool SwapWrite4BERange (void const *p, size_t num, FILE *f)
static bool SwapWrite8BERange (void const *p, size_t num, FILE *f)
static void SwapWrite2BERange (void const *p, size_t num, ostream *os)
static void SwapWrite4BERange (void const *p, size_t num, ostream *os)
static void SwapWrite8BERange (void const *p, size_t num, ostream *os)

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 vtkByteSwap ()
 ~vtkByteSwap ()

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 32 of file vtkByteSwap.h.


Member Typedef Documentation

Reimplemented from vtkObject.

Definition at line 36 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.

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.

Reimplemented from vtkObject.

virtual vtkObjectBase* vtkByteSwap::NewInstanceInternal ( ) const [protected, virtual]

Reimplemented from vtkObject.

Reimplemented from vtkObject.

vtkByteSwap::VTK_BYTE_SWAP_DECL ( unsigned  char)
vtkByteSwap::VTK_BYTE_SWAP_DECL ( unsigned  short)
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,
size_t  num 
) [static]

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

static void vtkByteSwap::Swap4LERange ( void *  p,
size_t  num 
) [static]

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

static void vtkByteSwap::Swap8LERange ( void *  p,
size_t  num 
) [static]

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

static bool vtkByteSwap::SwapWrite2LERange ( void const *  p,
size_t  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 ( void const *  p,
size_t  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 ( void const *  p,
size_t  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 ( void const *  p,
size_t  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 ( void const *  p,
size_t  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 ( void const *  p,
size_t  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,
size_t  num 
) [static]

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

static void vtkByteSwap::Swap4BERange ( void *  p,
size_t  num 
) [static]

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

static void vtkByteSwap::Swap8BERange ( void *  p,
size_t  num 
) [static]

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

static bool vtkByteSwap::SwapWrite2BERange ( void const *  p,
size_t  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 ( void const *  p,
size_t  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 ( void const *  p,
size_t  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 ( void const *  p,
size_t  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 ( void const *  p,
size_t  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 ( void const *  p,
size_t  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,
size_t  numWords,
size_t  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: