casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Static Public Member Functions | Private Member Functions
casa::LECanonicalConversion Class Reference

A class with static functions to convert little endian canonical format. More...

#include <LECanonicalConversion.h>

List of all members.

Static Public Member Functions

static unsigned int toLocal (char &to, const void *from)
 Convert one value from canonical format to local format.
static unsigned int toLocal (unsigned char &to, const void *from)
static unsigned int toLocal (short &to, const void *from)
static unsigned int toLocal (unsigned short &to, const void *from)
static unsigned int toLocal (int &to, const void *from)
static unsigned int toLocal (unsigned int &to, const void *from)
static unsigned int toLocal (Int64 &to, const void *from)
static unsigned int toLocal (uInt64 &to, const void *from)
static unsigned int toLocal (float &to, const void *from)
static unsigned int toLocal (double &to, const void *from)
static unsigned int fromLocal (void *to, const char &from)
 Convert one value from local format to canonical format.
static unsigned int fromLocal (void *to, const unsigned char &from)
static unsigned int fromLocal (void *to, const short &from)
static unsigned int fromLocal (void *to, const unsigned short &from)
static unsigned int fromLocal (void *to, const int &from)
static unsigned int fromLocal (void *to, const unsigned int &from)
static unsigned int fromLocal (void *to, const Int64 &from)
static unsigned int fromLocal (void *to, const uInt64 &from)
static unsigned int fromLocal (void *to, const float &from)
static unsigned int fromLocal (void *to, const double &from)
static unsigned int toLocal (char *to, const void *from, unsigned int nr)
 Convert nr values from canonical format to local format.
static unsigned int toLocal (unsigned char *to, const void *from, unsigned int nr)
static unsigned int toLocal (short *to, const void *from, unsigned int nr)
static unsigned int toLocal (unsigned short *to, const void *from, unsigned int nr)
static unsigned int toLocal (int *to, const void *from, unsigned int nr)
static unsigned int toLocal (unsigned int *to, const void *from, unsigned int nr)
static unsigned int toLocal (Int64 *to, const void *from, unsigned int nr)
static unsigned int toLocal (uInt64 *to, const void *from, unsigned int nr)
static unsigned int toLocal (float *to, const void *from, unsigned int nr)
static unsigned int toLocal (double *to, const void *from, unsigned int nr)
static unsigned int fromLocal (void *to, const char *from, unsigned int nr)
 Convert nr values from local format to canonical format.
static unsigned int fromLocal (void *to, const unsigned char *from, unsigned int nr)
static unsigned int fromLocal (void *to, const short *from, unsigned int nr)
static unsigned int fromLocal (void *to, const unsigned short *from, unsigned int nr)
static unsigned int fromLocal (void *to, const int *from, unsigned int nr)
static unsigned int fromLocal (void *to, const unsigned int *from, unsigned int nr)
static unsigned int fromLocal (void *to, const Int64 *from, unsigned int nr)
static unsigned int fromLocal (void *to, const uInt64 *from, unsigned int nr)
static unsigned int fromLocal (void *to, const float *from, unsigned int nr)
static unsigned int fromLocal (void *to, const double *from, unsigned int nr)
static unsigned int toLocalChar (void *to, const void *from, unsigned int nr)
 Convert nr values from canonical format to local format.
static unsigned int toLocalUChar (void *to, const void *from, unsigned int nr)
static unsigned int toLocalShort (void *to, const void *from, unsigned int nr)
static unsigned int toLocalUShort (void *to, const void *from, unsigned int nr)
static unsigned int toLocalInt (void *to, const void *from, unsigned int nr)
static unsigned int toLocalUInt (void *to, const void *from, unsigned int nr)
static unsigned int toLocalInt64 (void *to, const void *from, unsigned int nr)
static unsigned int toLocalUInt64 (void *to, const void *from, unsigned int nr)
static unsigned int toLocalFloat (void *to, const void *from, unsigned int nr)
static unsigned int toLocalDouble (void *to, const void *from, unsigned int nr)
static unsigned int fromLocalChar (void *to, const void *from, unsigned int nr)
 Convert nr values from local format to canonical format.
