casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Classes | Namespaces | Defines
CanonicalConversion.h File Reference

Go to the source code of this file.

Classes

class  casa::CanonicalConversion
 LDOUBLE is 8 bytes on SUN, but 16 bytes canonical. More...

Namespaces

namespace  casa
 this file contains all the compiler specific defines

Defines

#define SIZE_CAN_CHAR
 Define the canonical sizes of the built-in data types.
#define SIZE_CAN_UCHAR
#define SIZE_CAN_SHORT
#define SIZE_CAN_USHORT
#define SIZE_CAN_INT
#define SIZE_CAN_UINT
#define SIZE_CAN_INT64
#define SIZE_CAN_UINT64
#define SIZE_CAN_FLOAT
#define SIZE_CAN_DOUBLE
#define CONVERT_CAN_CHAR
 Define for each data format if a conversion is needed from the local format to the canonical format (or vice-versa).
#define CONVERT_CAN_UCHAR
#define CONVERT_CAN_SHORT
 Conversion is not needed for IEEE data.
#define CONVERT_CAN_USHORT
#define CONVERT_CAN_INT
#define CONVERT_CAN_UINT
#define CONVERT_CAN_INT64
#define CONVERT_CAN_UINT64
#define CONVERT_CAN_FLOAT
#define CONVERT_CAN_DOUBLE

Define Documentation

Define for each data format if a conversion is needed from the local format to the canonical format (or vice-versa).

This allows for optimizations in, for example, AipsIO. The canonical format is ASCII for strings, IEEE for floating point and 2-complement for integers (all most significant bit first) with the lengths as shown above. The function checkConvert() can be used to check if the flags are set correctly.

Conversion is needed for little endian architectures (like DEC and Intel), because the bytes have to be swapped (thus not for data with length 1).

Definition at line 66 of file CanonicalConversion.h.

Definition at line 90 of file CanonicalConversion.h.

Definition at line 89 of file CanonicalConversion.h.

#define CONVERT_CAN_INT

Definition at line 85 of file CanonicalConversion.h.

Definition at line 87 of file CanonicalConversion.h.

Conversion is not needed for IEEE data.

Change the definitions below if new architectures are being used.

Definition at line 83 of file CanonicalConversion.h.

Definition at line 67 of file CanonicalConversion.h.

Definition at line 86 of file CanonicalConversion.h.

Definition at line 88 of file CanonicalConversion.h.

Definition at line 84 of file CanonicalConversion.h.

#define SIZE_CAN_CHAR

Define the canonical sizes of the built-in data types.

These are the same for all machine architectures. Also define the maximum size.

Definition at line 42 of file CanonicalConversion.h.

Referenced by casa::CanonicalConversion::canonicalSize(), casa::CanonicalConversion::fromLocal(), and casa::CanonicalConversion::toLocal().

#define SIZE_CAN_DOUBLE
#define SIZE_CAN_FLOAT
#define SIZE_CAN_INT
#define SIZE_CAN_INT64
#define SIZE_CAN_SHORT
#define SIZE_CAN_UCHAR
#define SIZE_CAN_UINT
#define SIZE_CAN_UINT64
#define SIZE_CAN_USHORT