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

More...

`#include <ModcompConversion.h>`

## Static Public Member Functions

static size_t | toLocal (Char &to, const void *from)
| Convert one value from Modcomp format to local format.
static size_t | toLocal (uChar &to, const void *from)
static size_t | toLocal (Short &to, const void *from)
static size_t | toLocal (uShort &to, const void *from)
static size_t | toLocal (Int &to, const void *from)
static size_t | toLocal (uInt &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 | toLocal (Char *to, const void *from, size_t nr)
| Convert nr values from Modcomp format to local format.
static size_t | toLocal (uChar *to, const void *from, size_t nr)
static size_t | toLocal (Short *to, const void *from, size_t nr)
static size_t | toLocal (uShort *to, const void *from, size_t nr)
static size_t | toLocal (Int *to, const void *from, size_t nr)
static size_t | toLocal (uInt *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, Char from)
| Convert one value from local format to Modcomp format.
static size_t | fromLocal (void *to, uChar from)
static size_t | fromLocal (void *to, Short from)
static size_t | fromLocal (void *to, uShort from)
static size_t | fromLocal (void *to, Int from)
static size_t | fromLocal (void *to, uInt from)
static size_t | fromLocal (void *to, Int64 from)
static size_t | fromLocal (void *to, uInt64 from)
static size_t | fromLocal (void *to, Float from)
static size_t | fromLocal (void *to, Double from)
static size_t | fromLocal (void *to, const Char *from, size_t nr)
| Convert nr values from local format to Modcomp format.
static size_t | fromLocal (void *to, const uChar *from, size_t nr)
static size_t | fromLocal (void *to, const Short *from, size_t nr)
static size_t | fromLocal (void *to, const uShort *from, size_t nr)
static size_t | fromLocal (void *to, const Int *from, size_t nr)
static size_t | fromLocal (void *to, const uInt *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)

## Private Member Functions

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

## Detailed Description

Static functions to convert Modcomp numeric formats

### Intended use:

Public interface

### Review Status

Date Reviewed:
  yyyy/mm/dd
Test programs:
  tModcompConversion

### Synopsis

This class contains static toLocal functions to convert data from Modcomp format to local format and vice-versa.

The functions work on both big-endian and little-endian machines. They convert between Modcomp 2-byte integers and Shorts (or uShorts) and Modcomp 4-byte integers and Ints (or uInts, Int64s or uInt64s).

It is currently not possible to convert floating point numbers from local format to Modcomp. Attempting to do so will throw an exception (AipsError).

### Motivation

The VLA data is stored using Modcomp numeric data formats and needs to be converted to the local format to be manipulated.

### To Do

- Support conversion of floating point data to Modcomp format
- Support data type long double.

Definition at line 114 of file ModcompConversion.h.

## Constructor & Destructor Documentation

## ModcompConversion()

casacore::ModcompConversion::ModcompConversion | ( |  | ) |

private

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

## Member Function Documentation

## fromLocal() [1/20]

size_t casacore::ModcompConversion::fromLocal | ( | void * | to,
|  | Char | from )

inline static

Convert one value from local format to Modcomp format.

The from and to buffer should not overlap. The floating point functions will throw exceptions as they are not implemented yet.

Definition at line 255 of file ModcompConversion.h.

References casacore::CanonicalConversion::fromLocal().

Referenced by fromLocal(), and fromLocal().

## fromLocal() [2/20]

size_t casacore::ModcompConversion::fromLocal | ( | void * | to,
|  | const Char * | from,
|  | size_t | nr )

inline static

Convert nr values from local format to Modcomp format.

The from and to buffer should not overlap. The floating point functions will throw exceptions as they are not implemented yet.

Definition at line 295 of file ModcompConversion.h.

References casacore::CanonicalConversion::fromLocalChar().

## fromLocal() [3/20]

size_t casacore::ModcompConversion::fromLocal | ( | void * | to,
|  | const Double * | from,
|  | size_t | nr )

static

## fromLocal() [4/20]

size_t casacore::ModcompConversion::fromLocal | ( | void * | to,
|  | const Float * | from,
|  | size_t | nr )

static

## fromLocal() [5/20]

size_t casacore::ModcompConversion::fromLocal | ( | void * | to,
|  | const Int * | from,
|  | size_t | nr )

inline static

Definition at line 311 of file ModcompConversion.h.

References casacore::CanonicalConversion::fromLocalInt().

## fromLocal() [6/20]

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

static

## fromLocal() [7/20]

size_t casacore::ModcompConversion::fromLocal | ( | void * | to,
|  | const Short * | from,
|  | size_t | nr )

inline static

Definition at line 303 of file ModcompConversion.h.

References casacore::CanonicalConversion::fromLocalShort().

## fromLocal() [8/20]

size_t casacore::ModcompConversion::fromLocal | ( | void * | to,
|  | const uChar * | from,
|  | size_t | nr )

inline static

Definition at line 299 of file ModcompConversion.h.

References casacore::CanonicalConversion::fromLocalUChar().

## fromLocal() [9/20]

size_t casacore::ModcompConversion::fromLocal | ( | void * | to,
|  | const uInt * | from,
|  | size_t | nr )

inline static

Definition at line 315 of file ModcompConversion.h.

References casacore::CanonicalConversion::fromLocalUInt().

## fromLocal() [10/20]

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

static

## fromLocal() [11/20]

size_t casacore::ModcompConversion::fromLocal | ( | void * | to,
|  | const uShort * | from,
|  | size_t | nr )

inline static

Definition at line 307 of file ModcompConversion.h.

References casacore::CanonicalConversion::fromLocalUShort().

## fromLocal() [12/20]

size_t casacore::ModcompConversion::fromLocal | ( | void * | to,
|  | Double | from )

inline static

Definition at line 291 of file ModcompConversion.h.

References fromLocal().

## fromLocal() [13/20]

size_t casacore::ModcompConversion::fromLocal | ( | void * | to,
|  | Float | from )

inline static

Definition at line 287 of file ModcompConversion.h.

References fromLocal().

## fromLocal() [14/20]

size_t casacore::ModcompConversion::fromLocal | ( | void * | to,
|  | Int | from )

inline static

Definition at line 271 of file ModcompConversion.h.

References casacore::CanonicalConversion::fromLocal().

## fromLocal() [15/20]

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

inline static

Definition at line 279 of file ModcompConversion.h.

References casacore::CanonicalConversion::fromLocal().

## fromLocal() [16/20]

size_t casacore::ModcompConversion::fromLocal | ( | void * | to,
|  | Short | from )

inline static

Definition at line 263 of file ModcompConversion.h.

References casacore::CanonicalConversion::fromLocal().

## fromLocal() [17/20]

size_t casacore::ModcompConversion::fromLocal | ( | void * | to,
|  | uChar | from )

inline static

Definition at line 259 of file ModcompConversion.h.

References casacore::CanonicalConversion::fromLocal().

## fromLocal() [18/20]

size_t casacore::ModcompConversion::fromLocal | ( | void * | to,
|  | uInt | from )

inline static

Definition at line 275 of file ModcompConversion.h.

References casacore::CanonicalConversion::fromLocal().

## fromLocal() [19/20]

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

inline static

Definition at line 283 of file ModcompConversion.h.

References casacore::CanonicalConversion::fromLocal().

## fromLocal() [20/20]

size_t casacore::ModcompConversion::fromLocal | ( | void * | to,
|  | uShort | from )

inline static

Definition at line 267 of file ModcompConversion.h.

References casacore::CanonicalConversion::fromLocal().

## toLocal() [1/20]

size_t casacore::ModcompConversion::toLocal | ( | Char & | to,
|  | const void * | from )

inline static

Convert one value from Modcomp format to local format.

The from and to buffer should not overlap.

Definition at line 185 of file ModcompConversion.h.

References casacore::CanonicalConversion::toLocal().

Referenced by toLocal(), toLocal(), toLocal(), and toLocal().

## toLocal() [2/20]

size_t casacore::ModcompConversion::toLocal | ( | Char * | to,
|  | const void * | from,
|  | size_t | nr )

inline static

Convert nr values from Modcomp format to local format.

The from and to buffer should not overlap.

Definition at line 231 of file ModcompConversion.h.

References casacore::CanonicalConversion::toLocalChar().

## toLocal() [3/20]

size_t casacore::ModcompConversion::toLocal | ( | Double & | to,
|  | const void * | from )

inline static

Definition at line 227 of file ModcompConversion.h.

References toLocal().

## toLocal() [4/20]

size_t casacore::ModcompConversion::toLocal | ( | Double * | to,
|  | const void * | from,
|  | size_t | nr )

static

## toLocal() [5/20]

size_t casacore::ModcompConversion::toLocal | ( | Float & | to,
|  | const void * | from )

inline static

Definition at line 223 of file ModcompConversion.h.

References toLocal().

## toLocal() [6/20]

size_t casacore::ModcompConversion::toLocal | ( | Float * | to,
|  | const void * | from,
|  | size_t | nr )

static

## toLocal() [7/20]

size_t casacore::ModcompConversion::toLocal | ( | Int & | to,
|  | const void * | from )

inline static

Definition at line 201 of file ModcompConversion.h.

References casacore::CanonicalConversion::toLocal().

## toLocal() [8/20]

size_t casacore::ModcompConversion::toLocal | ( | Int * | to,
|  | const void * | from,
|  | size_t | nr )

inline static

Definition at line 247 of file ModcompConversion.h.

References casacore::CanonicalConversion::toLocalInt().

## toLocal() [9/20]

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

inline static

Definition at line 209 of file ModcompConversion.h.

References toLocal().

## toLocal() [10/20]

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

static

## toLocal() [11/20]

size_t casacore::ModcompConversion::toLocal | ( | Short & | to,
|  | const void * | from )

inline static

Definition at line 193 of file ModcompConversion.h.

References casacore::CanonicalConversion::toLocal().

## toLocal() [12/20]

size_t casacore::ModcompConversion::toLocal | ( | Short * | to,
|  | const void * | from,
|  | size_t | nr )

inline static

Definition at line 239 of file ModcompConversion.h.

References casacore::CanonicalConversion::toLocalShort().

## toLocal() [13/20]

size_t casacore::ModcompConversion::toLocal | ( | uChar & | to,
|  | const void * | from )

inline static

Definition at line 189 of file ModcompConversion.h.

References casacore::CanonicalConversion::toLocal().

## toLocal() [14/20]

size_t casacore::ModcompConversion::toLocal | ( | uChar * | to,
|  | const void * | from,
|  | size_t | nr )

inline static

Definition at line 235 of file ModcompConversion.h.

References casacore::CanonicalConversion::toLocalUChar().

## toLocal() [15/20]

size_t casacore::ModcompConversion::toLocal | ( | uInt & | to,
|  | const void * | from )

inline static

Definition at line 205 of file ModcompConversion.h.

References casacore::CanonicalConversion::toLocal().

## toLocal() [16/20]

size_t casacore::ModcompConversion::toLocal | ( | uInt * | to,
|  | const void * | from,
|  | size_t | nr )

inline static

Definition at line 251 of file ModcompConversion.h.

References casacore::CanonicalConversion::toLocalUInt().

## toLocal() [17/20]

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

inline static

Definition at line 216 of file ModcompConversion.h.

References toLocal().

## toLocal() [18/20]

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

static

## toLocal() [19/20]

size_t casacore::ModcompConversion::toLocal | ( | uShort & | to,
|  | const void * | from )

inline static

Definition at line 197 of file ModcompConversion.h.

References casacore::CanonicalConversion::toLocal().

## toLocal() [20/20]

size_t casacore::ModcompConversion::toLocal | ( | uShort * | to,
|  | const void * | from,
|  | size_t | nr )

inline static

Definition at line 243 of file ModcompConversion.h.

References casacore::CanonicalConversion::toLocalUShort().

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

- casa/OS/ModcompConversion.h