static unsigned int fromLocalUChar (void *to, const void *from, unsigned int nr)
static unsigned int fromLocalShort (void *to, const void *from, unsigned int nr)
static unsigned int fromLocalUShort (void *to, const void *from, unsigned int nr)
static unsigned int fromLocalInt (void *to, const void *from, unsigned int nr)
static unsigned int fromLocalUInt (void *to, const void *from, unsigned int nr)
static unsigned int fromLocalInt64 (void *to, const void *from, unsigned int nr)
static unsigned int fromLocalUInt64 (void *to, const void *from, unsigned int nr)
static unsigned int fromLocalFloat (void *to, const void *from, unsigned int nr)
static unsigned int fromLocalDouble (void *to, const void *from, unsigned int nr)
static void * byteToLocalChar (void *to, const void *from, unsigned int nrbytes)
 Convert values from canonical format to local format.
static void * byteToLocalUChar (void *to, const void *from, unsigned int nrbytes)
static void * byteToLocalShort (void *to, const void *from, unsigned int nrbytes)
static void * byteToLocalUShort (void *to, const void *from, unsigned int nrbytes)
static void * byteToLocalInt (void *to, const void *from, unsigned int nrbytes)
static void * byteToLocalUInt (void *to, const void *from, unsigned int nrbytes)
static void * byteToLocalInt64 (void *to, const void *from, unsigned int nrbytes)
static void * byteToLocalUInt64 (void *to, const void *from, unsigned int nrbytes)
static void * byteToLocalFloat (void *to, const void *from, unsigned int nrbytes)
static void * byteToLocalDouble (void *to, const void *from, unsigned int nrbytes)
static void * byteFromLocalChar (void *to, const void *from, unsigned int nrbytes)
 Convert values from local format to canonical format.
static void * byteFromLocalUChar (void *to, const void *from, unsigned int nrbytes)
static void * byteFromLocalShort (void *to, const void *from, unsigned int nrbytes)
static void * byteFromLocalUShort (void *to, const void *from, unsigned int nrbytes)
static void * byteFromLocalInt (void *to, const void *from, unsigned int nrbytes)
static void * byteFromLocalUInt (void *to, const void *from, unsigned int nrbytes)
static void * byteFromLocalInt64 (void *to, const void *from, unsigned int nrbytes)
static void * byteFromLocalUInt64 (void *to, const void *from, unsigned int nrbytes)
static void * byteFromLocalFloat (void *to, const void *from, unsigned int nrbytes)
static void * byteFromLocalDouble (void *to, const void *from, unsigned int nrbytes)
static Conversion::ValueFunctiongetToLocal (const char *)
 Get the value conversion function for the given type.
static Conversion::ValueFunctiongetToLocal (const unsigned char *)
static Conversion::ValueFunctiongetToLocal (const short *)
static Conversion::ValueFunctiongetToLocal (const unsigned short *)
static Conversion::ValueFunctiongetToLocal (const int *)
static Conversion::ValueFunctiongetToLocal (const unsigned int *)
static Conversion::ValueFunctiongetToLocal (const Int64 *)
static Conversion::ValueFunctiongetToLocal (const uInt64 *)
static Conversion::ValueFunctiongetToLocal (const float *)
static Conversion::ValueFunctiongetToLocal (const double *)
static Conversion::ValueFunctiongetFromLocal (const char *)
static Conversion::ValueFunctiongetFromLocal (const unsigned char *)
static Conversion::ValueFunctiongetFromLocal (const short *)
static Conversion::ValueFunctiongetFromLocal (const unsigned short *)
static Conversion::ValueFunctiongetFromLocal (const int *)
static Conversion::ValueFunctiongetFromLocal (const unsigned int *)
static Conversion::ValueFunctiongetFromLocal (const Int64 *)
static Conversion::ValueFunctiongetFromLocal (const uInt64 *)
static Conversion::ValueFunctiongetFromLocal (const float *)
static Conversion::ValueFunctiongetFromLocal (const double *)
static Conversion::ByteFunctiongetByteToLocal (const char *)
 Get the byte conversion function for the given type.
