27#include "vtkCommonCoreModule.h"
43#define VTK_BYTE_SWAP_DECL(T) \
44 static void SwapLE(T* p); \
45 static void SwapBE(T* p); \
46 static void SwapLERange(T* p, size_t num); \
47 static void SwapBERange(T* p, size_t num); \
48 static bool SwapLERangeWrite(const T* p, size_t num, FILE* file); \
49 static bool SwapBERangeWrite(const T* p, size_t num, FILE* file); \
50 static void SwapLERangeWrite(const T* p, size_t num, ostream* os); \
51 static void SwapBERangeWrite(const T* p, size_t num, ostream* os)
65#undef VTK_BYTE_SWAP_DECL
perform machine dependent byte swapping
static void SwapWrite2LERange(void const *p, size_t num, ostream *os)
Swap a block of 2-, 4-, or 8-byte segments for storage as Little Endian.
static bool SwapWrite4BERange(void const *p, size_t num, FILE *f)
Swap a block of 2-, 4-, or 8-byte segments for storage as Big Endian.
static void Swap2BERange(void *p, size_t num)
Swap a block of 2-, 4-, or 8-byte segments for storage as Big Endian.
static bool SwapWrite2LERange(void const *p, size_t num, FILE *f)
Swap a block of 2-, 4-, or 8-byte segments for storage as Little Endian.
VTK_BYTE_SWAP_DECL(unsigned char)
VTK_BYTE_SWAP_DECL(float)
VTK_BYTE_SWAP_DECL(double)
static bool SwapWrite8BERange(void const *p, size_t num, FILE *f)
Swap a block of 2-, 4-, or 8-byte segments for storage as Big Endian.
VTK_BYTE_SWAP_DECL(unsigned short)
VTK_BYTE_SWAP_DECL(unsigned long long)
VTK_BYTE_SWAP_DECL(unsigned long)
static bool SwapWrite2BERange(void const *p, size_t num, FILE *f)
Swap a block of 2-, 4-, or 8-byte segments for storage as Big Endian.
static vtkByteSwap * New()
static void SwapWrite8BERange(void const *p, size_t num, ostream *os)
Swap a block of 2-, 4-, or 8-byte segments for storage as Big Endian.
static void Swap8LE(void *p)
Swap 2, 4, or 8 bytes for storage as Little Endian.
VTK_BYTE_SWAP_DECL(short)
static void Swap4BERange(void *p, size_t num)
Swap a block of 2-, 4-, or 8-byte segments for storage as Big Endian.
static void Swap4BE(void *p)
Swap 2, 4, or 8 bytes for storage as Big Endian.
static void Swap4LE(void *p)
Swap 2, 4, or 8 bytes for storage as Little Endian.
static void Swap2LERange(void *p, size_t num)
Swap a block of 2-, 4-, or 8-byte segments for storage as Little Endian.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static void SwapWrite4BERange(void const *p, size_t num, ostream *os)
Swap a block of 2-, 4-, or 8-byte segments for storage as Big Endian.
static void Swap8BE(void *p)
Swap 2, 4, or 8 bytes for storage as Big Endian.
static void Swap2BE(void *p)
Swap 2, 4, or 8 bytes for storage as Big Endian.
static void SwapWrite4LERange(void const *p, size_t num, ostream *os)
Swap a block of 2-, 4-, or 8-byte segments for storage as Little Endian.
static void SwapWrite8LERange(void const *p, size_t num, ostream *os)
Swap a block of 2-, 4-, or 8-byte segments for storage as Little Endian.
static void Swap8LERange(void *p, size_t num)
Swap a block of 2-, 4-, or 8-byte segments for storage as Little Endian.
static bool SwapWrite8LERange(void const *p, size_t num, FILE *f)
Swap a block of 2-, 4-, or 8-byte segments for storage as Little Endian.
static void Swap8BERange(void *p, size_t num)
Swap a block of 2-, 4-, or 8-byte segments for storage as Big Endian.
VTK_BYTE_SWAP_DECL(unsigned int)
static bool SwapWrite4LERange(void const *p, size_t num, FILE *f)
Swap a block of 2-, 4-, or 8-byte segments for storage as Little Endian.
static void Swap4LERange(void *p, size_t num)
Swap a block of 2-, 4-, or 8-byte segments for storage as Little Endian.
static void SwapWrite2BERange(void const *p, size_t num, ostream *os)
Swap a block of 2-, 4-, or 8-byte segments for storage as Big Endian.
static void SwapVoidRange(void *buffer, size_t numWords, size_t wordSize)
Swaps the bytes of a buffer.
VTK_BYTE_SWAP_DECL(signed char)
static void Swap2LE(void *p)
Swap 2, 4, or 8 bytes for storage as Little Endian.
VTK_BYTE_SWAP_DECL(long long)
a simple class to control print indentation
abstract base class for most VTK objects