HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
oiioversion.h
Go to the documentation of this file.
1 /*
2  Copyright 2008 Larry Gritz and the other authors and contributors.
3  All Rights Reserved.
4 
5  Redistribution and use in source and binary forms, with or without
6  modification, are permitted provided that the following conditions are
7  met:
8  * Redistributions of source code must retain the above copyright
9  notice, this list of conditions and the following disclaimer.
10  * Redistributions in binary form must reproduce the above copyright
11  notice, this list of conditions and the following disclaimer in the
12  documentation and/or other materials provided with the distribution.
13  * Neither the name of the software's owners nor the names of its
14  contributors may be used to endorse or promote products derived from
15  this software without specific prior written permission.
16  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 
28  (This is the Modified BSD License)
29 */
30 
31 
32 #ifndef OPENIMAGEIO_VERSION_H
33 #define OPENIMAGEIO_VERSION_H
34 
35 
36 // Versioning of the OpenImageIO software
37 #define OIIO_VERSION_MAJOR 2
38 #define OIIO_VERSION_MINOR 0
39 #define OIIO_VERSION_PATCH 10
40 #define OIIO_VERSION_RELEASE_TYPE
41 
42 #define OIIO_VERSION (10000 * OIIO_VERSION_MAJOR + \
43  100 * OIIO_VERSION_MINOR + \
44  OIIO_VERSION_PATCH)
45 // We also define the old name for backwards compatibility purposes.
46 #define OPENIMAGEIO_VERSION OIIO_VERSION
47 
48 // Magic macros to make OIIO_VERSION_STRING that looks like "1.2.3"
49 #define OIIO_MAKE_VERSION_STRING2(a,b,c,d) #a "." #b "." #c #d
50 #define OIIO_MAKE_VERSION_STRING(a,b,c,d) OIIO_MAKE_VERSION_STRING2(a,b,c,d)
51 #define OIIO_VERSION_STRING \
52  OIIO_MAKE_VERSION_STRING(OIIO_VERSION_MAJOR, \
53  OIIO_VERSION_MINOR, OIIO_VERSION_PATCH, \
54  OIIO_VERSION_RELEASE_TYPE)
55 #define OIIO_INTRO_STRING "OpenImageIO " OIIO_VERSION_STRING " http://www.openimageio.org"
56 
57 
58 // Establish the name spaces
59 namespace HOIIO_v2_0 { }
60 namespace OIIO = HOIIO_v2_0;
61 
62 // Macros to use in each file to enter and exit the right name spaces.
63 #define OIIO_NAMESPACE HOIIO_v2_0
64 #define OIIO_NAMESPACE_STRING "HOIIO_v2_0"
65 #define OIIO_NAMESPACE_BEGIN namespace HOIIO_v2_0 {
66 #define OIIO_NAMESPACE_END }
67 #define OIIO_NAMESPACE_USING using namespace OIIO;
68 
69 
70 /// Each imageio DSO/DLL should include this statement:
71 /// DLLPUBLIC int FORMAT_imageio_version = OPENIMAGEIO_PLUGIN_VERSION;
72 /// libOpenImageIO will check for compatibility this way.
73 /// This should get bumped any time we change the API in any way that
74 /// will make previously-compiled plugins break.
75 ///
76 /// History:
77 /// Version 3 added supports_rectangles() and write_rectangle() to
78 /// ImageOutput, and added stride parameters to the ImageInput read
79 /// routines.
80 /// Version 10 represents forking from NVIDIA's open source version,
81 /// with which we break backwards compatibility.
82 /// Version 11 teased apart subimage versus miplevel specification in
83 /// the APIs and per-channel formats (introduced in OIIO 0.9).
84 /// Version 12 added read_scanlines(), write_scanlines(), read_tiles(),
85 /// write_tiles(), and ImageInput::supports(). (OIIO 1.0)
86 /// Version 13 added ImageInput::valid_file(). (OIIO 1.1)
87 /// Version 14 added ImageOutput::open() variety for multiple subimages.
88 /// Version 15 added support for "deep" images (changing ImageSpec,
89 /// ImageInput, ImageOutput).
90 /// Version 16 changed the ImageInput functions taking channel ranges
91 /// from firstchan,nchans to chbegin,chend.
92 /// Version 17 changed to int supports(string_view) rather than
93 /// bool supports(const std::string&)). (OIIO 1.6)
94 /// Version 18 changed to add an m_threads member to ImageInput/Output.
95 /// Version 19 changed the definition of DeepData.
96 /// Version 20 added FMT_imageio_library_version() to plugins. (OIIO 1.7)
97 /// Version 21 changed the signatures of ImageInput methods: added
98 /// subimage,miplevel params to many read_*() methods; changed thread
99 /// safety expectations; removed newspec param from seek_subimage;
100 /// added spec(subimage,miplevel) and spec_dimensions(subimage,miplevel).
101 /// (OIIO 1.9)
102 /// Version 22 changed the signatures of ImageInput/ImageOutput create()
103 /// to return unique_ptr. (OIIO 1.9)
104 
105 #define OIIO_PLUGIN_VERSION 22
106 
107 #define OIIO_PLUGIN_NAMESPACE_BEGIN OIIO_NAMESPACE_BEGIN
108 #define OIIO_PLUGIN_NAMESPACE_END OIIO_NAMESPACE_END
109 
110 #ifdef EMBED_PLUGINS
111 #define OIIO_PLUGIN_EXPORTS_BEGIN
112 #define OIIO_PLUGIN_EXPORTS_END
113 #else
114 #define OIIO_PLUGIN_EXPORTS_BEGIN extern "C" {
115 #define OIIO_PLUGIN_EXPORTS_END }
116 #endif
117 
118 #define OIIO_BUILD_CPP11 1 /* Always build for C++ >= 11 */
119 // OIIO_BUILD_CPP14 will be 1 if this OIIO was built using C++14 or higher
120 #define OIIO_BUILD_CPP14 0
121 // OIIO_BUILD_CPP17 will be 1 if this OIIO was built using C++17 or higher
122 #define OIIO_BUILD_CPP17 0
123 // OIIO_BUILD_CPP20 will be 1 if this OIIO was built using C++20 or higher
124 #define OIIO_BUILD_CPP20 0
125 
126 #endif
127