static Conversion::ByteFunctiongetByteToLocal (const unsigned char *)
static Conversion::ByteFunctiongetByteToLocal (const short *)
static Conversion::ByteFunctiongetByteToLocal (const unsigned short *)
static Conversion::ByteFunctiongetByteToLocal (const int *)
static Conversion::ByteFunctiongetByteToLocal (const unsigned int *)
static Conversion::ByteFunctiongetByteToLocal (const Int64 *)
static Conversion::ByteFunctiongetByteToLocal (const uInt64 *)
static Conversion::ByteFunctiongetByteToLocal (const float *)
static Conversion::ByteFunctiongetByteToLocal (const double *)
static Conversion::ByteFunctiongetByteFromLocal (const char *)
static Conversion::ByteFunctiongetByteFromLocal (const unsigned char *)
static Conversion::ByteFunctiongetByteFromLocal (const short *)
static Conversion::ByteFunctiongetByteFromLocal (const unsigned short *)
static Conversion::ByteFunctiongetByteFromLocal (const int *)
static Conversion::ByteFunctiongetByteFromLocal (const unsigned int *)
static Conversion::ByteFunctiongetByteFromLocal (const Int64 *)
static Conversion::ByteFunctiongetByteFromLocal (const uInt64 *)
static Conversion::ByteFunctiongetByteFromLocal (const float *)
static Conversion::ByteFunctiongetByteFromLocal (const double *)
static unsigned int canonicalSize (const char *)
 Return the canonical length for the various data types.
static unsigned int canonicalSize (const unsigned char *)
static unsigned int canonicalSize (const short *)
static unsigned int canonicalSize (const unsigned short *)
static unsigned int canonicalSize (const int *)
static unsigned int canonicalSize (const unsigned int *)
static unsigned int canonicalSize (const Int64 *)
static unsigned int canonicalSize (const uInt64 *)
static unsigned int canonicalSize (const float *)
static unsigned int canonicalSize (const double *)
static void reverse2 (void *to, const void *from)
 Reverse 2 bytes.
static void reverse4 (void *to, const void *from)
 Reverse 4 bytes.
static void reverse8 (void *to, const void *from)
 Reverse 8 bytes.
static void move2 (void *to, const void *from)
 Move 2 bytes.
static void move4 (void *to, const void *from)
 Move 4 bytes.
static void move8 (void *to, const void *from)
 Move 8 bytes.

Private Member Functions

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

Detailed Description

A class with static functions to convert little endian canonical format.

Intended use:

Public interface

Review Status

Reviewed By:
Friso Olnon
Date Reviewed:
1996/11/06
Test programs:
tLECanonicalConversion

Synopsis

This class consists of several static functions to convert data from local (=native) format to a little endian canonical format. The canonical length of each data type is:
- Bool: 1 bit
- char: 1 byte
- short: 2 bytes
- int: 4 bytes
- Int64: 8 bytes
- float: 4 bytes
- double: 8 bytes
This canonical format is little-endian IEEE format, so on PCs the conversion is only a copy operation. On e.g. SUNs however, it involves a byte swap to convert from little endian to big endian.

The class also contains conversion functions making it possible to specify the number of bytes (in local format) instead of the number of values. These functions are included to make it possible to have the same signature as memcpy.

The current implementation of this class works on big- and little-endian machines using IEEE format. When using on other machines (e.g. VAX) the toLocal and fromLocal functions have to be changed.

Note that no functions are provided to handle Bools. Instead class Conversion provides functions to convert Bools to/from bits.

Example

    void someFunction (const uInt* data, uInt nrval)
    {
        char* buffer = new char[nrval*LECanonicalConversion::canonicalSize(data)];
        LECanonicalConversion::fromLocal (buffer, data, nrval);
        ...\.
        delete [] buffer;
    }

Motivation

AIPS++ data will be stored in a canonical format. To read these data conversion functions are needed. However, these functions do not use any other AIPS++ classes, so they can easily be used in any other software system.

To Do

Definition at line 159 of file LECanonicalConversion.h.


Constructor & Destructor Documentation

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


Member Function Documentation

static void* casa::LECanonicalConversion::byteFromLocalChar ( void *  to,
const void *  from,
unsigned int  nrbytes 
) [static]

Convert values from local format to canonical format.

The from and to buffer should not overlap. The number of values involved is determined from the argument nrbytes, which gives the number of bytes in local format. The signature of this function is the same as memcpy, so that memcpy can directly be used if no conversion is needed.

