casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Static Public Member Functions | Private Member Functions
casa::ModcompConversion Class Reference

Static functions to convert Modcomp numeric formats. More...

#include <ModcompConversion.h>

List of all members.

Static Public Member Functions

static uInt toLocal (Char &to, const void *from)
 Convert one value from Modcomp format to local format.
static uInt toLocal (uChar &to, const void *from)
static uInt toLocal (Short &to, const void *from)
static uInt toLocal (uShort &to, const void *from)
static uInt toLocal (Int &to, const void *from)
static uInt toLocal (uInt &to, const void *from)
static uInt toLocal (Int64 &to, const void *from)
static uInt toLocal (uInt64 &to, const void *from)
static uInt toLocal (Float &to, const void *from)
static uInt toLocal (Double &to, const void *from)
static uInt toLocal (Char *to, const void *from, uInt nr)
 Convert nr values from Modcomp format to local format.
static uInt toLocal (uChar *to, const void *from, uInt nr)
static uInt toLocal (Short *to, const void *from, uInt nr)
static uInt toLocal (uShort *to, const void *from, uInt nr)
static uInt toLocal (Int *to, const void *from, uInt nr)
static uInt toLocal (uInt *to, const void *from, uInt nr)
static uInt toLocal (Int64 *to, const void *from, uInt nr)
static uInt toLocal (uInt64 *to, const void *from, uInt nr)
static uInt toLocal (Float *to, const void *from, uInt nr)
static uInt toLocal (Double *to, const void *from, uInt nr)
static uInt fromLocal (void *to, Char from)
 Convert one value from local format to Modcomp format.
static uInt fromLocal (void *to, uChar from)
static uInt fromLocal (void *to, Short from)
static uInt fromLocal (void *to, uShort from)
static uInt fromLocal (void *to, Int from)
static uInt fromLocal (void *to, uInt from)
static uInt fromLocal (void *to, Int64 from)
static uInt fromLocal (void *to, uInt64 from)
static uInt fromLocal (void *to, Float from)
static uInt fromLocal (void *to, Double from)
static uInt fromLocal (void *to, const Char *from, uInt nr)
 Convert nr values from local format to Modcomp format.
static uInt fromLocal (void *to, const uChar *from, uInt nr)
static uInt fromLocal (void *to, const Short *from, uInt nr)
static uInt fromLocal (void *to, const uShort *from, uInt nr)
static uInt fromLocal (void *to, const Int *from, uInt nr)
static uInt fromLocal (void *to, const uInt *from, uInt nr)
static uInt fromLocal (void *to, const Int64 *from, uInt nr)
static uInt fromLocal (void *to, const uInt64 *from, uInt nr)
static uInt fromLocal (void *to, const Float *from, uInt nr)
static uInt fromLocal (void *to, const Double *from, uInt nr)

Private Member Functions

 ModcompConversion ()
 
   


Detailed Description

Static functions to convert Modcomp numeric formats.

Intended use:

Public interface

 <h3>Review Status</h3><dl><dt>Date Reviewed:<dd>yyyy/mm/dd<dt>Test programs:<dd>tModcompConversion</dl> 

<h3>Synopsis</h3>
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).

<h3>Motivation</h3>
The VLA data is stored using Modcomp numeric data formats and needs to be
converted to the local format to be manipulated.

<h3>To Do</h3><ul>  <li> Support conversion of floating point data to Modcomp format
 <li> Support data type long double.
</ul>

Definition at line 116 of file ModcompConversion.h.


Constructor & Destructor Documentation

   

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


Member Function Documentation

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

Referenced by fromLocal().

uInt casa::ModcompConversion::fromLocal ( void *  to,
uChar  from 
) [inline, static]

Definition at line 261 of file ModcompConversion.h.

References fromLocal().

uInt casa::ModcompConversion::fromLocal ( void *  to,
Short  from 
) [inline, static]

Definition at line 265 of file ModcompConversion.h.

References fromLocal().

uInt casa::ModcompConversion::fromLocal ( void *  to,
uShort  from 
) [inline, static]

Definition at line 269 of file ModcompConversion.h.

References fromLocal().

uInt casa::ModcompConversion::fromLocal ( void *  to,
Int  from 
) [inline, static]

Definition at line 273 of file ModcompConversion.h.

References fromLocal().

uInt casa::ModcompConversion::fromLocal ( void *  to,
uInt  from 
) [inline, static]

Definition at line 277 of file ModcompConversion.h.

References fromLocal().

uInt casa::ModcompConversion::fromLocal ( void *  to,
Int64  from 
) [inline, static]

Definition at line 281 of file ModcompConversion.h.

References fromLocal().

uInt casa::ModcompConversion::fromLocal ( void *  to,
uInt64  from 
) [inline, static]

Definition at line 285 of file ModcompConversion.h.

References fromLocal().

uInt casa::ModcompConversion::fromLocal ( void *  to,
Float  from 
) [inline, static]

Definition at line 289 of file ModcompConversion.h.

References fromLocal().

uInt casa::ModcompConversion::fromLocal ( void *  to,
Double  from 
) [inline, static]

Definition at line 293 of file ModcompConversion.h.

References fromLocal().

