HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Macros to manage symbol visibility

Macros

#define IMATH_EXPORT   IMATH_PUBLIC_SYMBOL_ATTRIBUTE
 
#define IMATH_EXPORT_CONST   extern const IMATH_PUBLIC_SYMBOL_ATTRIBUTE
 
#define IMATH_EXPORT_ENUM
 
#define IMATH_EXPORT_TEMPLATE_TYPE   IMATH_EXPORT
 
#define IMATH_EXPORT_TYPE   IMATH_EXPORT
 
#define ILMTHREAD_EXPORT   OPENEXR_EXPORT
 
#define ILMTHREAD_HIDDEN   OPENEXR_HIDDEN
 
#define ILMTHREAD_EXPORT_TYPE   OPENEXR_EXPORT_TYPE
 
#define IMF_EXPORT   OPENEXR_EXPORT
 
#define IMF_HIDDEN   OPENEXR_HIDDEN
 
#define IMF_EXPORT_ENUM   OPENEXR_EXPORT_ENUM
 
#define IMF_EXPORT_TYPE   OPENEXR_EXPORT_TYPE
 
#define IMF_EXPORT_TEMPLATE_TYPE   OPENEXR_EXPORT_TEMPLATE_TYPE
 
#define IMF_EXPORT_EXTERN_TEMPLATE   OPENEXR_EXPORT_EXTERN_TEMPLATE
 
#define IMF_EXPORT_TEMPLATE_INSTANCE   OPENEXR_EXPORT_TEMPLATE_INSTANCE
 
#define IMFUTIL_EXPORT   OPENEXR_EXPORT
 
#define IMFUTIL_HIDDEN   OPENEXR_HIDDEN
 
#define IMFUTIL_EXPORT_ENUM   OPENEXR_EXPORT_ENUM
 
#define IMFUTIL_EXPORT_TYPE   OPENEXR_EXPORT_TYPE
 
#define IMFUTIL_EXPORT_TEMPLATE_TYPE   OPENEXR_EXPORT_TEMPLATE_TYPE
 
#define IMFUTIL_EXPORT_EXTERN_TEMPLATE   OPENEXR_EXPORT_EXTERN_TEMPLATE
 
#define IMFUTIL_EXPORT_TEMPLATE_INSTANCE   OPENEXR_EXPORT_TEMPLATE_INSTANCE
 
#define EXR_EXPORT   OPENEXR_EXPORT
 
#define EXR_PRINTF_FUNC_ATTRIBUTE
 
#define OPENEXR_PUBLIC_SYMBOL_ATTRIBUTE   __attribute__ ((__visibility__ ("default")))
 
#define OPENEXR_PRIVATE_SYMBOL_ATTRIBUTE   __attribute__ ((__visibility__ ("hidden")))
 
#define OPENEXR_EXPORT   OPENEXR_PUBLIC_SYMBOL_ATTRIBUTE
 
#define OPENEXR_HIDDEN   OPENEXR_PRIVATE_SYMBOL_ATTRIBUTE
 
#define OPENEXR_EXPORT_TYPE   OPENEXR_EXPORT
 
#define OPENEXR_EXPORT_EXTERN_TEMPLATE   OPENEXR_EXPORT
 
#define OPENEXR_EXPORT_ENUM
 
#define OPENEXR_EXPORT_TEMPLATE_TYPE   OPENEXR_EXPORT
 
#define OPENEXR_EXPORT_TEMPLATE_INSTANCE
 
#define OPENEXR_DEPRECATED(msg)   __attribute__((deprecated(msg)))
 

Detailed Description