static void* casa::LECanonicalConversion::byteFromLocalDouble ( void *  to,
const void *  from,
unsigned int  nrbytes 
) [static]
static void* casa::LECanonicalConversion::byteFromLocalFloat ( void *  to,
const void *  from,
unsigned int  nrbytes 
) [static]
static void* casa::LECanonicalConversion::byteFromLocalInt ( void *  to,
const void *  from,
unsigned int  nrbytes 
) [static]
static void* casa::LECanonicalConversion::byteFromLocalInt64 ( void *  to,
const void *  from,
unsigned int  nrbytes 
) [static]
static void* casa::LECanonicalConversion::byteFromLocalShort ( void *  to,
const void *  from,
unsigned int  nrbytes 
) [static]
static void* casa::LECanonicalConversion::byteFromLocalUChar ( void *  to,
const void *  from,
unsigned int  nrbytes 
) [static]
static void* casa::LECanonicalConversion::byteFromLocalUInt ( void *  to,
const void *  from,
unsigned int  nrbytes 
) [static]
static void* casa::LECanonicalConversion::byteFromLocalUInt64 ( void *  to,
const void *  from,
unsigned int  nrbytes 
) [static]
static void* casa::LECanonicalConversion::byteFromLocalUShort ( void *  to,
const void *  from,
unsigned int  nrbytes 
) [static]
static void* casa::LECanonicalConversion::byteToLocalChar ( void *  to,
const void *  from,
unsigned int  nrbytes 
) [static]

Convert values from canonical format to local format.

The from and to buffer should not overlap. The number of values involved is determined from the argument nrbytes, which gives the number of bytes in local format. The signature of this function is the same as memcpy, so that memcpy can directly be used if no conversion is needed.

static void* casa::LECanonicalConversion::byteToLocalDouble ( void *  to,
const void *  from,
unsigned int  nrbytes 
) [static]
static void* casa::LECanonicalConversion::byteToLocalFloat ( void *  to,
const void *  from,
unsigned int  nrbytes 
) [static]
static void* casa::LECanonicalConversion::byteToLocalInt ( void *  to,
const void *  from,
unsigned int  nrbytes 
) [static]
static void* casa::LECanonicalConversion::byteToLocalInt64 ( void *  to,
const void *  from,
unsigned int  nrbytes 
) [static]
static void* casa::LECanonicalConversion::byteToLocalShort ( void *  to,
const void *  from,
unsigned int  nrbytes 
) [static]
static void* casa::LECanonicalConversion::byteToLocalUChar ( void *  to,
const void *  from,
unsigned int  nrbytes 
) [static]
static void* casa::LECanonicalConversion::byteToLocalUInt ( void *  to,
const void *  from,
unsigned int  nrbytes 
) [static]
static void* casa::LECanonicalConversion::byteToLocalUInt64 ( void *  to,
const void *  from,
unsigned int  nrbytes 
) [static]
static void* casa::LECanonicalConversion::byteToLocalUShort ( void *  to,
const void *  from,
unsigned int  nrbytes 
) [static]
unsigned int casa::LECanonicalConversion::canonicalSize ( const char *  ) [inline, static]

Return the canonical length for the various data types.

Definition at line 952 of file LECanonicalConversion.h.

References SIZE_LECAN_CHAR.

unsigned int casa::LECanonicalConversion::canonicalSize ( const unsigned char *  ) [inline, static]

Definition at line 954 of file LECanonicalConversion.h.

References SIZE_LECAN_UCHAR.

unsigned int casa::LECanonicalConversion::canonicalSize ( const short *  ) [inline, static]

Definition at line 956 of file LECanonicalConversion.h.

References SIZE_LECAN_SHORT.

unsigned int casa::LECanonicalConversion::canonicalSize ( const unsigned short *  ) [inline, static]

Definition at line 958 of file LECanonicalConversion.h.

References SIZE_LECAN_USHORT.

unsigned int casa::LECanonicalConversion::canonicalSize ( const int *  ) [inline, static]

Definition at line 960 of file LECanonicalConversion.h.

References SIZE_LECAN_INT.

unsigned int casa::LECanonicalConversion::canonicalSize ( const unsigned int *  ) [inline, static]

Definition at line 962 of file LECanonicalConversion.h.

References SIZE_LECAN_UINT.

unsigned int casa::LECanonicalConversion::canonicalSize ( const Int64 ) [inline, static]

Definition at line 964 of file LECanonicalConversion.h.

References SIZE_LECAN_INT64.

unsigned int casa::LECanonicalConversion::canonicalSize ( const uInt64 ) [inline, static]

Definition at line 966 of file LECanonicalConversion.h.

References SIZE_LECAN_UINT64.

unsigned int casa::LECanonicalConversion::canonicalSize ( const float *  ) [inline, static]

Definition at line 968 of file LECanonicalConversion.h.

References SIZE_LECAN_FLOAT.

unsigned int casa::LECanonicalConversion::canonicalSize ( const double *  ) [inline, static]

