Instrument Neutral Distributed Interface INDI  2.0.2
Macros
indimacros.h File Reference
#include <unistd.h>

Go to the source code of this file.

Macros

#define INDI_UNUSED(x)   (void)x
 Unused variable. More...
 
#define INDI_HAS_CPP_ATTRIBUTE(x)   0
 The POSIX C type "ssize_t" is available on Unix-like systems in unistd.h. For Windows Visual Studio based compilers without unistd.h, the following stanza allows use of ssize_t. More...
 
#define INDI_HAS_ATTRIBUTE(x)   0
 Expressions to test whether the attribute is recognized by the C compiler. More...
 
#define INDI_FALLTHROUGH   do {} while (0)
 Allows attributes to be set on null statements. More...
 
#define ATTRIBUTE_FORMAT_PRINTF(A, B)
 Opaque pointer. More...
 
#define INDI_DEPRECATED(message)   __attribute__ ((deprecated))
 

Macro Definition Documentation

◆ ATTRIBUTE_FORMAT_PRINTF

#define ATTRIBUTE_FORMAT_PRINTF (   A,
 
)

Opaque pointer.

The D_PTR macro is part of a design pattern called the d-pointer (also called the opaque pointer) where the implementation details of a library may be hidden from its users and changes to the implementation can be made to a library without breaking binary compatibility.

Definition at line 153 of file indimacros.h.

◆ INDI_DEPRECATED

#define INDI_DEPRECATED (   message)    __attribute__ ((deprecated))

Definition at line 162 of file indimacros.h.

◆ INDI_FALLTHROUGH

#define INDI_FALLTHROUGH   do {} while (0)

Allows attributes to be set on null statements.

The fallthrough attribute with a null statement serves as a fallthrough statement. It hints to the compiler that a statement that falls through to another case label, or user-defined label in a switch statement is intentional and thus the -Wimplicit-fallthrough warning must not trigger. The fallthrough attribute may appear at most once in each attribute list, and may not be mixed with other attributes. It can only be used in a switch statement (the compiler will issue an error otherwise), after a preceding statement and before a logically succeeding case label, or user-defined label.

switch (cond) { case 1: bar (1); INDI_FALLTHROUGH; case 2: ... }

Definition at line 100 of file indimacros.h.

◆ INDI_HAS_ATTRIBUTE

#define INDI_HAS_ATTRIBUTE (   x)    0

Expressions to test whether the attribute is recognized by the C compiler.

Definition at line 62 of file indimacros.h.

◆ INDI_HAS_CPP_ATTRIBUTE

#define INDI_HAS_CPP_ATTRIBUTE (   x)    0

The POSIX C type "ssize_t" is available on Unix-like systems in unistd.h. For Windows Visual Studio based compilers without unistd.h, the following stanza allows use of ssize_t.

Expressions to test whether the attribute is recognized by the C++ compiler

Definition at line 51 of file indimacros.h.

◆ INDI_UNUSED

#define INDI_UNUSED (   x)    (void)x

Unused variable.

Indicates to the compiler that the parameter with the specified name is not used in the body of a function. This can be used to suppress compiler warnings while allowing functions to be defined with meaningful parameter names in their signatures.

Definition at line 30 of file indimacros.h.