uInt casa::ModcompConversion::fromLocal ( void *  to,
const Char from,
uInt  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 297 of file ModcompConversion.h.

References casa::CanonicalConversion::fromLocalChar().

uInt casa::ModcompConversion::fromLocal ( void *  to,
const uChar from,
uInt  nr 
) [inline, static]

Definition at line 301 of file ModcompConversion.h.

References casa::CanonicalConversion::fromLocalUChar().

uInt casa::ModcompConversion::fromLocal ( void *  to,
const Short from,
uInt  nr 
) [inline, static]

Definition at line 305 of file ModcompConversion.h.

References casa::CanonicalConversion::fromLocalShort().

uInt casa::ModcompConversion::fromLocal ( void *  to,
const uShort from,
uInt  nr 
) [inline, static]

Definition at line 309 of file ModcompConversion.h.

References casa::CanonicalConversion::fromLocalUShort().

uInt casa::ModcompConversion::fromLocal ( void *  to,
const Int from,
uInt  nr 
) [inline, static]

Definition at line 313 of file ModcompConversion.h.

References casa::CanonicalConversion::fromLocalInt().

uInt casa::ModcompConversion::fromLocal ( void *  to,
const uInt from,
uInt  nr 
) [inline, static]

Definition at line 317 of file ModcompConversion.h.

References casa::CanonicalConversion::fromLocalUInt().

static uInt casa::ModcompConversion::fromLocal ( void *  to,
const Int64 from,
uInt  nr 
) [static]
static uInt casa::ModcompConversion::fromLocal ( void *  to,
const uInt64 from,
uInt  nr 
) [static]
static uInt casa::ModcompConversion::fromLocal ( void *  to,
const Float from,
uInt  nr 
) [static]
static uInt casa::ModcompConversion::fromLocal ( void *  to,
const Double from,
uInt  nr 
) [static]
uInt casa::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 187 of file ModcompConversion.h.

Referenced by toLocal().

uInt casa::ModcompConversion::toLocal ( uChar to,
const void *  from 
) [inline, static]

Definition at line 191 of file ModcompConversion.h.

References toLocal().

uInt casa::ModcompConversion::toLocal ( Short to,
const void *  from 
) [inline, static]

Definition at line 195 of file ModcompConversion.h.

References toLocal().

uInt casa::ModcompConversion::toLocal ( uShort to,
const void *  from 
) [inline, static]

Definition at line 199 of file ModcompConversion.h.

References toLocal().

uInt casa::ModcompConversion::toLocal ( Int to,
const void *  from 
) [inline, static]

Definition at line 203 of file ModcompConversion.h.

References toLocal().

uInt casa::ModcompConversion::toLocal ( uInt to,
const void *  from 
) [inline, static]

Definition at line 207 of file ModcompConversion.h.

References toLocal().

uInt casa::ModcompConversion::toLocal ( Int64 to,
const void *  from 
) [inline, static]

Definition at line 211 of file ModcompConversion.h.

References toLocal().

uInt casa::ModcompConversion::toLocal ( uInt64 to,
const void *  from 
) [inline, static]

Definition at line 218 of file ModcompConversion.h.

References toLocal().

uInt casa::ModcompConversion::toLocal ( Float to,
const void *  from 
) [inline, static]

Definition at line 225 of file ModcompConversion.h.

References toLocal().

uInt casa::ModcompConversion::toLocal ( Double to,
const void *  from 
) [inline, static]

Definition at line 229 of file ModcompConversion.h.

References toLocal().

uInt casa::ModcompConversion::toLocal ( Char to,
const void *  from,
uInt  nr 
) [inline, static]

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 casa::CanonicalConversion::toLocalChar().

uInt casa::ModcompConversion::toLocal ( uChar to,
const void *  from,
uInt  nr 
) [inline, static]

Definition at line 237 of file ModcompConversion.h.

References casa::CanonicalConversion::toLocalUChar().

uInt casa::ModcompConversion::toLocal ( Short to,
const void *  from,
uInt  nr 
) [inline, static]

Definition at line 241 of file ModcompConversion.h.

References casa::CanonicalConversion::toLocalShort().

uInt casa::ModcompConversion::toLocal ( uShort to,
const void *  from,
uInt  nr 
) [inline, static]

Definition at line 245 of file ModcompConversion.h.

References casa::CanonicalConversion::toLocalUShort().

uInt casa::ModcompConversion::toLocal ( Int to,
const void *  from,
uInt  nr 
) [inline, static]

Definition at line 249 of file ModcompConversion.h.

References casa::CanonicalConversion::toLocalInt().

uInt casa::ModcompConversion::toLocal ( uInt to,
const void *  from,
uInt  nr 
) [inline, static]

Definition at line 253 of file ModcompConversion.h.

References casa::CanonicalConversion::toLocalUInt().

static uInt casa::ModcompConversion::toLocal ( Int64 to,
const void *  from,
uInt  nr 
) [static]
static uInt casa::ModcompConversion::toLocal ( uInt64 to,
const void *  from,
uInt  nr 
) [static]
static uInt casa::ModcompConversion::toLocal ( Float to,
const void *  from,
uInt  nr 
) [static]
static uInt casa::ModcompConversion::toLocal ( Double to,
const void *  from,
uInt  nr 
) [static]

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