Definition at line 970 of file LECanonicalConversion.h.

References SIZE_LECAN_DOUBLE.

unsigned int casa::LECanonicalConversion::fromLocal ( void *  to,
const char &  from 
) [inline, static]

Convert one value from local format to canonical format.

The from and to buffer should not overlap.

Definition at line 624 of file LECanonicalConversion.h.

References SIZE_LECAN_CHAR.

unsigned int casa::LECanonicalConversion::fromLocal ( void *  to,
const unsigned char &  from 
) [inline, static]

Definition at line 630 of file LECanonicalConversion.h.

References SIZE_LECAN_UCHAR.

unsigned int casa::LECanonicalConversion::fromLocal ( void *  to,
const short &  from 
) [inline, static]

Definition at line 637 of file LECanonicalConversion.h.

References move2(), reverse2(), and SIZE_LECAN_SHORT.

unsigned int casa::LECanonicalConversion::fromLocal ( void *  to,
const unsigned short &  from 
) [inline, static]

Definition at line 648 of file LECanonicalConversion.h.

References move2(), reverse2(), and SIZE_LECAN_USHORT.

unsigned int casa::LECanonicalConversion::fromLocal ( void *  to,
const int &  from 
) [inline, static]

Definition at line 659 of file LECanonicalConversion.h.

References move4(), reverse4(), and SIZE_LECAN_INT.

unsigned int casa::LECanonicalConversion::fromLocal ( void *  to,
const unsigned int &  from 
) [inline, static]

Definition at line 670 of file LECanonicalConversion.h.

References move4(), reverse4(), and SIZE_LECAN_UINT.

unsigned int casa::LECanonicalConversion::fromLocal ( void *  to,
const Int64 from 
) [inline, static]

Definition at line 681 of file LECanonicalConversion.h.

References move8(), reverse8(), and SIZE_LECAN_INT64.

unsigned int casa::LECanonicalConversion::fromLocal ( void *  to,
const uInt64 from 
) [inline, static]

Definition at line 692 of file LECanonicalConversion.h.

References move8(), reverse8(), and SIZE_LECAN_UINT64.

unsigned int casa::LECanonicalConversion::fromLocal ( void *  to,
const float &  from 
) [inline, static]

Definition at line 703 of file LECanonicalConversion.h.

References move4(), reverse4(), and SIZE_LECAN_FLOAT.

unsigned int casa::LECanonicalConversion::fromLocal ( void *  to,
const double &  from 
) [inline, static]

Definition at line 714 of file LECanonicalConversion.h.

References move8(), reverse8(), and SIZE_LECAN_FLOAT.

unsigned int casa::LECanonicalConversion::fromLocal ( void *  to,
const char *  from,
unsigned int  nr 
) [inline, static]

Convert nr values from local format to canonical format.

The from and to buffer should not overlap.

Definition at line 787 of file LECanonicalConversion.h.

References fromLocalChar().

unsigned int casa::LECanonicalConversion::fromLocal ( void *  to,
const unsigned char *  from,
unsigned int  nr 
) [inline, static]

Definition at line 793 of file LECanonicalConversion.h.

References fromLocalUChar().

unsigned int casa::LECanonicalConversion::fromLocal ( void *  to,
const short *  from,
unsigned int  nr 
) [inline, static]

Definition at line 799 of file LECanonicalConversion.h.

References fromLocalShort().

unsigned int casa::LECanonicalConversion::fromLocal ( void *  to,
const unsigned short *  from,
unsigned int  nr 
) [inline, static]

Definition at line 805 of file LECanonicalConversion.h.

References fromLocalUShort().

unsigned int casa::LECanonicalConversion::fromLocal ( void *  to,
const int *  from,
unsigned int  nr 
) [inline, static]

Definition at line 811 of file LECanonicalConversion.h.

References fromLocalInt().

unsigned int casa::LECanonicalConversion::fromLocal ( void *  to,
const unsigned int *  from,
unsigned int  nr 
) [inline, static]

Definition at line 817 of file LECanonicalConversion.h.

References fromLocalUInt().

unsigned int casa::LECanonicalConversion::fromLocal ( void *  to,
const Int64 from,
unsigned int  nr 
) [inline, static]

Definition at line 823 of file LECanonicalConversion.h.

References fromLocalInt64().

unsigned int casa::LECanonicalConversion::fromLocal ( void *  to,
const uInt64 from,
unsigned int  nr 
) [inline, static]

