Loading...
Searching...
No Matches
casacore::CanonicalConversion Class Reference
casa package (libcasa_casa) » OS_module

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.
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.
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.
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.
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.
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.
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.
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.
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::ValueFunction * | getToLocal (const char *)
| Get the value conversion function for the given type.
static Conversion::ValueFunction * | getToLocal (const unsigned char *)
static Conversion::ValueFunction * | getToLocal (const short *)
static Conversion::ValueFunction * | getToLocal (const unsigned short *)
static Conversion::ValueFunction * | getToLocal (const int *)
static Conversion::ValueFunction * | getToLocal (const unsigned int *)
static Conversion::ValueFunction * | getToLocal (const Int64 *)
static Conversion::ValueFunction * | getToLocal (const uInt64 *)
static Conversion::ValueFunction * | getToLocal (const float *)
static Conversion::ValueFunction * | getToLocal (const double *)
static Conversion::ValueFunction * | getFromLocal (const char *)
static Conversion::ValueFunction * | getFromLocal (const unsigned char *)
static Conversion::ValueFunction * | getFromLocal (const short *)
static Conversion::ValueFunction * | getFromLocal (const unsigned short *)
static Conversion::ValueFunction * | getFromLocal (const int *)
static Conversion::ValueFunction * | getFromLocal (const unsigned int *)
static Conversion::ValueFunction * | getFromLocal (const Int64 *)
static Conversion::ValueFunction * | getFromLocal (const uInt64 *)
static Conversion::ValueFunction * | getFromLocal (const float *)
static Conversion::ValueFunction * | getFromLocal (const double *)
static Conversion::ByteFunction * | getByteToLocal (const char *)
| Get the byte conversion function for the given type.
static Conversion::ByteFunction * | getByteToLocal (const unsigned char *)
static Conversion::ByteFunction * | getByteToLocal (const short *)
static Conversion::ByteFunction * | getByteToLocal (const unsigned short *)
static Conversion::ByteFunction * | getByteToLocal (const int *)
static Conversion::ByteFunction * | getByteToLocal (const unsigned int *)
static Conversion::ByteFunction * | getByteToLocal (const Int64 *)
static Conversion::ByteFunction * | getByteToLocal (const uInt64 *)
static Conversion::ByteFunction * | getByteToLocal (const float *)
static Conversion::ByteFunction * | getByteToLocal (const double *)
static Conversion::ByteFunction * | getByteFromLocal (const char *)
static Conversion::ByteFunction * | getByteFromLocal (const unsigned char *)
static Conversion::ByteFunction * | getByteFromLocal (const short *)
static Conversion::ByteFunction * | getByteFromLocal (const unsigned short *)
static Conversion::ByteFunction * | getByteFromLocal (const int *)
static Conversion::ByteFunction * | getByteFromLocal (const unsigned int *)
static Conversion::ByteFunction * | getByteFromLocal (const Int64 *)
static Conversion::ByteFunction * | getByteFromLocal (const uInt64 *)
static Conversion::ByteFunction * | getByteFromLocal (const float *)
static Conversion::ByteFunction * | getByteFromLocal (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

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

## 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;
}
casacore::CanonicalConversion::canonicalSize
static unsigned int canonicalSize(const char *)
Return the canonical length for the various data types.
Definition CanonicalConversion.h:959
casacore::CanonicalConversion::fromLocal
static size_t fromLocal(void *to, const char &from)
Convert one value from local format to canonical format.
Definition CanonicalConversion.h:631
casacore::uInt
unsigned int uInt
Definition aipstype.h:49

### 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

- Support data type long double.

Definition at line 159 of file CanonicalConversion.h.

## Constructor & Destructor Documentation

## CanonicalConversion()

casacore::CanonicalConversion::CanonicalConversion | ( |  | ) |

private

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

## Member Function Documentation

## byteFromLocalChar()

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.

## byteFromLocalDouble()

void * casacore::CanonicalConversion::byteFromLocalDouble | ( | void * | to,
|  | const void * | from,
|  | size_t | nrbytes )

static

## byteFromLocalFloat()

void * casacore::CanonicalConversion::byteFromLocalFloat | ( | void * | to,
|  | const void * | from,
|  | size_t | nrbytes )

static

## byteFromLocalInt()

void * casacore::CanonicalConversion::byteFromLocalInt | ( | void * | to,
|  | const void * | from,
|  | size_t | nrbytes )

