SDDSlib
Loading...
Searching...
No Matches
SDDStypes.h File Reference

SDDS Data Types Definitions. More...

Go to the source code of this file.

Macros

#define SDDS_LONGDOUBLE   1
 Identifier for the long double data type.
 
#define SDDS_DOUBLE   2
 Identifier for the double data type.
 
#define SDDS_FLOAT   3
 Identifier for the float data type.
 
#define SDDS_LONG64   4
 Identifier for the signed 64-bit integer data type.
 
#define SDDS_ULONG64   5
 Identifier for the unsigned 64-bit integer data type.
 
#define SDDS_LONG   6
 Identifier for the signed 32-bit integer data type.
 
#define SDDS_ULONG   7
 Identifier for the unsigned 32-bit integer data type.
 
#define SDDS_SHORT   8
 Identifier for the signed short integer data type.
 
#define SDDS_USHORT   9
 Identifier for the unsigned short integer data type.
 
#define SDDS_STRING   10
 Identifier for the string data type.
 
#define SDDS_CHARACTER   11
 Identifier for the character data type.
 
#define SDDS_NUM_TYPES   11
 Total number of defined SDDS data types.
 
#define SDDS_INTEGER_TYPE(type)
 Checks if the given type identifier corresponds to an integer type.
 
#define SDDS_FLOATING_TYPE(type)
 Checks if the given type identifier corresponds to a floating-point type.
 
#define SDDS_NUMERIC_TYPE(type)
 Checks if the given type identifier corresponds to any numeric type.
 
#define SDDS_VALID_TYPE(type)
 Validates whether the given type identifier is within the defined range of SDDS types.
 
#define SDDS_ANY_NUMERIC_TYPE   (SDDS_NUM_TYPES + 1)
 Special identifier used by SDDS_Check*() routines to accept any numeric type.
 
#define SDDS_ANY_FLOATING_TYPE   (SDDS_NUM_TYPES + 2)
 Special identifier used by SDDS_Check*() routines to accept any floating-point type.
 
#define SDDS_ANY_INTEGER_TYPE   (SDDS_NUM_TYPES + 3)
 Special identifier used by SDDS_Check*() routines to accept any integer type.
 

Detailed Description

SDDS Data Types Definitions.

This header file defines the various data types used in the SDDS (Self Describing Data Sets) library. It includes type identifiers, type classification macros, and validation utilities to ensure correct data handling within the SDDS framework.

License This file is distributed under the terms of the Software License Agreement
found in the file LICENSE included with this distribution.
Authors
M. Borland, C. Saunders, R. Soliday, H. Shang

Definition in file SDDStypes.h.

Macro Definition Documentation

◆ SDDS_ANY_FLOATING_TYPE

#define SDDS_ANY_FLOATING_TYPE   (SDDS_NUM_TYPES + 2)

Special identifier used by SDDS_Check*() routines to accept any floating-point type.

This value extends beyond the defined types to allow functions to accept any floating-point type.

Definition at line 165 of file SDDStypes.h.

◆ SDDS_ANY_INTEGER_TYPE

#define SDDS_ANY_INTEGER_TYPE   (SDDS_NUM_TYPES + 3)

Special identifier used by SDDS_Check*() routines to accept any integer type.

This value extends beyond the defined types to allow functions to accept any integer type.

Definition at line 173 of file SDDStypes.h.

◆ SDDS_ANY_NUMERIC_TYPE

#define SDDS_ANY_NUMERIC_TYPE   (SDDS_NUM_TYPES + 1)

Special identifier used by SDDS_Check*() routines to accept any numeric type.

This value extends beyond the defined types to allow functions to accept any numeric type.

Definition at line 157 of file SDDStypes.h.

◆ SDDS_CHARACTER

#define SDDS_CHARACTER   11

Identifier for the character data type.

Definition at line 91 of file SDDStypes.h.

◆ SDDS_DOUBLE

#define SDDS_DOUBLE   2

Identifier for the double data type.

Definition at line 37 of file SDDStypes.h.

◆ SDDS_FLOAT

#define SDDS_FLOAT   3

Identifier for the float data type.

Definition at line 43 of file SDDStypes.h.

◆ SDDS_FLOATING_TYPE

#define SDDS_FLOATING_TYPE ( type)
Value:
(((type) == SDDS_LONGDOUBLE) || ((type) == SDDS_DOUBLE) || \
((type) == SDDS_FLOAT))
#define SDDS_FLOAT
Identifier for the float data type.
Definition SDDStypes.h:43
#define SDDS_DOUBLE
Identifier for the double data type.
Definition SDDStypes.h:37
#define SDDS_LONGDOUBLE
Identifier for the long double data type.
Definition SDDStypes.h:31

Checks if the given type identifier corresponds to a floating-point type.

This macro evaluates to a non-zero value if the type is one of the defined floating-point types: SDDS_LONGDOUBLE, SDDS_DOUBLE, or SDDS_FLOAT.

