casacore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Namespaces | Macros
CanonicalConversion.h File Reference
#include <casacore/casa/aips.h>
#include <casacore/casa/OS/Conversion.h>
#include <cstring>

Go to the source code of this file.

Classes

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

Namespaces

 casacore
 this file contains all the compiler specific defines
 

Macros

#define SIZE_CAN_CHAR
 Define the canonical sizes of the built-in data types. More...
 
#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). More...
 
#define CONVERT_CAN_UCHAR
 
#define CONVERT_CAN_SHORT
 Conversion is not needed for IEEE data. More...
 
#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
 

Macro Definition Documentation

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

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 67 of file CanonicalConversion.h.

#define CONVERT_CAN_DOUBLE

Definition at line 91 of file CanonicalConversion.h.

#define CONVERT_CAN_FLOAT

Definition at line 90 of file CanonicalConversion.h.

#define CONVERT_CAN_INT

Definition at line 86 of file CanonicalConversion.h.

#define CONVERT_CAN_INT64

Definition at line 88 of file CanonicalConversion.h.

#define CONVERT_CAN_SHORT

Conversion is not needed for IEEE data.

Change the definitions below if new architectures are being used.

Definition at line 84 of file CanonicalConversion.h.

#define CONVERT_CAN_UCHAR

Definition at line 68 of file CanonicalConversion.h.

#define CONVERT_CAN_UINT

Definition at line 87 of file CanonicalConversion.h.

#define CONVERT_CAN_UINT64

Definition at line 89 of file CanonicalConversion.h.

#define CONVERT_CAN_USHORT

Definition at line 85 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 43 of file CanonicalConversion.h.

Referenced by casacore::CanonicalConversion::canonicalSize(), casacore::CanonicalConversion::fromLocal(), and casacore::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