Definition at line 829 of file LECanonicalConversion.h.

References fromLocalUInt64().

unsigned int casa::LECanonicalConversion::fromLocal ( void *  to,
const float *  from,
unsigned int  nr 
) [inline, static]

Definition at line 835 of file LECanonicalConversion.h.

References fromLocalFloat().

unsigned int casa::LECanonicalConversion::fromLocal ( void *  to,
const double *  from,
unsigned int  nr 
) [inline, static]

Definition at line 841 of file LECanonicalConversion.h.

References fromLocalDouble().

static unsigned int casa::LECanonicalConversion::fromLocalChar ( void *  to,
const void *  from,
unsigned int  nr 
) [static]

Convert nr values from local format to canonical format.

The from and to buffer should not overlap.

Referenced by fromLocal().

static unsigned int casa::LECanonicalConversion::fromLocalDouble ( void *  to,
const void *  from,
unsigned int  nr 
) [static]

Referenced by fromLocal().

static unsigned int casa::LECanonicalConversion::fromLocalFloat ( void *  to,
const void *  from,
unsigned int  nr 
) [static]

Referenced by fromLocal().

static unsigned int casa::LECanonicalConversion::fromLocalInt ( void *  to,
const void *  from,
unsigned int  nr 
) [static]

Referenced by fromLocal().

static unsigned int casa::LECanonicalConversion::fromLocalInt64 ( void *  to,
const void *  from,
unsigned int  nr 
) [static]

Referenced by fromLocal().

static unsigned int casa::LECanonicalConversion::fromLocalShort ( void *  to,
const void *  from,
unsigned int  nr 
) [static]

Referenced by fromLocal().

static unsigned int casa::LECanonicalConversion::fromLocalUChar ( void *  to,
const void *  from,
unsigned int  nr 
) [static]

Referenced by fromLocal().

static unsigned int casa::LECanonicalConversion::fromLocalUInt ( void *  to,
const void *  from,
unsigned int  nr 
) [static]

Referenced by fromLocal().

static unsigned int casa::LECanonicalConversion::fromLocalUInt64 ( void *  to,
const void *  from,
unsigned int  nr 
) [static]

Referenced by fromLocal().

static unsigned int casa::LECanonicalConversion::fromLocalUShort ( void *  to,
const void *  from,
unsigned int  nr 
) [static]

Referenced by fromLocal().

static Conversion::ByteFunction* casa::LECanonicalConversion::getByteFromLocal ( const unsigned char *  ) [static]
static Conversion::ByteFunction* casa::LECanonicalConversion::getByteFromLocal ( const unsigned short *  ) [static]
static Conversion::ByteFunction* casa::LECanonicalConversion::getByteFromLocal ( const unsigned int *  ) [static]

Get the byte conversion function for the given type.

The function memcpy is returned when a conversion is not needed.

static Conversion::ByteFunction* casa::LECanonicalConversion::getByteToLocal ( const unsigned char *  ) [static]
static Conversion::ByteFunction* casa::LECanonicalConversion::getByteToLocal ( const unsigned short *  ) [static]
static Conversion::ByteFunction* casa::LECanonicalConversion::getByteToLocal ( const unsigned int *  ) [static]

Definition at line 901 of file LECanonicalConversion.h.

Conversion::ValueFunction * casa::LECanonicalConversion::getFromLocal ( const unsigned char *  ) [inline, static]

Definition at line 906 of file LECanonicalConversion.h.

Definition at line 911 of file LECanonicalConversion.h.

Conversion::ValueFunction * casa::LECanonicalConversion::getFromLocal ( const unsigned short *  ) [inline, static]

Definition at line 916 of file LECanonicalConversion.h.

Definition at line 921 of file LECanonicalConversion.h.

Conversion::ValueFunction * casa::LECanonicalConversion::getFromLocal ( const unsigned int *  ) [inline, static]

Definition at line 926 of file LECanonicalConversion.h.

Definition at line 931 of file LECanonicalConversion.h.

Definition at line 936 of file LECanonicalConversion.h.

Definition at line 941 of file LECanonicalConversion.h.

Definition at line 946 of file LECanonicalConversion.h.

Get the value conversion function for the given type.

Definition at line 850 of file LECanonicalConversion.h.

Conversion::ValueFunction * casa::LECanonicalConversion::getToLocal ( const unsigned char *  ) [inline, static]