static

## byteFromLocalInt64()

void * casacore::CanonicalConversion::byteFromLocalInt64 | ( | void * | to,
|  | const void * | from,
|  | size_t | nrbytes )

static

## byteFromLocalShort()

void * casacore::CanonicalConversion::byteFromLocalShort | ( | void * | to,
|  | const void * | from,
|  | size_t | nrbytes )

static

## byteFromLocalUChar()

void * casacore::CanonicalConversion::byteFromLocalUChar | ( | void * | to,
|  | const void * | from,
|  | size_t | nrbytes )

static

## byteFromLocalUInt()

void * casacore::CanonicalConversion::byteFromLocalUInt | ( | void * | to,
|  | const void * | from,
|  | size_t | nrbytes )

static

## byteFromLocalUInt64()

void * casacore::CanonicalConversion::byteFromLocalUInt64 | ( | void * | to,
|  | const void * | from,
|  | size_t | nrbytes )

static

## byteFromLocalUShort()

void * casacore::CanonicalConversion::byteFromLocalUShort | ( | void * | to,
|  | const void * | from,
|  | size_t | nrbytes )

static

## byteToLocalChar()

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.

## byteToLocalDouble()

void * casacore::CanonicalConversion::byteToLocalDouble | ( | void * | to,
|  | const void * | from,
|  | size_t | nrbytes )

static

## byteToLocalFloat()

void * casacore::CanonicalConversion::byteToLocalFloat | ( | void * | to,
|  | const void * | from,
|  | size_t | nrbytes )

static

## byteToLocalInt()

void * casacore::CanonicalConversion::byteToLocalInt | ( | void * | to,
|  | const void * | from,
|  | size_t | nrbytes )

static

## byteToLocalInt64()

void * casacore::CanonicalConversion::byteToLocalInt64 | ( | void * | to,
|  | const void * | from,
|  | size_t | nrbytes )

static

## byteToLocalShort()

void * casacore::CanonicalConversion::byteToLocalShort | ( | void * | to,
|  | const void * | from,
|  | size_t | nrbytes )

static

## byteToLocalUChar()

void * casacore::CanonicalConversion::byteToLocalUChar | ( | void * | to,
|  | const void * | from,
|  | size_t | nrbytes )

static

## byteToLocalUInt()

void * casacore::CanonicalConversion::byteToLocalUInt | ( | void * | to,
|  | const void * | from,
|  | size_t | nrbytes )

static

## byteToLocalUInt64()

void * casacore::CanonicalConversion::byteToLocalUInt64 | ( | void * | to,
|  | const void * | from,
|  | size_t | nrbytes )

static

## byteToLocalUShort()

void * casacore::CanonicalConversion::byteToLocalUShort | ( | void * | to,
|  | const void * | from,
|  | size_t | nrbytes )

static

## canonicalSize() [1/10]

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

inline static

Return the canonical length for the various data types.

Definition at line 959 of file CanonicalConversion.h.

References SIZE_CAN_CHAR.

## canonicalSize() [2/10]

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

inline static

Definition at line 977 of file CanonicalConversion.h.

References SIZE_CAN_DOUBLE.

## canonicalSize() [3/10]

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

inline static

Definition at line 975 of file CanonicalConversion.h.

References SIZE_CAN_FLOAT.

## canonicalSize() [4/10]

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

inline static

Definition at line 967 of file CanonicalConversion.h.

References SIZE_CAN_INT.

## canonicalSize() [5/10]

unsigned int casacore::CanonicalConversion::canonicalSize | ( | const Int64 * |  | ) |

inline static

Definition at line 971 of file CanonicalConversion.h.

References SIZE_CAN_INT64.

## canonicalSize() [6/10]

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

inline static

Definition at line 963 of file CanonicalConversion.h.

References SIZE_CAN_SHORT.

## canonicalSize() [7/10]

unsigned int casacore::CanonicalConversion::canonicalSize | ( | const uInt64 * |  | ) |

inline static

Definition at line 973 of file CanonicalConversion.h.

References SIZE_CAN_UINT64.

## canonicalSize() [8/10]

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

inline static

Definition at line 961 of file CanonicalConversion.h.

References SIZE_CAN_UCHAR.

## canonicalSize() [9/10]

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

inline static

Definition at line 969 of file CanonicalConversion.h.

