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

More...

`#include <LittleEndianConversion.h>`

## Static Public Member Functions

static void | toLocal (char &to, const void *from)
| Convert one value from littleEndian format to local format.
static void | toLocal (unsigned char &to, const void *from)
static void | toLocal (short &to, const void *from)
static void | toLocal (unsigned short &to, const void *from)
static void | toLocal (int &to, const void *from)
static void | toLocal (unsigned int &to, const void *from)
static void | toLocal (Int64 &to, const void *from)
static void | toLocal (uInt64 &to, const void *from)
static void | toLocal (float &to, const void *from)
static void | toLocal (double &to, const void *from)
static void | toLocal (char *to, const void *from, size_t nr)
| Convert nr values from littleEndian format to local format.
static void | toLocal (unsigned char *to, const void *from, size_t nr)
static void | toLocal (short *to, const void *from, size_t nr)
static void | toLocal (unsigned short *to, const void *from, size_t nr)
static void | toLocal (int *to, const void *from, size_t nr)
static void | toLocal (unsigned int *to, const void *from, size_t nr)
static void | toLocal (Int64 *to, const void *from, size_t nr)
static void | toLocal (uInt64 *to, const void *from, size_t nr)
static void | toLocal (float *to, const void *from, size_t nr)
static void | toLocal (double *to, const void *from, size_t nr)
static void | fromLocal (void *to, char from)
| Convert one value from local format to littleEndian format.
static void | fromLocal (void *to, unsigned char from)
static void | fromLocal (void *to, short from)
static void | fromLocal (void *to, unsigned short from)
static void | fromLocal (void *to, int from)
static void | fromLocal (void *to, unsigned int from)
static void | fromLocal (void *to, Int64 from)
static void | fromLocal (void *to, uInt64 from)
static void | fromLocal (void *to, float from)
static void | fromLocal (void *to, double from)
static void | fromLocal (void *to, const char *from, size_t nr)
| Convert nr values from local format to littleEndian format.
static void | fromLocal (void *to, const unsigned char *from, size_t nr)
static void | fromLocal (void *to, const short *from, size_t nr)
static void | fromLocal (void *to, const unsigned short *from, size_t nr)
static void | fromLocal (void *to, const int *from, size_t nr)
static void | fromLocal (void *to, const unsigned int *from, size_t nr)
static void | fromLocal (void *to, const Int64 *from, size_t nr)
static void | fromLocal (void *to, const uInt64 *from, size_t nr)
static void | fromLocal (void *to, const float *from, size_t nr)
static void | fromLocal (void *to, const double *from, size_t nr)

## Private Member Functions

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

## Detailed Description

A class with static functions to convert littleEndian format

### Intended use:

Public interface

### Review Status

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

### Synopsis

This class is intended to be used as a common class for all classes converting data to/from little-endian format.

### Motivation

Sometimes data are stored in little-endian format (e.g. old VAX-data). Instead of putting all these conversion functions in all such classes, it is better to keep them separate to be able to use them elsewhere. However, note that this version handles a long as 4 bytes. On several little-endian machines (e.g. DEC-alpha) a long is 8 bytes, so a special function is needed for them.

### To Do

- Support data type long double.
- Support a long as 4 or as 8 bytes.

Definition at line 65 of file LittleEndianConversion.h.

## Constructor & Destructor Documentation

## LittleEndianConversion()

casacore::LittleEndianConversion::LittleEndianConversion | ( |  | ) |

private

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

## Member Function Documentation

## fromLocal() [1/20]

void casacore::LittleEndianConversion::fromLocal | ( | void * | to,
|  | char | from )

inline static

Convert one value from local format to littleEndian format.

The from and to buffer should not overlap.

Definition at line 259 of file LittleEndianConversion.h.

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

## fromLocal() [2/20]

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

static

Convert nr values from local format to littleEndian format.

The from and to buffer should not overlap.

## fromLocal() [3/20]

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

static

## fromLocal() [4/20]

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

static

## fromLocal() [5/20]

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

static

## fromLocal() [6/20]

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

static

## fromLocal() [7/20]

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

static

## fromLocal() [8/20]

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

static

## fromLocal() [9/20]

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

static

## fromLocal() [10/20]

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

static

## fromLocal() [11/20]

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

static

## fromLocal() [12/20]

void casacore::LittleEndianConversion::fromLocal | ( | void * | to,
|  | double | from )

inline static

Definition at line 331 of file LittleEndianConversion.h.

References casacore::CanonicalConversion::move8(), and casacore::CanonicalConversion::reverse8().

## fromLocal() [13/20]

