VAXConversion.h

Classes

VAXConversion -- A class with static functions to convert VAX format (full description)

class VAXConversion

Interface

Public Members
static void toLocal (char& to, const void* from)
static void toLocal (unsigned char& to, const void* from)
static void toLocal (short& to, const void* from)
static void toLocal (unsigned short& to, const void* from)
static void toLocal (int& to, const void* from)
static void toLocal (unsigned int& to, const void* from)
static void toLocal (Int64& to, const void* from)
static void toLocal (uInt64& to, const void* from)
static void toLocal (float& to, const void* from)
static void toLocal (double& to, const void* from)
static void toLocal (char* to, const void* from, unsigned int nr)
static void toLocal (unsigned char* to, const void* from, unsigned int nr)
static void toLocal (short* to, const void* from, unsigned int nr)
static void toLocal (unsigned short* to, const void* from, unsigned int nr)
static void toLocal (int* to, const void* from, unsigned int nr)
static void toLocal (unsigned int* to, const void* from, unsigned int nr)
static void toLocal (Int64* to, const void* from, unsigned int nr)
static void toLocal (uInt64* to, const void* from, unsigned int nr)
static void toLocal (float* to, const void* from, unsigned int nr)
static void toLocal (double* to, const void* from, unsigned int nr)
static void fromLocal (void* to, char from)
static void fromLocal (void* to, unsigned char from)
static void fromLocal (void* to, short from)
static void fromLocal (void* to, unsigned short from)
static void fromLocal (void* to, int from)
static void fromLocal (void* to, unsigned int from)
static void fromLocal (void* to, Int64 from)
static void fromLocal (void* to, uInt64 from)
static void fromLocal (void* to, float from)
static void fromLocal (void* to, double from)
static void fromLocal (void* to, const char* from, unsigned int nr)
static void fromLocal (void* to, const unsigned char* from, unsigned int nr)
static void fromLocal (void* to, const short* from, unsigned int nr)
static void fromLocal (void* to, const unsigned short* from, unsigned int nr)
static void fromLocal (void* to, const int* from, unsigned int nr)
static void fromLocal (void* to, const unsigned int* from, unsigned int nr)
static void fromLocal (void* to, const Int64* from, unsigned int nr)
static void fromLocal (void* to, const uInt64* from, unsigned int nr)
static void fromLocal (void* to, const float* from, unsigned int nr)
static void fromLocal (void* to, const double* from, unsigned int nr)
static void moveFloat (void* to, const void* from)
Private Members
VAXConversion()

Description

Review Status

Reviewed By:
Friso Olnon
Date Reviewed:
1996/11/06
Programs:
Tests:

Synopsis

This class contains static toLocal functions to convert data from VAX format to local format and vice-versa. It only handles VAX D-float format. Another class should be implemented to handle VAX G-float format.

The functions work well on big-endian as well as little-endian machines.

Motivation

Archived WSRT data can be stored in the old VAX format (little-endian and VAX D-float floating point format). Conversion functions are needed to read these data.

To Do

Member Description

static void toLocal (char& to, const void* from)
static void toLocal (unsigned char& to, const void* from)
static void toLocal (short& to, const void* from)
static void toLocal (unsigned short& to, const void* from)
static void toLocal (int& to, const void* from)
static void toLocal (unsigned int& to, const void* from)
static void toLocal (Int64& to, const void* from)
static void toLocal (uInt64& to, const void* from)
static void toLocal (float& to, const void* from)
static void toLocal (double& to, const void* from)

Convert one value from VAX format to local format. The from and to buffer should not overlap.

static void toLocal (char* to, const void* from, unsigned int nr)
static void toLocal (unsigned char* to, const void* from, unsigned int nr)
static void toLocal (short* to, const void* from, unsigned int nr)
static void toLocal (unsigned short* to, const void* from, unsigned int nr)
static void toLocal (int* to, const void* from, unsigned int nr)
static void toLocal (unsigned int* to, const void* from, unsigned int nr)
static void toLocal (Int64* to, const void* from, unsigned int nr)
static void toLocal (uInt64* to, const void* from, unsigned int nr)
static void toLocal (float* to, const void* from, unsigned int nr)
static void toLocal (double* to, const void* from, unsigned int nr)

Convert nr values from VAX format to local format. The from and to buffer should not overlap.

static void fromLocal (void* to, char from)
static void fromLocal (void* to, unsigned char from)
static void fromLocal (void* to, short from)
static void fromLocal (void* to, unsigned short from)
static void fromLocal (void* to, int from)
static void fromLocal (void* to, unsigned int from)
static void fromLocal (void* to, Int64 from)
static void fromLocal (void* to, uInt64 from)
static void fromLocal (void* to, float from)
static void fromLocal (void* to, double from)

Convert one value from local format to VAX format. The from and to buffer should not overlap.

static void fromLocal (void* to, const char* from, unsigned int nr)
static void fromLocal (void* to, const unsigned char* from, unsigned int nr)
static void fromLocal (void* to, const short* from, unsigned int nr)
static void fromLocal (void* to, const unsigned short* from, unsigned int nr)
static void fromLocal (void* to, const int* from, unsigned int nr)
static void fromLocal (void* to, const unsigned int* from, unsigned int nr)
static void fromLocal (void* to, const Int64* from, unsigned int nr)
static void fromLocal (void* to, const uInt64* from, unsigned int nr)
static void fromLocal (void* to, const float* from, unsigned int nr)
static void fromLocal (void* to, const double* from, unsigned int nr)

Convert nr values from local format to VAX format. The from and to buffer should not overlap.

static void moveFloat (void* to, const void* from)

Move a float value (by swapping bytes correctly).

VAXConversion()

This class should not be constructed (so declare the constructor private).