References SIZE_CAN_UINT.

## canonicalSize() [10/10]

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

inline static

Definition at line 965 of file CanonicalConversion.h.

References SIZE_CAN_USHORT.

## fromLocal() [1/20]

size_t casacore::CanonicalConversion::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 631 of file CanonicalConversion.h.

References SIZE_CAN_CHAR.

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

## fromLocal() [2/20]

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

inline static

Convert nr values from local format to canonical format.

The from and to buffer should not overlap.

Definition at line 794 of file CanonicalConversion.h.

References fromLocalChar().

## fromLocal() [3/20]

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

inline static

Definition at line 721 of file CanonicalConversion.h.

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

## fromLocal() [4/20]

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

inline static

Definition at line 848 of file CanonicalConversion.h.

References fromLocalDouble().

## fromLocal() [5/20]

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

inline static

Definition at line 710 of file CanonicalConversion.h.

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

## fromLocal() [6/20]

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

inline static

Definition at line 842 of file CanonicalConversion.h.

References fromLocalFloat().

## fromLocal() [7/20]

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

inline static

Definition at line 666 of file CanonicalConversion.h.

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

## fromLocal() [8/20]

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

inline static

Definition at line 818 of file CanonicalConversion.h.

References fromLocalInt().

## fromLocal() [9/20]

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

inline static

Definition at line 688 of file CanonicalConversion.h.

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

## fromLocal() [10/20]

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

inline static

Definition at line 830 of file CanonicalConversion.h.

References fromLocalInt64().

## fromLocal() [11/20]

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

inline static

Definition at line 644 of file CanonicalConversion.h.

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

## fromLocal() [12/20]

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

inline static

Definition at line 806 of file CanonicalConversion.h.

References fromLocalShort().

## fromLocal() [13/20]

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

inline static

Definition at line 699 of file CanonicalConversion.h.

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

## fromLocal() [14/20]

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

inline static

Definition at line 836 of file CanonicalConversion.h.

References fromLocalUInt64().

## fromLocal() [15/20]

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

inline static

Definition at line 637 of file CanonicalConversion.h.

References SIZE_CAN_UCHAR.

## fromLocal() [16/20]

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

inline static

Definition at line 800 of file CanonicalConversion.h.

References fromLocalUChar().

## fromLocal() [17/20]

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

inline static

Definition at line 677 of file CanonicalConversion.h.

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

## fromLocal() [18/20]

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

inline static

Definition at line 824 of file CanonicalConversion.h.

References fromLocalUInt().

## fromLocal() [19/20]

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

inline static

Definition at line 655 of file CanonicalConversion.h.

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

## fromLocal() [20/20]

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

inline static

Definition at line 812 of file CanonicalConversion.h.

References fromLocalUShort().

## fromLocalChar()

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 fromLocal(), casacore::ModcompConversion::fromLocal(), and getFromLocal().

## fromLocalDouble()

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

static

Referenced by fromLocal(), and getFromLocal().

## fromLocalFloat()

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

static

Referenced by fromLocal(), and getFromLocal().

## fromLocalInt()

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

static

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

## fromLocalInt64()

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

static

Referenced by fromLocal(), and getFromLocal().

## fromLocalShort()

size_t casacore::CanonicalConversion::fromLocalShort | ( | void * | to,
|  | const void * | from,
|  | size_t | nr )

static

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

## fromLocalUChar()

size_t casacore::CanonicalConversion::fromLocalUChar | ( | void * | to,
|  | const void * | from,
|  | size_t | nr )

static

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

## fromLocalUInt()

size_t casacore::CanonicalConversion::fromLocalUInt | ( | void * | to,
|  | const void * | from,
|  | size_t | nr )

static

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

## fromLocalUInt64()

size_t casacore::CanonicalConversion::fromLocalUInt64 | ( | void * | to,
|  | const void * | from,
|  | size_t | nr )

static

Referenced by fromLocal(), and getFromLocal().

## fromLocalUShort()

size_t casacore::CanonicalConversion::fromLocalUShort | ( | void * | to,
|  | const void * | from,
|  | size_t | nr )

static

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

## getByteFromLocal() [1/10]

Conversion::ByteFunction * casacore::CanonicalConversion::getByteFromLocal | ( | const char * |  | ) |

static

## getByteFromLocal() [2/10]

