idlc 1.5.14
Interface Definition Language Compiler
Loading...
Searching...
No Matches
Macros

Macros

#define IDL_BEGIN
 Begins a C-linkage declaration block.
 
#define IDL_END
 Ends a C-linkage declaration block.
 
#define idl_api
 Controls symbol visibility for shared library builds.
 
#define IDL_FLAGS(idl_enum_t)
 Enables bit flag operations for enumerations (C++ only).
 
#define IDL_TYPE(idl_name)
 Declares an opaque handle type.
 

Version Components.

Individual components of the library version.

#define IDL_VERSION_MAJOR   1
 Major version number (API-breaking changes).
 
#define IDL_VERSION_MINOR   5
 Minor version number (backwards-compatible additions).
 
#define IDL_VERSION_MICRO   14
 Micro version number (bug fixes and patches).
 

Version Utilities.

Macros for working with version numbers.

#define IDL_VERSION_ENCODE(major, minor, micro)
 Encodes version components into a single integer.
 
#define IDL_VERSION_STRINGIZE_(major, minor, micro)
 Internal macro for string version generation.
 
#define IDL_VERSION_STRINGIZE(major, minor, micro)
 Creates version string from components.
 

Current Version.

Macros representing the current library version.

#define IDL_VERSION
 Encoded library version as integer.
 
#define IDL_VERSION_STRING
 Library version as human-readable string.
 

Macro Definition Documentation

◆ idl_api

#define idl_api

Controls symbol visibility for shared library builds.

This macro is used to control symbol visibility when building or using the library. On Windows (MSVC) with dynamic linking (non-static build), it expands to __declspec(dllimport). In all other cases (static builds or non-Windows platforms), it expands to nothing. This allows proper importing of symbols from DLLs on Windows platforms.

Note
Define IDL_STATIC_BUILD for static library configuration.

◆ IDL_BEGIN

#define IDL_BEGIN

Begins a C-linkage declaration block.

In C++, expands to extern "C" { to ensure C-compatible symbol naming. In pure C environments, expands to nothing.

See also
IDL_END

◆ IDL_END

#define IDL_END

Ends a C-linkage declaration block.

Closes the scope opened by IDL_BEGIN.

See also
IDL_BEGIN

◆ IDL_FLAGS

#define IDL_FLAGS ( idl_enum_t)

Enables bit flag operations for enumerations (C++ only).

Generates overloaded bitwise operators for type-safe flag manipulation:

  • Bitwise NOT (~)
  • OR (|, |=)
  • AND (&, &=)
  • XOR (^, ^=)
Parameters
[in]idl_enum_tEnumeration type to enhance with flag operations.
Note
Only active in C++ mode. In C, expands to nothing.

◆ IDL_TYPE

#define IDL_TYPE ( idl_name)
Value:
typedef struct _##idl_name* idl_name##_t;

Declares an opaque handle type.

Creates a typedef for a pointer to an incomplete struct type, providing type safety while hiding implementation details.

Parameters
[in]idl_nameBase name for the type (suffix _t will be added).

◆ IDL_VERSION

#define IDL_VERSION
Value:
#define IDL_VERSION_ENCODE(major, minor, micro)
Encodes version components into a single integer.
Definition idl-version.h:69
#define IDL_VERSION_MAJOR
Major version number (API-breaking changes).
Definition idl-version.h:30
#define IDL_VERSION_MINOR
Minor version number (backwards-compatible additions).
Definition idl-version.h:38
#define IDL_VERSION_MICRO
Micro version number (bug fixes and patches).
Definition idl-version.h:46

Encoded library version as integer.

Combined version value suitable for numeric comparisons. Use IDL_VERSION_STRING for human-readable format.

See also
IDL_VERSION_STRING

◆ IDL_VERSION_ENCODE

#define IDL_VERSION_ENCODE ( major,
minor,
micro )
Value:
(((unsigned long) major) << 16 | (minor) << 8 | (micro))

Encodes version components into a single integer.

Combines major, minor, and micro versions into a 32-bit value:

  • Bits 24-31: Major version
  • Bits 16-23: Minor version
  • Bits 0-15: Micro version
    Parameters
    [in]majorMajor version number.
    [in]minorMinor version number.
    [in]microMicro version number.
    Returns
    Encoded version as unsigned long.
    See also
    IDL_VERSION

◆ IDL_VERSION_MAJOR

#define IDL_VERSION_MAJOR   1

Major version number (API-breaking changes).

See also
IDL_VERSION
IDL_VERSION_STRING

◆ IDL_VERSION_MICRO

#define IDL_VERSION_MICRO   14

Micro version number (bug fixes and patches).

See also
IDL_VERSION
IDL_VERSION_STRING

◆ IDL_VERSION_MINOR

#define IDL_VERSION_MINOR   5

Minor version number (backwards-compatible additions).

See also
IDL_VERSION
IDL_VERSION_STRING

◆ IDL_VERSION_STRING

#define IDL_VERSION_STRING
Value:
#define IDL_VERSION_STRINGIZE(major, minor, micro)
Creates version string from components.
Definition idl-version.h:94

Library version as human-readable string.

Version string in "MAJOR.MINOR.MICRO" format (e.g., "1.5.14"). Use IDL_VERSION for numeric comparisons.

See also
IDL_VERSION

◆ IDL_VERSION_STRINGIZE

#define IDL_VERSION_STRINGIZE ( major,
minor,
micro )
Value:
IDL_VERSION_STRINGIZE_(major, minor, micro)
#define IDL_VERSION_STRINGIZE_(major, minor, micro)
Internal macro for string version generation.
Definition idl-version.h:82

Creates version string from components.

Generates a string literal from version components (e.g., 1, 5, 14 -> "1.5.14").

Parameters
[in]majorMajor version number.
[in]minorMinor version number.
[in]microMicro version number.
Returns
Stringified version.
See also
IDL_VERSION_STRING

◆ IDL_VERSION_STRINGIZE_

#define IDL_VERSION_STRINGIZE_ ( major,
minor,
micro )
Value:
#major "." #minor "." #micro

Internal macro for string version generation.

Helper macro that stringizes version components (e.g., 1, 5, 14 -> "1.5.14").

Parameters
[in]majorMajor version number.
[in]minorMinor version number.
[in]microMicro version number.
Returns
Stringified version.
Note
For internal use only.