Definition at line 855 of file LECanonicalConversion.h.

Definition at line 860 of file LECanonicalConversion.h.

Conversion::ValueFunction * casa::LECanonicalConversion::getToLocal ( const unsigned short *  ) [inline, static]

Definition at line 865 of file LECanonicalConversion.h.

Definition at line 870 of file LECanonicalConversion.h.

Conversion::ValueFunction * casa::LECanonicalConversion::getToLocal ( const unsigned int *  ) [inline, static]

Definition at line 875 of file LECanonicalConversion.h.

Definition at line 880 of file LECanonicalConversion.h.

Definition at line 885 of file LECanonicalConversion.h.

Definition at line 890 of file LECanonicalConversion.h.

Conversion::ValueFunction * casa::LECanonicalConversion::getToLocal ( const double *  ) [inline, static]

Definition at line 895 of file LECanonicalConversion.h.

void casa::LECanonicalConversion::move2 ( void *  to,
const void *  from 
) [inline, static]

Move 2 bytes.

Definition at line 465 of file LECanonicalConversion.h.

Referenced by fromLocal(), and toLocal().

void casa::LECanonicalConversion::move4 ( void *  to,
const void *  from 
) [inline, static]

Move 4 bytes.

Definition at line 470 of file LECanonicalConversion.h.

Referenced by fromLocal(), and toLocal().

void casa::LECanonicalConversion::move8 ( void *  to,
const void *  from 
) [inline, static]

Move 8 bytes.

Definition at line 477 of file LECanonicalConversion.h.

Referenced by fromLocal(), and toLocal().

void casa::LECanonicalConversion::reverse2 ( void *  to,
const void *  from 
) [inline, static]

Reverse 2 bytes.

Definition at line 441 of file LECanonicalConversion.h.

Referenced by fromLocal(), and toLocal().

void casa::LECanonicalConversion::reverse4 ( void *  to,
const void *  from 
) [inline, static]

Reverse 4 bytes.

Definition at line 446 of file LECanonicalConversion.h.

Referenced by fromLocal(), and toLocal().

void casa::LECanonicalConversion::reverse8 ( void *  to,
const void *  from 
) [inline, static]

Reverse 8 bytes.

Definition at line 453 of file LECanonicalConversion.h.

Referenced by fromLocal(), and toLocal().

unsigned int casa::LECanonicalConversion::toLocal ( char &  to,
const void *  from 
) [inline, static]

Convert one value from canonical format to local format.

The from and to buffer should not overlap.

Definition at line 491 of file LECanonicalConversion.h.

References SIZE_LECAN_CHAR.

unsigned int casa::LECanonicalConversion::toLocal ( unsigned char &  to,
const void *  from 
) [inline, static]

Definition at line 498 of file LECanonicalConversion.h.

References SIZE_LECAN_UCHAR.

unsigned int casa::LECanonicalConversion::toLocal ( short &  to,
const void *  from 
) [inline, static]

Definition at line 505 of file LECanonicalConversion.h.

References move2(), reverse2(), and SIZE_LECAN_SHORT.

unsigned int casa::LECanonicalConversion::toLocal ( unsigned short &  to,
const void *  from 
) [inline, static]

Definition at line 523 of file LECanonicalConversion.h.

References move2(), reverse2(), and SIZE_LECAN_USHORT.

unsigned int casa::LECanonicalConversion::toLocal ( int &  to,
const void *  from 
) [inline, static]

Definition at line 537 of file LECanonicalConversion.h.

References move4(), reverse4(), and SIZE_LECAN_INT.

unsigned int casa::LECanonicalConversion::toLocal ( unsigned int &  to,
const void *  from 
) [inline, static]

Definition at line 555 of file LECanonicalConversion.h.

References move4(), reverse4(), and SIZE_LECAN_UINT.

unsigned int casa::LECanonicalConversion::toLocal ( Int64 to,
const void *  from 
) [inline, static]

Definition at line 569 of file LECanonicalConversion.h.

References move8(), reverse8(), and SIZE_LECAN_INT64.

unsigned int casa::LECanonicalConversion::toLocal ( uInt64 to,
const void *  from 
) [inline, static]

Definition at line 587 of file LECanonicalConversion.h.

References move8(), reverse8(), and SIZE_LECAN_UINT64.

unsigned int casa::LECanonicalConversion::toLocal ( float &  to,
const void *  from 
) [inline, static]

Definition at line 601 of file LECanonicalConversion.h.