Conversion::ByteFunction * casacore::CanonicalConversion::getByteFromLocal | ( | const double * |  | ) |

static

## getByteFromLocal() [3/10]

Conversion::ByteFunction * casacore::CanonicalConversion::getByteFromLocal | ( | const float * |  | ) |

static

## getByteFromLocal() [4/10]

Conversion::ByteFunction * casacore::CanonicalConversion::getByteFromLocal | ( | const int * |  | ) |

static

## getByteFromLocal() [5/10]

Conversion::ByteFunction * casacore::CanonicalConversion::getByteFromLocal | ( | const Int64 * |  | ) |

static

## getByteFromLocal() [6/10]

Conversion::ByteFunction * casacore::CanonicalConversion::getByteFromLocal | ( | const short * |  | ) |

static

## getByteFromLocal() [7/10]

Conversion::ByteFunction * casacore::CanonicalConversion::getByteFromLocal | ( | const uInt64 * |  | ) |

static

## getByteFromLocal() [8/10]

Conversion::ByteFunction * casacore::CanonicalConversion::getByteFromLocal | ( | const unsigned char * |  | ) |

static

## getByteFromLocal() [9/10]

Conversion::ByteFunction * casacore::CanonicalConversion::getByteFromLocal | ( | const unsigned int * |  | ) |

static

## getByteFromLocal() [10/10]

Conversion::ByteFunction * casacore::CanonicalConversion::getByteFromLocal | ( | const unsigned short * |  | ) |

static

## getByteToLocal() [1/10]

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.

## getByteToLocal() [2/10]

Conversion::ByteFunction * casacore::CanonicalConversion::getByteToLocal | ( | const double * |  | ) |

static

## getByteToLocal() [3/10]

Conversion::ByteFunction * casacore::CanonicalConversion::getByteToLocal | ( | const float * |  | ) |

static

## getByteToLocal() [4/10]

Conversion::ByteFunction * casacore::CanonicalConversion::getByteToLocal | ( | const int * |  | ) |

static

## getByteToLocal() [5/10]

Conversion::ByteFunction * casacore::CanonicalConversion::getByteToLocal | ( | const Int64 * |  | ) |

static

## getByteToLocal() [6/10]

Conversion::ByteFunction * casacore::CanonicalConversion::getByteToLocal | ( | const short * |  | ) |

static

## getByteToLocal() [7/10]

Conversion::ByteFunction * casacore::CanonicalConversion::getByteToLocal | ( | const uInt64 * |  | ) |

static

## getByteToLocal() [8/10]

Conversion::ByteFunction * casacore::CanonicalConversion::getByteToLocal | ( | const unsigned char * |  | ) |

static

## getByteToLocal() [9/10]

Conversion::ByteFunction * casacore::CanonicalConversion::getByteToLocal | ( | const unsigned int * |  | ) |

static

## getByteToLocal() [10/10]

Conversion::ByteFunction * casacore::CanonicalConversion::getByteToLocal | ( | const unsigned short * |  | ) |

static

## getFromLocal() [1/10]

Conversion::ValueFunction * casacore::CanonicalConversion::getFromLocal | ( | const char * |  | ) |

inline static

Definition at line 907 of file CanonicalConversion.h.

References fromLocalChar().

## getFromLocal() [2/10]

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

inline static

Definition at line 952 of file CanonicalConversion.h.

References fromLocalDouble().

## getFromLocal() [3/10]

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

inline static

Definition at line 947 of file CanonicalConversion.h.

References fromLocalFloat().

## getFromLocal() [4/10]

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

inline static

Definition at line 927 of file CanonicalConversion.h.

References fromLocalInt().

## getFromLocal() [5/10]

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

inline static

Definition at line 937 of file CanonicalConversion.h.

References fromLocalInt64().

## getFromLocal() [6/10]

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

inline static

Definition at line 917 of file CanonicalConversion.h.

References fromLocalShort().

## getFromLocal() [7/10]

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

inline static

Definition at line 942 of file CanonicalConversion.h.

References fromLocalUInt64().

## getFromLocal() [8/10]

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

inline static

Definition at line 912 of file CanonicalConversion.h.

References fromLocalUChar().

## getFromLocal() [9/10]

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

inline static

Definition at line 932 of file CanonicalConversion.h.

References fromLocalUInt().

## getFromLocal() [10/10]

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

inline static

Definition at line 922 of file CanonicalConversion.h.