Parameters
typeThe type identifier to check.
Returns
Non-zero if type is a floating-point type, zero otherwise.

Definition at line 124 of file SDDStypes.h.

124#define SDDS_FLOATING_TYPE(type) \
125 (((type) == SDDS_LONGDOUBLE) || ((type) == SDDS_DOUBLE) || \
126 ((type) == SDDS_FLOAT))

◆ SDDS_INTEGER_TYPE

#define SDDS_INTEGER_TYPE ( type)
Value:
(((type) == SDDS_LONG64) || ((type) == SDDS_ULONG64) || \
((type) == SDDS_LONG) || ((type) == SDDS_ULONG) || \
((type) == SDDS_SHORT) || ((type) == SDDS_USHORT))
#define SDDS_ULONG
Identifier for the unsigned 32-bit integer data type.
Definition SDDStypes.h:67
#define SDDS_ULONG64
Identifier for the unsigned 64-bit integer data type.
Definition SDDStypes.h:55
#define SDDS_LONG
Identifier for the signed 32-bit integer data type.
Definition SDDStypes.h:61
#define SDDS_SHORT
Identifier for the signed short integer data type.
Definition SDDStypes.h:73
#define SDDS_USHORT
Identifier for the unsigned short integer data type.
Definition SDDStypes.h:79
#define SDDS_LONG64
Identifier for the signed 64-bit integer data type.
Definition SDDStypes.h:49

Checks if the given type identifier corresponds to an integer type.

This macro evaluates to a non-zero value if the type is one of the defined integer types: SDDS_LONG64, SDDS_ULONG64, SDDS_LONG, SDDS_ULONG, SDDS_SHORT, or SDDS_USHORT.

Parameters
typeThe type identifier to check.
Returns
Non-zero if type is an integer type, zero otherwise.

Definition at line 109 of file SDDStypes.h.

109#define SDDS_INTEGER_TYPE(type) \
110 (((type) == SDDS_LONG64) || ((type) == SDDS_ULONG64) || \
111 ((type) == SDDS_LONG) || ((type) == SDDS_ULONG) || \
112 ((type) == SDDS_SHORT) || ((type) == SDDS_USHORT))

◆ SDDS_LONG

#define SDDS_LONG   6

Identifier for the signed 32-bit integer data type.

Definition at line 61 of file SDDStypes.h.

◆ SDDS_LONG64

#define SDDS_LONG64   4

Identifier for the signed 64-bit integer data type.

Definition at line 49 of file SDDStypes.h.

◆ SDDS_LONGDOUBLE

#define SDDS_LONGDOUBLE   1

Identifier for the long double data type.

Definition at line 31 of file SDDStypes.h.

◆ SDDS_NUM_TYPES

#define SDDS_NUM_TYPES   11

Total number of defined SDDS data types.

Definition at line 97 of file SDDStypes.h.

◆ SDDS_NUMERIC_TYPE

#define SDDS_NUMERIC_TYPE ( type)
Value:
#define SDDS_INTEGER_TYPE(type)
Checks if the given type identifier corresponds to an integer type.
Definition SDDStypes.h:109
#define SDDS_FLOATING_TYPE(type)
Checks if the given type identifier corresponds to a floating-point type.
Definition SDDStypes.h:124

Checks if the given type identifier corresponds to any numeric type.

This macro evaluates to a non-zero value if the type is either an integer type (SDDS_INTEGER_TYPE) or a floating-point type (SDDS_FLOATING_TYPE).

Parameters
typeThe type identifier to check.
Returns
Non-zero if type is a numeric type, zero otherwise.

Definition at line 138 of file SDDStypes.h.

◆ SDDS_SHORT

#define SDDS_SHORT   8

Identifier for the signed short integer data type.

Definition at line 73 of file SDDStypes.h.

◆ SDDS_STRING

#define SDDS_STRING   10

Identifier for the string data type.

Definition at line 85 of file SDDStypes.h.

◆ SDDS_ULONG

#define SDDS_ULONG   7

Identifier for the unsigned 32-bit integer data type.

Definition at line 67 of file SDDStypes.h.

◆ SDDS_ULONG64

#define SDDS_ULONG64   5

Identifier for the unsigned 64-bit integer data type.

Definition at line 55 of file SDDStypes.h.

◆ SDDS_USHORT

#define SDDS_USHORT   9

Identifier for the unsigned short integer data type.

Definition at line 79 of file SDDStypes.h.

◆ SDDS_VALID_TYPE

#define SDDS_VALID_TYPE ( type)
Value:
(((type) >= 1) && ((type) <= SDDS_NUM_TYPES))
#define SDDS_NUM_TYPES
Total number of defined SDDS data types.
Definition SDDStypes.h:97

Validates whether the given type identifier is within the defined range of SDDS types.

This macro checks if the type is between 1 and SDDS_NUM_TYPES inclusive.

Parameters
typeThe type identifier to validate.
Returns
Non-zero if type is valid, zero otherwise.

Definition at line 149 of file SDDStypes.h.