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::ModcompConversion Class Reference

Static functions to convert Modcomp numeric formats. 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. More...
 
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. More...
 
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. More...
 
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. More...
 
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). More...

 

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

Definition at line 116 of file ModcompConversion.h.

Constructor & Destructor Documentation

casacore::ModcompConversion::ModcompConversion ( )
private

This class should not be constructed

(so declare the constructor private).

Member Function Documentation

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

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 257 of file ModcompConversion.h.

References casacore::CanonicalConversion::fromLocal().

Referenced by fromLocal().

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

Definition at line 261 of file ModcompConversion.h.

References casacore::CanonicalConversion::fromLocal().

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

Definition at line 265 of file ModcompConversion.h.

References casacore::CanonicalConversion::fromLocal().

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

Definition at line 269 of file ModcompConversion.h.

References casacore::CanonicalConversion::fromLocal().

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

Definition at line 273 of file ModcompConversion.h.

References casacore::CanonicalConversion::fromLocal().

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

Definition at line 277 of file ModcompConversion.h.

References casacore::CanonicalConversion::fromLocal().

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

Definition at line 281 of file ModcompConversion.h.

References casacore::CanonicalConversion::fromLocal().

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

Definition at line 285 of file ModcompConversion.h.

References casacore::CanonicalConversion::fromLocal().

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

Definition at line 289 of file ModcompConversion.h.

References fromLocal().

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

Definition at line 293 of file ModcompConversion.h.

References fromLocal().

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

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 297 of file ModcompConversion.h.

References casacore::CanonicalConversion::fromLocalChar().

size_t casacore::ModcompConversion::fromLocal ( void *  to,
const uChar from,
size_t  nr 
)
inlinestatic
size_t casacore::ModcompConversion::fromLocal ( void *  to,
const Short from,
size_t  nr 
)
inlinestatic
size_t casacore::ModcompConversion::fromLocal ( void *  to,
const uShort from,
size_t  nr 
)
inlinestatic
size_t casacore::ModcompConversion::fromLocal ( void *  to,
const Int from,
size_t  nr 
)
inlinestatic
size_t casacore::ModcompConversion::fromLocal ( void *  to,
const uInt from,
size_t  nr 
)
inlinestatic
static size_t casacore::ModcompConversion::fromLocal ( void *  to,
const Int64 from,
size_t  nr 
)
static
static size_t casacore::ModcompConversion::fromLocal ( void *  to,
const uInt64 from,
size_t  nr 
)
static
static size_t casacore::ModcompConversion::fromLocal ( void *  to,
const Float from,
size_t  nr 
)
static
static size_t casacore::ModcompConversion::fromLocal ( void *  to,
const Double from,
size_t  nr 
)
static
size_t casacore::ModcompConversion::toLocal ( Char to,
const void *  from 
)
inlinestatic

Convert one value from Modcomp format to local format.

The from and to buffer should not overlap.

Definition at line 187 of file ModcompConversion.h.

References casacore::CanonicalConversion::toLocal().

Referenced by toLocal().

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

Definition at line 191 of file ModcompConversion.h.

References casacore::CanonicalConversion::toLocal().

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

Definition at line 195 of file ModcompConversion.h.

References casacore::CanonicalConversion::toLocal().

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

Definition at line 199 of file ModcompConversion.h.

References casacore::CanonicalConversion::toLocal().

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

Definition at line 203 of file ModcompConversion.h.

References casacore::CanonicalConversion::toLocal().

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

Definition at line 207 of file ModcompConversion.h.

References casacore::CanonicalConversion::toLocal().

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

Definition at line 211 of file ModcompConversion.h.

References toLocal().

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

Definition at line 218 of file ModcompConversion.h.

References toLocal().

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

Definition at line 225 of file ModcompConversion.h.

References toLocal().

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

Definition at line 229 of file ModcompConversion.h.

References toLocal().

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

Convert nr values from Modcomp format to local format.

The from and to buffer should not overlap.

Definition at line 233 of file ModcompConversion.h.

References casacore::CanonicalConversion::toLocalChar().

size_t casacore::ModcompConversion::toLocal ( uChar to,
const void *  from,
size_t  nr 
)
inlinestatic
size_t casacore::ModcompConversion::toLocal ( Short to,
const void *  from,
size_t  nr 
)
inlinestatic
size_t casacore::ModcompConversion::toLocal ( uShort to,
const void *  from,
size_t  nr 
)
inlinestatic
size_t casacore::ModcompConversion::toLocal ( Int to,
const void *  from,
size_t  nr 
)
inlinestatic

Definition at line 249 of file ModcompConversion.h.

References casacore::CanonicalConversion::toLocalInt().

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

Definition at line 253 of file ModcompConversion.h.

References casacore::CanonicalConversion::toLocalUInt().

static size_t casacore::ModcompConversion::toLocal ( Int64 to,
const void *  from,
size_t  nr 
)
static
static size_t casacore::ModcompConversion::toLocal ( uInt64 to,
const void *  from,
size_t  nr 
)
static
static size_t casacore::ModcompConversion::toLocal ( Float to,
const void *  from,
size_t  nr 
)
static
static size_t casacore::ModcompConversion::toLocal ( Double to,
const void *  from,
size_t  nr 
)
static

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