HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
version.h
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////
2 //
3 // Copyright (c) 2012-2017 DreamWorks Animation LLC
4 //
5 // All rights reserved. This software is distributed under the
6 // Mozilla Public License 2.0 ( http://www.mozilla.org/MPL/2.0/ )
7 //
8 // Redistributions of source code must retain the above copyright
9 // and license notice and the following restrictions and disclaimer.
10 //
11 // * Neither the name of DreamWorks Animation nor the names of
12 // its contributors may be used to endorse or promote products derived
13 // from this software without specific prior written permission.
14 //
15 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY INDIRECT, INCIDENTAL,
20 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
21 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 // IN NO EVENT SHALL THE COPYRIGHT HOLDERS' AND CONTRIBUTORS' AGGREGATE
27 // LIABILITY FOR ALL CLAIMS REGARDLESS OF THEIR BASIS EXCEED US$250.00.
28 //
29 ///////////////////////////////////////////////////////////////////////////
30 
31 #ifndef OPENVDB_VERSION_HAS_BEEN_INCLUDED
32 #define OPENVDB_VERSION_HAS_BEEN_INCLUDED
33 
34 #include "Platform.h"
35 
36 
37 /// The version namespace name for this library version
38 ///
39 /// Fully-namespace-qualified symbols are named as follows:
40 /// openvdb::vX_Y_Z::Vec3i, openvdb::vX_Y_Z::io::File, openvdb::vX_Y_Z::tree::Tree, etc.,
41 /// where X, Y and Z are OPENVDB_LIBRARY_MAJOR_VERSION, OPENVDB_LIBRARY_MINOR_VERSION
42 /// and OPENVDB_LIBRARY_PATCH_VERSION, respectively (defined below).
43 #define OPENVDB_VERSION_NAME v4_0_1_sesi
44 
45 // Library major, minor and patch version numbers
46 #define OPENVDB_LIBRARY_MAJOR_VERSION_NUMBER 4
47 #define OPENVDB_LIBRARY_MINOR_VERSION_NUMBER 0
48 #define OPENVDB_LIBRARY_PATCH_VERSION_NUMBER 1
49 
50 /// @brief Library version number string of the form "<major>.<minor>.<patch>"
51 /// @details This is a macro rather than a static constant because we typically
52 /// want the compile-time version number, not the runtime version number
53 /// (although the two are usually the same).
54 #define OPENVDB_LIBRARY_VERSION_STRING "4.0.1"
55 
56 /// Library version number as a packed integer ("%02x%02x%04x", major, minor, patch)
57 #define OPENVDB_LIBRARY_VERSION_NUMBER \
58  ((OPENVDB_LIBRARY_MAJOR_VERSION_NUMBER << 24) | \
59  ((OPENVDB_LIBRARY_MINOR_VERSION_NUMBER & 0xFF) << 16) | \
60  (OPENVDB_LIBRARY_PATCH_VERSION_NUMBER & 0xFFFF))
61 
62 /// If OPENVDB_REQUIRE_VERSION_NAME is undefined, symbols from the version
63 /// namespace are promoted to the top-level namespace (e.g., openvdb::v1_0_0::io::File
64 /// can be referred to simply as openvdb::io::File). Otherwise, symbols must be fully
65 /// namespace-qualified.
66 #ifdef OPENVDB_REQUIRE_VERSION_NAME
67 #define OPENVDB_USE_VERSION_NAMESPACE
68 #else
69 /// @note The empty namespace clause below ensures that
70 /// OPENVDB_VERSION_NAME is recognized as a namespace name.
71 #define OPENVDB_USE_VERSION_NAMESPACE \
72  namespace OPENVDB_VERSION_NAME {} \
73  using namespace OPENVDB_VERSION_NAME;
74 #endif
75 
76 
77 namespace openvdb {
79 namespace OPENVDB_VERSION_NAME {
80 
81 /// @brief The magic number is stored in the first four bytes of every VDB file.
82 /// @details This can be used to quickly test whether we have a valid file or not.
83 const int32_t OPENVDB_MAGIC = 0x56444220;
84 
85 // Library major, minor and patch version numbers
86 const uint32_t
90 /// Library version number as a packed integer ("%02x%02x%04x", major, minor, patch)
92 
93 /// @brief The current version number of the VDB file format
94 /// @details This can be used to enable various backwards compatability switches
95 /// or to reject files that cannot be read.
96 const uint32_t OPENVDB_FILE_VERSION = 224;
97 
98 /// Notable file format version numbers
99 enum {
114 };
115 
116 
117 /// Return a library version number string of the form "<major>.<minor>.<patch>".
119 
120 
121 struct VersionId {
122  uint32_t first, second;
123  VersionId(): first(0), second(0) {}
124  VersionId(uint32_t major, uint32_t minor): first(major), second(minor) {}
125 };
126 
127 } // namespace OPENVDB_VERSION_NAME
128 } // namespace openvdb
129 
130 #endif // OPENVDB_VERSION_HAS_BEEN_INCLUDED
131 
132 // Copyright (c) 2012-2017 DreamWorks Animation LLC
133 // All rights reserved. This software is distributed under the
134 // Mozilla Public License 2.0 ( http://www.mozilla.org/MPL/2.0/ )
GLint first
Definition: glcorearb.h:404
const int32_t OPENVDB_MAGIC
The magic number is stored in the first four bytes of every VDB file.
Definition: version.h:83
const uint32_t OPENVDB_LIBRARY_PATCH_VERSION
Definition: version.h:89
#define OPENVDB_LIBRARY_VERSION_STRING
Library version number string of the form "<major>.<minor>.<patch>".
Definition: version.h:54
const uint32_t OPENVDB_LIBRARY_VERSION
Library version number as a packed integer ("%02x%02x%04x", major, minor, patch)
Definition: version.h:91
#define OPENVDB_VERSION_NAME
Definition: version.h:43
#define OPENVDB_LIBRARY_VERSION_NUMBER
Library version number as a packed integer ("%02x%02x%04x", major, minor, patch)
Definition: version.h:57
VersionId(uint32_t major, uint32_t minor)
Definition: version.h:124
const uint32_t OPENVDB_LIBRARY_MAJOR_VERSION
Definition: version.h:87
const char * getLibraryVersionString()
Return a library version number string of the form "<major>.<minor>.<patch>".
Definition: version.h:118
#define OPENVDB_LIBRARY_MAJOR_VERSION_NUMBER
Definition: version.h:46
const uint32_t OPENVDB_LIBRARY_MINOR_VERSION
Definition: version.h:88
#define OPENVDB_USE_VERSION_NAMESPACE
Definition: version.h:71
#define OPENVDB_LIBRARY_MINOR_VERSION_NUMBER
Definition: version.h:47
const uint32_t OPENVDB_FILE_VERSION
The current version number of the VDB file format.
Definition: version.h:96
#define OPENVDB_LIBRARY_PATCH_VERSION_NUMBER
Definition: version.h:48