References fromLocalUShort().

## getToLocal() [1/10]

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

inline static

Get the value conversion function for the given type.

Definition at line 856 of file CanonicalConversion.h.

References toLocalChar().

## getToLocal() [2/10]

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

inline static

Definition at line 901 of file CanonicalConversion.h.

References toLocalDouble().

## getToLocal() [3/10]

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

inline static

Definition at line 896 of file CanonicalConversion.h.

References toLocalFloat().

## getToLocal() [4/10]

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

inline static

Definition at line 876 of file CanonicalConversion.h.

References toLocalInt().

## getToLocal() [5/10]

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

inline static

Definition at line 886 of file CanonicalConversion.h.

References toLocalInt64().

## getToLocal() [6/10]

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

inline static

Definition at line 866 of file CanonicalConversion.h.

References toLocalShort().

## getToLocal() [7/10]

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

inline static

Definition at line 891 of file CanonicalConversion.h.

References toLocalUInt64().

## getToLocal() [8/10]

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

inline static

Definition at line 861 of file CanonicalConversion.h.

References toLocalUChar().

## getToLocal() [9/10]

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

inline static

Definition at line 881 of file CanonicalConversion.h.

References toLocalUInt().

## getToLocal() [10/10]

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

inline static

Definition at line 871 of file CanonicalConversion.h.

References toLocalUShort().

## move2()

void casacore::CanonicalConversion::move2 | ( | void * | to,
|  | const void * | from )

inline static

Move 2 bytes.

Definition at line 482 of file CanonicalConversion.h.

Referenced by fromLocal(), fromLocal(), casacore::LittleEndianConversion::fromLocal(), casacore::LittleEndianConversion::fromLocal(), toLocal(), toLocal(), casacore::LittleEndianConversion::toLocal(), and casacore::LittleEndianConversion::toLocal().

## move4()

void casacore::CanonicalConversion::move4 | ( | void * | to,
|  | const void * | from )

inline static

Move 4 bytes.

Definition at line 487 of file CanonicalConversion.h.

Referenced by fromLocal(), fromLocal(), fromLocal(), casacore::IBMConversion::fromLocal(), casacore::IBMConversion::fromLocal(), casacore::LittleEndianConversion::fromLocal(), casacore::LittleEndianConversion::fromLocal(), casacore::LittleEndianConversion::fromLocal(), casacore::LittleEndianConversion::fromLocal(), casacore::LittleEndianConversion::fromLocal(), toLocal(), toLocal(), toLocal(), casacore::IBMConversion::toLocal(), casacore::IBMConversion::toLocal(), casacore::LittleEndianConversion::toLocal(), casacore::LittleEndianConversion::toLocal(), and casacore::LittleEndianConversion::toLocal().

## move8()

void casacore::CanonicalConversion::move8 | ( | void * | to,
|  | const void * | from )

inline static

Move 8 bytes.

Definition at line 492 of file CanonicalConversion.h.

Referenced by fromLocal(), fromLocal(), fromLocal(), casacore::LittleEndianConversion::fromLocal(), toLocal(), toLocal(), toLocal(), and casacore::LittleEndianConversion::toLocal().

## reverse2()

void casacore::CanonicalConversion::reverse2 | ( | void * | to,
|  | const void * | from )

inline static

Reverse 2 bytes.

Definition at line 442 of file CanonicalConversion.h.

Referenced by fromLocal(), fromLocal(), casacore::LittleEndianConversion::fromLocal(), casacore::LittleEndianConversion::fromLocal(), toLocal(), toLocal(), casacore::LittleEndianConversion::toLocal(), and casacore::LittleEndianConversion::toLocal().

## reverse4()

void casacore::CanonicalConversion::reverse4 | ( | void * | to,
|  | const void * | from )

inline static

Reverse 4 bytes.

Definition at line 450 of file CanonicalConversion.h.

Referenced by fromLocal(), fromLocal(), fromLocal(), casacore::IBMConversion::fromLocal(), casacore::IBMConversion::fromLocal(), casacore::LittleEndianConversion::fromLocal(), casacore::LittleEndianConversion::fromLocal(), casacore::LittleEndianConversion::fromLocal(), casacore::LittleEndianConversion::fromLocal(), casacore::LittleEndianConversion::fromLocal(), toLocal(), toLocal(), toLocal(), casacore::IBMConversion::toLocal(), casacore::IBMConversion::toLocal(), casacore::LittleEndianConversion::toLocal(), casacore::LittleEndianConversion::toLocal(), and casacore::LittleEndianConversion::toLocal().