void casacore::LittleEndianConversion::fromLocal | ( | void * | to,
|  | float | from )

inline static

Definition at line 322 of file LittleEndianConversion.h.

References casacore::CanonicalConversion::move4(), and casacore::CanonicalConversion::reverse4().

## fromLocal() [14/20]

void casacore::LittleEndianConversion::fromLocal | ( | void * | to,
|  | int | from )

inline static

Definition at line 286 of file LittleEndianConversion.h.

References casacore::CanonicalConversion::move4(), and casacore::CanonicalConversion::reverse4().

## fromLocal() [15/20]

void casacore::LittleEndianConversion::fromLocal | ( | void * | to,
|  | Int64 | from )

inline static

Definition at line 304 of file LittleEndianConversion.h.

References casacore::CanonicalConversion::move4(), and casacore::CanonicalConversion::reverse4().

## fromLocal() [16/20]

void casacore::LittleEndianConversion::fromLocal | ( | void * | to,
|  | short | from )

inline static

Definition at line 268 of file LittleEndianConversion.h.

References casacore::CanonicalConversion::move2(), and casacore::CanonicalConversion::reverse2().

## fromLocal() [17/20]

void casacore::LittleEndianConversion::fromLocal | ( | void * | to,
|  | uInt64 | from )

inline static

Definition at line 313 of file LittleEndianConversion.h.

References casacore::CanonicalConversion::move4(), and casacore::CanonicalConversion::reverse4().

## fromLocal() [18/20]

void casacore::LittleEndianConversion::fromLocal | ( | void * | to,
|  | unsigned char | from )

inline static

Definition at line 263 of file LittleEndianConversion.h.

## fromLocal() [19/20]

void casacore::LittleEndianConversion::fromLocal | ( | void * | to,
|  | unsigned int | from )

inline static

Definition at line 295 of file LittleEndianConversion.h.

References casacore::CanonicalConversion::move4(), and casacore::CanonicalConversion::reverse4().

## fromLocal() [20/20]

void casacore::LittleEndianConversion::fromLocal | ( | void * | to,
|  | unsigned short | from )

inline static

Definition at line 277 of file LittleEndianConversion.h.

References casacore::CanonicalConversion::move2(), and casacore::CanonicalConversion::reverse2().

## toLocal() [1/20]

void casacore::LittleEndianConversion::toLocal | ( | char & | to,
|  | const void * | from )

inline static

Convert one value from littleEndian format to local format.

The from and to buffer should not overlap.

Definition at line 156 of file LittleEndianConversion.h.

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

## toLocal() [2/20]

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

static

Convert nr values from littleEndian format to local format.

The from and to buffer should not overlap.

## toLocal() [3/20]

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

inline static

Definition at line 249 of file LittleEndianConversion.h.

References casacore::CanonicalConversion::move8(), and casacore::CanonicalConversion::reverse8().

## toLocal() [4/20]

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

static

## toLocal() [5/20]

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

inline static

Definition at line 240 of file LittleEndianConversion.h.

References casacore::CanonicalConversion::move4(), and casacore::CanonicalConversion::reverse4().

## toLocal() [6/20]

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

static

## toLocal() [7/20]

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

inline static

Definition at line 196 of file LittleEndianConversion.h.

References casacore::CanonicalConversion::move4(), and casacore::CanonicalConversion::reverse4().

## toLocal() [8/20]

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

static

## toLocal() [9/20]

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

inline static

Definition at line 225 of file LittleEndianConversion.h.

References toLocal().

## toLocal() [10/20]

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

static

## toLocal() [11/20]

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

inline static

Definition at line 167 of file LittleEndianConversion.h.

References casacore::CanonicalConversion::move2(), and casacore::CanonicalConversion::reverse2().

## toLocal() [12/20]

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

static

## toLocal() [13/20]

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

inline static

Definition at line 232 of file LittleEndianConversion.h.

References toLocal().

## toLocal() [14/20]

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

static

## toLocal() [15/20]

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

inline static

Definition at line 161 of file LittleEndianConversion.h.

## toLocal() [16/20]

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

static

## toLocal() [17/20]

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

inline static

Definition at line 212 of file LittleEndianConversion.h.

References casacore::CanonicalConversion::move4(), and casacore::CanonicalConversion::reverse4().

## toLocal() [18/20]

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

static

## toLocal() [19/20]

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

inline static

Definition at line 183 of file LittleEndianConversion.h.

References casacore::CanonicalConversion::move2(), and casacore::CanonicalConversion::reverse2().

## toLocal() [20/20]

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

static

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

- casa/OS/LittleEndianConversion.h