HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OpenColorABI.h
Go to the documentation of this file.
1 // SPDX-License-Identifier: BSD-3-Clause
2 // Copyright Contributors to the OpenColorIO Project.
3 
4 #ifndef INCLUDED_OCIO_OPENCOLORABI_H
5 #define INCLUDED_OCIO_OPENCOLORABI_H
6 
7 // Makefile configuration options
8 #define OCIO_NAMESPACE sidefx
9 
10 #define OCIO_VERSION_STR "2.2.1"
11 #define OCIO_VERSION_STATUS_STR ""
12 #define OCIO_VERSION_FULL_STR "2.2.1"
13 
14 // Deprecated synonym for downstream projects that expect the 1.x name
15 #define OCIO_VERSION "2.2.1"
16 
17 /* Version as a single 4-byte hex number, e.g. 0x01050200 == 1.5.2
18  Use this for numeric comparisons, e.g. #if OCIO_VERSION_HEX >= ...
19  Note: in the case where SOVERSION is overridden at compile-time,
20  this will reflect the original API version number.
21  */
22 #define OCIO_VERSION_HEX ((2 << 24) | \
23  (2 << 16) | \
24  (1 << 8))
25 
26 #define OCIO_VERSION_MAJOR 2
27 #define OCIO_VERSION_MINOR 2
28 
29 
30 // Highlight deprecated methods or classes.
31 #if defined(_MSC_VER)
32  #define OCIO_DEPRECATED(msg) __declspec(deprecated(msg))
33 #elif __cplusplus >= 201402L
34  #define OCIO_DEPRECATED(msg) [[deprecated(msg)]]
35 #elif defined(__GNUC__) || defined(__clang__)
36  #define OCIO_DEPRECATED(msg) __attribute__((deprecated(msg)))
37 #else
38  #define OCIO_DEPRECATED(msg) /* unsupported on this platform */
39 #endif
40 
41 
42 // shared_ptr / dynamic_pointer_cast
43 #include <memory>
44 #define OCIO_SHARED_PTR std::shared_ptr
45 #define OCIO_DYNAMIC_POINTER_CAST std::dynamic_pointer_cast
46 
47 
48 // If supported, define OCIOEXPORT, OCIOHIDDEN
49 // (used to choose which symbols to export from OpenColorIO)
50 #if defined(_WIN32) || defined(__CYGWIN__)
51  // Windows requires you to export from the main library and then import in any others
52  // only when compiling a dynamic library (i.e. DLL)
53  #ifndef OpenColorIO_SKIP_IMPORTS
54  #if defined OpenColorIO_EXPORTS
55  #define OCIOEXPORT __declspec(dllexport)
56  #else
57  #define OCIOEXPORT __declspec(dllimport)
58  #endif
59  #else
60  #define OCIOEXPORT
61  #endif
62  #define OCIOHIDDEN
63 #elif defined __GNUC__
64  #define OCIOEXPORT __attribute__ ((visibility("default")))
65  #define OCIOHIDDEN __attribute__ ((visibility("hidden")))
66 #else // Others platforms not supported atm
67  #define OCIOEXPORT
68  #define OCIOHIDDEN
69 #endif
70 
71 #endif // INCLUDED_OCIO_OPENCOLORABI_H