References move4(), reverse4(), and SIZE_LECAN_FLOAT.

unsigned int casa::LECanonicalConversion::toLocal ( double &  to,
const void *  from 
) [inline, static]

Definition at line 612 of file LECanonicalConversion.h.

References move8(), reverse8(), and SIZE_LECAN_DOUBLE.

unsigned int casa::LECanonicalConversion::toLocal ( char *  to,
const void *  from,
unsigned int  nr 
) [inline, static]

Convert nr values from canonical format to local format.

The from and to buffer should not overlap.

Definition at line 726 of file LECanonicalConversion.h.

References toLocalChar().

unsigned int casa::LECanonicalConversion::toLocal ( unsigned char *  to,
const void *  from,
unsigned int  nr 
) [inline, static]

Definition at line 732 of file LECanonicalConversion.h.

References toLocalUChar().

unsigned int casa::LECanonicalConversion::toLocal ( short *  to,
const void *  from,
unsigned int  nr 
) [inline, static]

Definition at line 738 of file LECanonicalConversion.h.

References toLocalShort().

unsigned int casa::LECanonicalConversion::toLocal ( unsigned short *  to,
const void *  from,
unsigned int  nr 
) [inline, static]

Definition at line 744 of file LECanonicalConversion.h.

References toLocalUShort().

unsigned int casa::LECanonicalConversion::toLocal ( int *  to,
const void *  from,
unsigned int  nr 
) [inline, static]

Definition at line 750 of file LECanonicalConversion.h.

References toLocalInt().

unsigned int casa::LECanonicalConversion::toLocal ( unsigned int *  to,
const void *  from,
unsigned int  nr 
) [inline, static]

Definition at line 756 of file LECanonicalConversion.h.

References toLocalUInt().

unsigned int casa::LECanonicalConversion::toLocal ( Int64 to,
const void *  from,
unsigned int  nr 
) [inline, static]

Definition at line 762 of file LECanonicalConversion.h.

References toLocalInt64().

unsigned int casa::LECanonicalConversion::toLocal ( uInt64 to,
const void *  from,
unsigned int  nr 
) [inline, static]

Definition at line 768 of file LECanonicalConversion.h.

References toLocalUInt64().

unsigned int casa::LECanonicalConversion::toLocal ( float *  to,
const void *  from,
unsigned int  nr 
) [inline, static]

Definition at line 774 of file LECanonicalConversion.h.

References toLocalFloat().

unsigned int casa::LECanonicalConversion::toLocal ( double *  to,
const void *  from,
unsigned int  nr 
) [inline, static]

Definition at line 780 of file LECanonicalConversion.h.

References toLocalDouble().

static unsigned int casa::LECanonicalConversion::toLocalChar ( void *  to,
const void *  from,
unsigned int  nr 
) [static]

Convert nr values from canonical format to local format.

The from and to buffer should not overlap.

Referenced by toLocal().

static unsigned int casa::LECanonicalConversion::toLocalDouble ( void *  to,
const void *  from,
unsigned int  nr 
) [static]

Referenced by toLocal().

static unsigned int casa::LECanonicalConversion::toLocalFloat ( void *  to,
const void *  from,
unsigned int  nr 
) [static]

Referenced by toLocal().

static unsigned int casa::LECanonicalConversion::toLocalInt ( void *  to,
const void *  from,
unsigned int  nr 
) [static]

Referenced by toLocal().

static unsigned int casa::LECanonicalConversion::toLocalInt64 ( void *  to,
const void *  from,
unsigned int  nr 
) [static]

Referenced by toLocal().

static unsigned int casa::LECanonicalConversion::toLocalShort ( void *  to,
const void *  from,
unsigned int  nr 
) [static]

Referenced by toLocal().

static unsigned int casa::LECanonicalConversion::toLocalUChar ( void *  to,
const void *  from,
unsigned int  nr 
) [static]

Referenced by toLocal().

static unsigned int casa::LECanonicalConversion::toLocalUInt ( void *  to,
const void *  from,
unsigned int  nr 
) [static]

Referenced by toLocal().

static unsigned int casa::LECanonicalConversion::toLocalUInt64 ( void *  to,
const void *  from,
unsigned int  nr 
) [static]

Referenced by toLocal().

static unsigned int casa::LECanonicalConversion::toLocalUShort ( void *  to,
const void *  from,
unsigned int  nr 
) [static]

Referenced by toLocal().


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