casacore
Static Public Member Functions | Private Member Functions | List of all members
casacore::ModcompConversion Class Reference

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

◆ 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 
)
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().

◆ fromLocal() [2/20]

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().

◆ fromLocal() [3/20]

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

◆ fromLocal() [4/20]

static 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 
)
inlinestatic

◆ fromLocal() [6/20]

static 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 
)
inlinestatic

◆ fromLocal() [8/20]

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

◆ fromLocal() [9/20]

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

◆ fromLocal() [10/20]

static 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 
)
inlinestatic

◆ fromLocal() [12/20]

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

Definition at line 293 of file ModcompConversion.h.

References fromLocal().

◆ fromLocal() [13/20]

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

Definition at line 289 of file ModcompConversion.h.

References fromLocal().

◆ fromLocal() [14/20]

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

Definition at line 273 of file ModcompConversion.h.

References casacore::CanonicalConversion::fromLocal().

◆ fromLocal() [15/20]

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

Definition at line 281 of file ModcompConversion.h.

References casacore::CanonicalConversion::fromLocal().

◆ fromLocal() [16/20]

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

Definition at line 265 of file ModcompConversion.h.

References casacore::CanonicalConversion::fromLocal().

◆ fromLocal() [17/20]

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

Definition at line 261 of file ModcompConversion.h.

References casacore::CanonicalConversion::fromLocal().

◆ fromLocal() [18/20]

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

Definition at line 277 of file ModcompConversion.h.

References casacore::CanonicalConversion::fromLocal().

◆ fromLocal() [19/20]

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

Definition at line 285 of file ModcompConversion.h.

References casacore::CanonicalConversion::fromLocal().

◆ fromLocal() [20/20]

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

Definition at line 269 of file ModcompConversion.h.

References casacore::CanonicalConversion::fromLocal().

◆ toLocal() [1/20]

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().

◆ toLocal() [2/20]

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().

◆ toLocal() [3/20]

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

Definition at line 229 of file ModcompConversion.h.

References toLocal().

◆ toLocal() [4/20]

static 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 
)
inlinestatic

Definition at line 225 of file ModcompConversion.h.

References toLocal().

◆ toLocal() [6/20]

static 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 
)
inlinestatic

Definition at line 203 of file ModcompConversion.h.

References casacore::CanonicalConversion::toLocal().

◆ toLocal() [8/20]

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().

◆ toLocal() [9/20]

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

Definition at line 211 of file ModcompConversion.h.

References toLocal().

◆ toLocal() [10/20]

static 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 
)
inlinestatic

Definition at line 195 of file ModcompConversion.h.

References casacore::CanonicalConversion::toLocal().

◆ toLocal() [12/20]

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

◆ toLocal() [13/20]

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

Definition at line 191 of file ModcompConversion.h.

References casacore::CanonicalConversion::toLocal().

◆ toLocal() [14/20]

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

◆ toLocal() [15/20]

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

Definition at line 207 of file ModcompConversion.h.

References casacore::CanonicalConversion::toLocal().

◆ toLocal() [16/20]

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().

◆ toLocal() [17/20]

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

Definition at line 218 of file ModcompConversion.h.

References toLocal().

◆ toLocal() [18/20]

static 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 
)
inlinestatic

Definition at line 199 of file ModcompConversion.h.

References casacore::CanonicalConversion::toLocal().

◆ toLocal() [20/20]

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

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