There is more information about the motivation for these macros documented in the OpenEXR source tree (https://github.com/AcademySoftwareFoundation/openexr) under docs/SymbolVisibility.md

Imath only needs a couple of the possible macros outlined in the above document, and due to it largely being inline only, does not have much to do.

See docs/SymbolVisibility.md for more discussion about the motivation for these macros

If we are compiling a DLL for Windows, there needs to be custom rules for each library such that the macro swaps between doing a dllexport and a dllimport, so the defines here are less useful. Further, MSVC does not have this concept at all currently, so is elided.

The top level macros which start with OPENEXR can act as simple ways to combine the logic however for non-DLL or non-windows platforms, but until the current patterns change, one should check the specific library export.h (i.e.

See Also
IexExport.h,
IlmThreadExport.h,
ImfExport.h,
ImfUtilExport.h )

These per-library exports define a subset which are used by that library.

Iex is simple and does not need to do more than expose class types and functions, and does not have any private members to hide, so only provides a couple of the possible macros.

Similarly, IlmThread is also reasonably simple.

OpenEXR and OpenEXRUtil have much more logic and have to deal with templates and template instantiation, and so define more of the macros.

Macro Definition Documentation

#define EXR_EXPORT   OPENEXR_EXPORT

Definition at line 29 of file openexr_conf.h.

#define EXR_PRINTF_FUNC_ATTRIBUTE

Definition at line 40 of file openexr_conf.h.

#define ILMTHREAD_EXPORT   OPENEXR_EXPORT

Definition at line 35 of file IlmThreadExport.h.

#define ILMTHREAD_EXPORT_TYPE   OPENEXR_EXPORT_TYPE

Definition at line 37 of file IlmThreadExport.h.

#define ILMTHREAD_HIDDEN   OPENEXR_HIDDEN

Definition at line 36 of file IlmThreadExport.h.

#define IMATH_EXPORT   IMATH_PUBLIC_SYMBOL_ATTRIBUTE

Definition at line 47 of file ImathExport.h.

#define IMATH_EXPORT_CONST   extern const IMATH_PUBLIC_SYMBOL_ATTRIBUTE

Definition at line 48 of file ImathExport.h.

#define IMATH_EXPORT_ENUM

Definition at line 59 of file ImathExport.h.

#define IMATH_EXPORT_TEMPLATE_TYPE   IMATH_EXPORT

Definition at line 60 of file ImathExport.h.

#define IMATH_EXPORT_TYPE   IMATH_EXPORT

Definition at line 61 of file ImathExport.h.

#define IMF_EXPORT   OPENEXR_EXPORT

Definition at line 54 of file ImfExport.h.

#define IMF_EXPORT_ENUM   OPENEXR_EXPORT_ENUM

Definition at line 56 of file ImfExport.h.

#define IMF_EXPORT_EXTERN_TEMPLATE   OPENEXR_EXPORT_EXTERN_TEMPLATE

Definition at line 59 of file ImfExport.h.

#define IMF_EXPORT_TEMPLATE_INSTANCE   OPENEXR_EXPORT_TEMPLATE_INSTANCE

Definition at line 60 of file ImfExport.h.

#define IMF_EXPORT_TEMPLATE_TYPE   OPENEXR_EXPORT_TEMPLATE_TYPE

Definition at line 58 of file ImfExport.h.

#define IMF_EXPORT_TYPE   OPENEXR_EXPORT_TYPE

Definition at line 57 of file ImfExport.h.

#define IMF_HIDDEN   OPENEXR_HIDDEN

Definition at line 55 of file ImfExport.h.

#define IMFUTIL_EXPORT   OPENEXR_EXPORT

Definition at line 51 of file ImfUtilExport.h.

#define IMFUTIL_EXPORT_ENUM   OPENEXR_EXPORT_ENUM

Definition at line 53 of file ImfUtilExport.h.

#define IMFUTIL_EXPORT_EXTERN_TEMPLATE   OPENEXR_EXPORT_EXTERN_TEMPLATE

Definition at line 56 of file ImfUtilExport.h.

#define IMFUTIL_EXPORT_TEMPLATE_INSTANCE   OPENEXR_EXPORT_TEMPLATE_INSTANCE

Definition at line 57 of file ImfUtilExport.h.

#define IMFUTIL_EXPORT_TEMPLATE_TYPE   OPENEXR_EXPORT_TEMPLATE_TYPE

Definition at line 55 of file ImfUtilExport.h.

#define IMFUTIL_EXPORT_TYPE   OPENEXR_EXPORT_TYPE

Definition at line 54 of file ImfUtilExport.h.

#define IMFUTIL_HIDDEN   OPENEXR_HIDDEN

Definition at line 52 of file ImfUtilExport.h.

#define OPENEXR_DEPRECATED (   msg)    __attribute__((deprecated(msg)))

Definition at line 158 of file OpenEXRConfig.h.

#define OPENEXR_EXPORT   OPENEXR_PUBLIC_SYMBOL_ATTRIBUTE

Definition at line 115 of file OpenEXRConfig.h.

#define OPENEXR_EXPORT_ENUM

Definition at line 132 of file OpenEXRConfig.h.

#define OPENEXR_EXPORT_EXTERN_TEMPLATE   OPENEXR_EXPORT

Definition at line 121 of file OpenEXRConfig.h.

#define OPENEXR_EXPORT_TEMPLATE_INSTANCE

Definition at line 134 of file OpenEXRConfig.h.

#define OPENEXR_EXPORT_TEMPLATE_TYPE   OPENEXR_EXPORT

Definition at line 133 of file OpenEXRConfig.h.

#define OPENEXR_EXPORT_TYPE   OPENEXR_EXPORT

Definition at line 120 of file OpenEXRConfig.h.

#define OPENEXR_HIDDEN   OPENEXR_PRIVATE_SYMBOL_ATTRIBUTE

Definition at line 116 of file OpenEXRConfig.h.

#define OPENEXR_PRIVATE_SYMBOL_ATTRIBUTE   __attribute__ ((__visibility__ ("hidden")))

Definition at line 105 of file OpenEXRConfig.h.

#define OPENEXR_PUBLIC_SYMBOL_ATTRIBUTE   __attribute__ ((__visibility__ ("default")))

Definition at line 104 of file OpenEXRConfig.h.