## reverse8()

void casacore::CanonicalConversion::reverse8 | ( | void * | to,
|  | const void * | from )

inline static

Reverse 8 bytes.

Definition at line 463 of file CanonicalConversion.h.

Referenced by fromLocal(), fromLocal(), fromLocal(), casacore::LittleEndianConversion::fromLocal(), toLocal(), toLocal(), toLocal(), and casacore::LittleEndianConversion::toLocal().

## toLocal() [1/20]

size_t casacore::CanonicalConversion::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 505 of file CanonicalConversion.h.

References SIZE_CAN_CHAR.

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

## toLocal() [2/20]

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

inline static

Convert nr values from canonical format to local format.

The from and to buffer should not overlap.

Definition at line 733 of file CanonicalConversion.h.

References toLocalChar().

## toLocal() [3/20]

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

inline static

Definition at line 620 of file CanonicalConversion.h.

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

## toLocal() [4/20]

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

inline static

Definition at line 787 of file CanonicalConversion.h.

References toLocalDouble().

## toLocal() [5/20]

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

inline static

Definition at line 610 of file CanonicalConversion.h.

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

## toLocal() [6/20]

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

inline static

Definition at line 781 of file CanonicalConversion.h.

References toLocalFloat().

## toLocal() [7/20]

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

inline static

Definition at line 549 of file CanonicalConversion.h.

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

## toLocal() [8/20]

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

inline static

Definition at line 757 of file CanonicalConversion.h.

References toLocalInt().

## toLocal() [9/20]

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

inline static

Definition at line 580 of file CanonicalConversion.h.

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

## toLocal() [10/20]

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

inline static

Definition at line 769 of file CanonicalConversion.h.

References toLocalInt64().

## toLocal() [11/20]

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

inline static

Definition at line 518 of file CanonicalConversion.h.

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

## toLocal() [12/20]

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

inline static

Definition at line 745 of file CanonicalConversion.h.

References toLocalShort().

## toLocal() [13/20]

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

inline static

Definition at line 597 of file CanonicalConversion.h.

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

## toLocal() [14/20]

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

inline static

Definition at line 775 of file CanonicalConversion.h.

References toLocalUInt64().

## toLocal() [15/20]

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

inline static

Definition at line 511 of file CanonicalConversion.h.

References SIZE_CAN_UCHAR.

## toLocal() [16/20]

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

inline static

Definition at line 739 of file CanonicalConversion.h.

References toLocalUChar().

## toLocal() [17/20]

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

inline static

Definition at line 566 of file CanonicalConversion.h.

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

## toLocal() [18/20]

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

inline static

Definition at line 763 of file CanonicalConversion.h.

References toLocalUInt().

## toLocal() [19/20]

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

inline static

Definition at line 535 of file CanonicalConversion.h.

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

## toLocal() [20/20]

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

inline static

Definition at line 751 of file CanonicalConversion.h.

References toLocalUShort().

## toLocalChar()

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 getToLocal(), toLocal(), and casacore::ModcompConversion::toLocal().

## toLocalDouble()

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

static

Referenced by getToLocal(), and toLocal().

## toLocalFloat()

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

static

Referenced by getToLocal(), and toLocal().

## toLocalInt()

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

static

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

## toLocalInt64()

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

static

Referenced by getToLocal(), and toLocal().

## toLocalShort()

size_t casacore::CanonicalConversion::toLocalShort | ( | void * | to,
|  | const void * | from,
|  | size_t | nr )

static

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

## toLocalUChar()

size_t casacore::CanonicalConversion::toLocalUChar | ( | void * | to,
|  | const void * | from,
|  | size_t | nr )

static

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

## toLocalUInt()

size_t casacore::CanonicalConversion::toLocalUInt | ( | void * | to,
|  | const void * | from,
|  | size_t | nr )

static

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

## toLocalUInt64()

size_t casacore::CanonicalConversion::toLocalUInt64 | ( | void * | to,
|  | const void * | from,
|  | size_t | nr )

static

Referenced by getToLocal(), and toLocal().

## toLocalUShort()

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

static

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

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

- casa/OS/CanonicalConversion.h