You can also include preprocessor directives in an IDL file. They are processed before compiling takes place. Preprocessing directives allow for macro substitution, source file inclusion, and conditional compilation.
Preprocessing directives begin with a pound sign (#) and must be placed at the beginning of a line. You can use any of the standard C++ directives: #include
, #define
, #undef
, #if
, #ifdef
, #ifndef
, #elif
, #else
, #endif
, #defined
, #error
, and #pragma
. For example, to include the contents of the file called employee.idl, use:
#include "employee.idl"