Instrument Neutral Distributed Interface INDI  1.9.2
Macros
indimacros.h File Reference

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
 Expressions to test whether the attribute is recognized by the C++ compiler. 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...
 

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 128 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 89 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 51 of file indimacros.h.

◆ INDI_HAS_CPP_ATTRIBUTE

#define INDI_HAS_CPP_ATTRIBUTE (   x)    0

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

Definition at line 40 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.