casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Static Public Member Functions | Private Member Functions | List of all members
casacore::CanonicalConversion Class Reference

LDOUBLE is 8 bytes on SUN, but 16 bytes canonical. More...

#include <CanonicalConversion.h>

Static Public Member Functions

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

Private Member Functions

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

Detailed Description

LDOUBLE is 8 bytes on SUN, but 16 bytes canonical.

A class with static functions to convert canonical format

Intended use:

Public interface

Review Status

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

Synopsis

This class consists of several static functions to convert data from local (=native) format to a 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
The canonical format is big-endian IEEE format, so on many machines the conversion is only a copy operation. On Alpha- or Intel-based machines, 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*CanonicalConversion::canonicalSize(data)];
CanonicalConversion::fromLocal (buffer, data, nrval);
...\.
delete [] buffer;
}

Motivation

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

To Do

Definition at line 161 of file CanonicalConversion.h.

Constructor & Destructor Documentation

casacore::CanonicalConversion::CanonicalConversion ( )
private

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

Member Function Documentation

static void* casacore::CanonicalConversion::byteFromLocalChar ( void *  to,
const void *  from,
size_t  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* casacore::CanonicalConversion::byteFromLocalDouble ( void *  to,
const void *  from,
size_t  nrbytes 
)
static
static void* casacore::CanonicalConversion::byteFromLocalFloat ( void *  to,
const void *  from,
size_t  nrbytes 
)
static
static void* casacore::CanonicalConversion::byteFromLocalInt ( void *  to,
const void *  from,
size_t  nrbytes 
)
static
static void* casacore::CanonicalConversion::byteFromLocalInt64 ( void *  to,
const void *  from,
size_t  nrbytes 
)
static
static void* casacore::CanonicalConversion::byteFromLocalShort ( void *  to,
const void *  from,
size_t  nrbytes 
)
static
static void* casacore::CanonicalConversion::byteFromLocalUChar ( void *  to,
const void *  from,
size_t  nrbytes 
)
static
static void* casacore::CanonicalConversion::byteFromLocalUInt ( void *  to,
const void *  from,
size_t  nrbytes 
)
static
static void* casacore::CanonicalConversion::byteFromLocalUInt64 ( void *  to,
const void *  from,
size_t  nrbytes 
)
static
static void* casacore::CanonicalConversion::byteFromLocalUShort ( void *  to,
const void *  from,
size_t  nrbytes 
)
static
static void* casacore::CanonicalConversion::byteToLocalChar ( void *  to,
const void *  from,
size_t  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* casacore::CanonicalConversion::byteToLocalDouble ( void *  to,
const void *  from,
size_t  nrbytes 
)
static
static void* casacore::CanonicalConversion::byteToLocalFloat ( void *  to,
const void *  from,
size_t  nrbytes 
)
static
static void* casacore::CanonicalConversion::byteToLocalInt ( void *  to,
const void *  from,
size_t  nrbytes 
)
static
static void* casacore::CanonicalConversion::byteToLocalInt64 ( void *  to,
const void *  from,
size_t  nrbytes 
)
static
static void* casacore::CanonicalConversion::byteToLocalShort ( void *  to,
const void *  from,
size_t  nrbytes 
)
static
static void* casacore::CanonicalConversion::byteToLocalUChar ( void *  to,
const void *  from,
size_t  nrbytes 
)
static
static void* casacore::CanonicalConversion::byteToLocalUInt ( void *  to,
const void *  from,
size_t  nrbytes 
)
static
static void* casacore::CanonicalConversion::byteToLocalUInt64 ( void *  to,
const void *  from,
size_t  nrbytes 
)
static
static void* casacore::CanonicalConversion::byteToLocalUShort ( void *  to,
const void *  from,
size_t  nrbytes 
)
static
unsigned int casacore::CanonicalConversion::canonicalSize ( const char *  )
inlinestatic

Return the canonical length for the various data types.

Definition at line 961 of file CanonicalConversion.h.

References SIZE_CAN_CHAR.

unsigned int casacore::CanonicalConversion::canonicalSize ( const unsigned char *  )
inlinestatic

Definition at line 963 of file CanonicalConversion.h.

References SIZE_CAN_UCHAR.

unsigned int casacore::CanonicalConversion::canonicalSize ( const short *  )
inlinestatic

Definition at line 965 of file CanonicalConversion.h.

References SIZE_CAN_SHORT.

unsigned int casacore::CanonicalConversion::canonicalSize ( const unsigned short *  )
inlinestatic

Definition at line 967 of file CanonicalConversion.h.

References SIZE_CAN_USHORT.

unsigned int casacore::CanonicalConversion::canonicalSize ( const int *  )
inlinestatic

Definition at line 969 of file CanonicalConversion.h.

References SIZE_CAN_INT.

unsigned int casacore::CanonicalConversion::canonicalSize ( const unsigned int *  )
inlinestatic

Definition at line 971 of file CanonicalConversion.h.

References SIZE_CAN_UINT.

unsigned int casacore::CanonicalConversion::canonicalSize ( const Int64 )
inlinestatic

Definition at line 973 of file CanonicalConversion.h.

References SIZE_CAN_INT64.

unsigned int casacore::CanonicalConversion::canonicalSize ( const uInt64 )
inlinestatic

Definition at line 975 of file CanonicalConversion.h.

References SIZE_CAN_UINT64.

unsigned int casacore::CanonicalConversion::canonicalSize ( const float *  )
inlinestatic

Definition at line 977 of file CanonicalConversion.h.

References SIZE_CAN_FLOAT.

unsigned int casacore::CanonicalConversion::canonicalSize ( const double *  )
inlinestatic

Definition at line 979 of file CanonicalConversion.h.

References SIZE_CAN_DOUBLE.

size_t casacore::CanonicalConversion::fromLocal ( void *  to,
const char &  from 
)
inlinestatic

Convert one value from local format to canonical format.

The from and to buffer should not overlap.

Definition at line 633 of file CanonicalConversion.h.

References SIZE_CAN_CHAR.

Referenced by casacore::IBMConversion::fromLocal(), and casacore::ModcompConversion::fromLocal().

size_t casacore::CanonicalConversion::fromLocal ( void *  to,
const unsigned char &  from 
)
inlinestatic

Definition at line 639 of file CanonicalConversion.h.

References SIZE_CAN_UCHAR.

size_t casacore::CanonicalConversion::fromLocal ( void *  to,
const short &  from 
)
inlinestatic

Definition at line 646 of file CanonicalConversion.h.

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

size_t casacore::CanonicalConversion::fromLocal ( void *  to,
const unsigned short &  from 
)
inlinestatic

Definition at line 657 of file CanonicalConversion.h.

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

size_t casacore::CanonicalConversion::fromLocal ( void *  to,
const int &  from 
)
inlinestatic

Definition at line 668 of file CanonicalConversion.h.

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

size_t casacore::CanonicalConversion::fromLocal ( void *  to,
const unsigned int &  from 
)
inlinestatic

Definition at line 679 of file CanonicalConversion.h.

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

size_t casacore::CanonicalConversion::fromLocal ( void *  to,
const Int64 from 
)
inlinestatic

Definition at line 690 of file CanonicalConversion.h.

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

size_t casacore::CanonicalConversion::fromLocal ( void *  to,
const uInt64 from 
)
inlinestatic

Definition at line 701 of file CanonicalConversion.h.

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

size_t casacore::CanonicalConversion::fromLocal ( void *  to,
const float &  from 
)
inlinestatic

Definition at line 712 of file CanonicalConversion.h.

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

size_t casacore::CanonicalConversion::fromLocal ( void *  to,
const double &  from 
)
inlinestatic

Definition at line 723 of file CanonicalConversion.h.

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

size_t casacore::CanonicalConversion::fromLocal ( void *  to,
const char *  from,
size_t  nr 
)
inlinestatic

Convert nr values from local format to canonical format.

The from and to buffer should not overlap.

Definition at line 796 of file CanonicalConversion.h.

References fromLocalChar().

size_t casacore::CanonicalConversion::fromLocal ( void *  to,
const unsigned char *  from,
size_t  nr 
)
inlinestatic

Definition at line 802 of file CanonicalConversion.h.

References fromLocalUChar().

size_t casacore::CanonicalConversion::fromLocal ( void *  to,
const short *  from,
size_t  nr 
)
inlinestatic

Definition at line 808 of file CanonicalConversion.h.

References fromLocalShort().

size_t casacore::CanonicalConversion::fromLocal ( void *  to,
const unsigned short *  from,
size_t  nr 
)
inlinestatic

Definition at line 814 of file CanonicalConversion.h.

References fromLocalUShort().

size_t casacore::CanonicalConversion::fromLocal ( void *  to,
const int *  from,
size_t  nr 
)
inlinestatic

Definition at line 820 of file CanonicalConversion.h.

References fromLocalInt().

size_t casacore::CanonicalConversion::fromLocal ( void *  to,
const unsigned int *  from,
size_t  nr 
)
inlinestatic

Definition at line 826 of file CanonicalConversion.h.

References fromLocalUInt().

size_t casacore::CanonicalConversion::fromLocal ( void *  to,
const Int64 from,
size_t  nr 
)
inlinestatic

Definition at line 832 of file CanonicalConversion.h.

References fromLocalInt64().

size_t casacore::CanonicalConversion::fromLocal ( void *  to,
const uInt64 from,
size_t  nr 
)
inlinestatic

Definition at line 838 of file CanonicalConversion.h.

References fromLocalUInt64().

size_t casacore::CanonicalConversion::fromLocal ( void *  to,
const float *  from,
size_t  nr 
)
inlinestatic

Definition at line 844 of file CanonicalConversion.h.

References fromLocalFloat().

size_t casacore::CanonicalConversion::fromLocal ( void *  to,
const double *  from,
size_t  nr 
)
inlinestatic

Definition at line 850 of file CanonicalConversion.h.

References fromLocalDouble().

static size_t casacore::CanonicalConversion::fromLocalChar ( void *  to,
const void *  from,
size_t  nr 
)
static

Convert nr values from local format to canonical format.

The from and to buffer should not overlap.

Referenced by casacore::ModcompConversion::fromLocal(), and fromLocal().

static size_t casacore::CanonicalConversion::fromLocalDouble ( void *  to,
const void *  from,
size_t  nr 
)
static

Referenced by fromLocal().

static size_t casacore::CanonicalConversion::fromLocalFloat ( void *  to,
const void *  from,
size_t  nr 
)
static

Referenced by fromLocal().

static size_t casacore::CanonicalConversion::fromLocalInt ( void *  to,
const void *  from,
size_t  nr 
)
static
static size_t casacore::CanonicalConversion::fromLocalInt64 ( void *  to,
const void *  from,
size_t  nr 
)
static

Referenced by fromLocal().

static size_t casacore::CanonicalConversion::fromLocalShort ( void *  to,
const void *  from,
size_t  nr 
)
static
static size_t casacore::CanonicalConversion::fromLocalUChar ( void *  to,
const void *  from,
size_t  nr 
)
static
static size_t casacore::CanonicalConversion::fromLocalUInt ( void *  to,
const void *  from,
size_t  nr 
)
static
static size_t casacore::CanonicalConversion::fromLocalUInt64 ( void *  to,
const void *  from,
size_t  nr 
)
static

Referenced by fromLocal().

static size_t casacore::CanonicalConversion::fromLocalUShort ( void *  to,
const void *  from,
size_t  nr 
)
static
static Conversion::ByteFunction* casacore::CanonicalConversion::getByteFromLocal ( const char *  )
static
static Conversion::ByteFunction* casacore::CanonicalConversion::getByteFromLocal ( const unsigned char *  )
static
static Conversion::ByteFunction* casacore::CanonicalConversion::getByteFromLocal ( const short *  )
static
static Conversion::ByteFunction* casacore::CanonicalConversion::getByteFromLocal ( const unsigned short *  )
static
static Conversion::ByteFunction* casacore::CanonicalConversion::getByteFromLocal ( const int *  )
static
static Conversion::ByteFunction* casacore::CanonicalConversion::getByteFromLocal ( const unsigned int *  )
static
static Conversion::ByteFunction* casacore::CanonicalConversion::getByteFromLocal ( const Int64 )
static
static Conversion::ByteFunction* casacore::CanonicalConversion::getByteFromLocal ( const uInt64 )
static
static Conversion::ByteFunction* casacore::CanonicalConversion::getByteFromLocal ( const float *  )
static
static Conversion::ByteFunction* casacore::CanonicalConversion::getByteFromLocal ( const double *  )
static
static Conversion::ByteFunction* casacore::CanonicalConversion::getByteToLocal ( const char *  )
static

Get the byte conversion function for the given type.

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

static Conversion::ByteFunction* casacore::CanonicalConversion::getByteToLocal ( const unsigned char *  )
static
static Conversion::ByteFunction* casacore::CanonicalConversion::getByteToLocal ( const short *  )
static
static Conversion::ByteFunction* casacore::CanonicalConversion::getByteToLocal ( const unsigned short *  )
static
static Conversion::ByteFunction* casacore::CanonicalConversion::getByteToLocal ( const int *  )
static
static Conversion::ByteFunction* casacore::CanonicalConversion::getByteToLocal ( const unsigned int *  )
static
static Conversion::ByteFunction* casacore::CanonicalConversion::getByteToLocal ( const Int64 )
static
static Conversion::ByteFunction* casacore::CanonicalConversion::getByteToLocal ( const uInt64 )
static
static Conversion::ByteFunction* casacore::CanonicalConversion::getByteToLocal ( const float *  )
static
static Conversion::ByteFunction* casacore::CanonicalConversion::getByteToLocal ( const double *  )
static
Conversion::ValueFunction * casacore::CanonicalConversion::getFromLocal ( const char *  )
inlinestatic

Definition at line 910 of file CanonicalConversion.h.

Conversion::ValueFunction * casacore::CanonicalConversion::getFromLocal ( const unsigned char *  )
inlinestatic

Definition at line 915 of file CanonicalConversion.h.

Conversion::ValueFunction * casacore::CanonicalConversion::getFromLocal ( const short *  )
inlinestatic

Definition at line 920 of file CanonicalConversion.h.

Conversion::ValueFunction * casacore::CanonicalConversion::getFromLocal ( const unsigned short *  )
inlinestatic

Definition at line 925 of file CanonicalConversion.h.

Conversion::ValueFunction * casacore::CanonicalConversion::getFromLocal ( const int *  )
inlinestatic

Definition at line 930 of file CanonicalConversion.h.

Conversion::ValueFunction * casacore::CanonicalConversion::getFromLocal ( const unsigned int *  )
inlinestatic

Definition at line 935 of file CanonicalConversion.h.

Conversion::ValueFunction * casacore::CanonicalConversion::getFromLocal ( const Int64 )
inlinestatic

Definition at line 940 of file CanonicalConversion.h.

Conversion::ValueFunction * casacore::CanonicalConversion::getFromLocal ( const uInt64 )
inlinestatic

Definition at line 945 of file CanonicalConversion.h.

Conversion::ValueFunction * casacore::CanonicalConversion::getFromLocal ( const float *  )
inlinestatic

Definition at line 950 of file CanonicalConversion.h.

Conversion::ValueFunction * casacore::CanonicalConversion::getFromLocal ( const double *  )
inlinestatic

Definition at line 955 of file CanonicalConversion.h.

Conversion::ValueFunction * casacore::CanonicalConversion::getToLocal ( const char *  )
inlinestatic

Get the value conversion function for the given type.

Definition at line 859 of file CanonicalConversion.h.

Conversion::ValueFunction * casacore::CanonicalConversion::getToLocal ( const unsigned char *  )
inlinestatic

Definition at line 864 of file CanonicalConversion.h.

Conversion::ValueFunction * casacore::CanonicalConversion::getToLocal ( const short *  )
inlinestatic

Definition at line 869 of file CanonicalConversion.h.

Conversion::ValueFunction * casacore::CanonicalConversion::getToLocal ( const unsigned short *  )
inlinestatic

Definition at line 874 of file CanonicalConversion.h.

Conversion::ValueFunction * casacore::CanonicalConversion::getToLocal ( const int *  )
inlinestatic

Definition at line 879 of file CanonicalConversion.h.

Conversion::ValueFunction * casacore::CanonicalConversion::getToLocal ( const unsigned int *  )
inlinestatic

Definition at line 884 of file CanonicalConversion.h.

Conversion::ValueFunction * casacore::CanonicalConversion::getToLocal ( const Int64 )
inlinestatic

Definition at line 889 of file CanonicalConversion.h.

Conversion::ValueFunction * casacore::CanonicalConversion::getToLocal ( const uInt64 )
inlinestatic

Definition at line 894 of file CanonicalConversion.h.

Conversion::ValueFunction * casacore::CanonicalConversion::getToLocal ( const float *  )
inlinestatic

Definition at line 899 of file CanonicalConversion.h.

Conversion::ValueFunction * casacore::CanonicalConversion::getToLocal ( const double *  )
inlinestatic

Definition at line 904 of file CanonicalConversion.h.

void casacore::CanonicalConversion::move2 ( void *  to,
const void *  from 
)
inlinestatic
void casacore::CanonicalConversion::move4 ( void *  to,
const void *  from 
)
inlinestatic
void casacore::CanonicalConversion::move8 ( void *  to,
const void *  from 
)
inlinestatic
void casacore::CanonicalConversion::reverse2 ( void *  to,
const void *  from 
)
inlinestatic
void casacore::CanonicalConversion::reverse4 ( void *  to,
const void *  from 
)
inlinestatic
void casacore::CanonicalConversion::reverse8 ( void *  to,
const void *  from 
)
inlinestatic
size_t casacore::CanonicalConversion::toLocal ( char &  to,
const void *  from 
)
inlinestatic

Convert one value from canonical format to local format.

The from and to buffer should not overlap.

Definition at line 507 of file CanonicalConversion.h.

References SIZE_CAN_CHAR.

Referenced by casacore::IBMConversion::toLocal(), and casacore::ModcompConversion::toLocal().

size_t casacore::CanonicalConversion::toLocal ( unsigned char &  to,
const void *  from 
)
inlinestatic

Definition at line 513 of file CanonicalConversion.h.

References SIZE_CAN_UCHAR.

size_t casacore::CanonicalConversion::toLocal ( short &  to,
const void *  from 
)
inlinestatic

Definition at line 520 of file CanonicalConversion.h.

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

size_t casacore::CanonicalConversion::toLocal ( unsigned short &  to,
const void *  from 
)
inlinestatic

Definition at line 537 of file CanonicalConversion.h.

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

size_t casacore::CanonicalConversion::toLocal ( int &  to,
const void *  from 
)
inlinestatic

Definition at line 551 of file CanonicalConversion.h.

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

size_t casacore::CanonicalConversion::toLocal ( unsigned int &  to,
const void *  from 
)
inlinestatic

Definition at line 568 of file CanonicalConversion.h.

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

size_t casacore::CanonicalConversion::toLocal ( Int64 to,
const void *  from 
)
inlinestatic

Definition at line 582 of file CanonicalConversion.h.

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

size_t casacore::CanonicalConversion::toLocal ( uInt64 to,
const void *  from 
)
inlinestatic

Definition at line 599 of file CanonicalConversion.h.

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

size_t casacore::CanonicalConversion::toLocal ( float &  to,
const void *  from 
)
inlinestatic

Definition at line 612 of file CanonicalConversion.h.

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

size_t casacore::CanonicalConversion::toLocal ( double &  to,
const void *  from 
)
inlinestatic

Definition at line 622 of file CanonicalConversion.h.

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

size_t casacore::CanonicalConversion::toLocal ( char *  to,
const void *  from,
size_t  nr 
)
inlinestatic

Convert nr values from canonical format to local format.

The from and to buffer should not overlap.

Definition at line 735 of file CanonicalConversion.h.

References toLocalChar().

size_t casacore::CanonicalConversion::toLocal ( unsigned char *  to,
const void *  from,
size_t  nr 
)
inlinestatic

Definition at line 741 of file CanonicalConversion.h.

References toLocalUChar().

size_t casacore::CanonicalConversion::toLocal ( short *  to,
const void *  from,
size_t  nr 
)
inlinestatic

Definition at line 747 of file CanonicalConversion.h.

References toLocalShort().

size_t casacore::CanonicalConversion::toLocal ( unsigned short *  to,
const void *  from,
size_t  nr 
)
inlinestatic

Definition at line 753 of file CanonicalConversion.h.

References toLocalUShort().

size_t casacore::CanonicalConversion::toLocal ( int *  to,
const void *  from,
size_t  nr 
)
inlinestatic

Definition at line 759 of file CanonicalConversion.h.

References toLocalInt().

size_t casacore::CanonicalConversion::toLocal ( unsigned int *  to,
const void *  from,
size_t  nr 
)
inlinestatic

Definition at line 765 of file CanonicalConversion.h.

References toLocalUInt().

size_t casacore::CanonicalConversion::toLocal ( Int64 to,
const void *  from,
size_t  nr 
)
inlinestatic

Definition at line 771 of file CanonicalConversion.h.

References toLocalInt64().

size_t casacore::CanonicalConversion::toLocal ( uInt64 to,
const void *  from,
size_t  nr 
)
inlinestatic

Definition at line 777 of file CanonicalConversion.h.

References toLocalUInt64().

size_t casacore::CanonicalConversion::toLocal ( float *  to,
const void *  from,
size_t  nr 
)
inlinestatic

Definition at line 783 of file CanonicalConversion.h.

References toLocalFloat().

size_t casacore::CanonicalConversion::toLocal ( double *  to,
const void *  from,
size_t  nr 
)
inlinestatic

Definition at line 789 of file CanonicalConversion.h.

References toLocalDouble().

static size_t casacore::CanonicalConversion::toLocalChar ( void *  to,
const void *  from,
size_t  nr 
)
static

Convert nr values from canonical format to local format.

The from and to buffer should not overlap.

Referenced by casacore::ModcompConversion::toLocal(), and toLocal().

static size_t casacore::CanonicalConversion::toLocalDouble ( void *  to,
const void *  from,
size_t  nr 
)
static

Referenced by toLocal().

static size_t casacore::CanonicalConversion::toLocalFloat ( void *  to,
const void *  from,
size_t  nr 
)
static

Referenced by toLocal().

static size_t casacore::CanonicalConversion::toLocalInt ( void *  to,
const void *  from,
size_t  nr 
)
static
static size_t casacore::CanonicalConversion::toLocalInt64 ( void *  to,
const void *  from,
size_t  nr 
)
static

Referenced by toLocal().

static size_t casacore::CanonicalConversion::toLocalShort ( void *  to,
const void *  from,
size_t  nr 
)
static
static size_t casacore::CanonicalConversion::toLocalUChar ( void *  to,
const void *  from,
size_t  nr 
)
static
static size_t casacore::CanonicalConversion::toLocalUInt ( void *  to,
const void *  from,
size_t  nr 
)
static
static size_t casacore::CanonicalConversion::toLocalUInt64 ( void *  to,
const void *  from,
size_t  nr 
)
static

Referenced by toLocal().

static size_t casacore::CanonicalConversion::toLocalUShort ( void *  to,
const void *  from,
size_t  nr 
)
static

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