Version
Wwise SDK 2021.1.10
PluginContainer.h
Go to the documentation of this file.
1 /*******************************************************************************
2 The content of this file includes portions of the AUDIOKINETIC Wwise Technology
3 released in source code form as part of the SDK installer package.
4 
5 Commercial License Usage
6 
7 Licensees holding valid commercial licenses to the AUDIOKINETIC Wwise Technology
8 may use this file in accordance with the end user license agreement provided
9 with the software or, alternatively, in accordance with the terms contained in a
10 written agreement between you and Audiokinetic Inc.
11 
12 Apache License Usage
13 
14 Alternatively, this file may be used under the Apache License, Version 2.0 (the
15 "Apache License"); you may not use this file except in compliance with the
16 Apache License. You may obtain a copy of the Apache License at
17 http://www.apache.org/licenses/LICENSE-2.0.
18 
19 Unless required by applicable law or agreed to in writing, software distributed
20 under the Apache License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
21 OR CONDITIONS OF ANY KIND, either express or implied. See the Apache License for
22 the specific language governing permissions and limitations under the License.
23 
24  Version: v2021.1.10 Build: 7883
25  Copyright (c) 2006-2022 Audiokinetic Inc.
26 *******************************************************************************/
27 
28 /**
29  * \brief Wwise Authoring Plug-ins - Root interface allowing a logical unit (variable, library) to contain more than one interface.
30  * \file AK/Wwise/Plugin/PluginContainer.h
31  */
32 
33 #pragma once
34 
35 #include "PluginInfo.h"
36 
37 /**
38  * \brief Root interface allowing a logical unit (variable, library) to contain more than one interface.
39  *
40  * The container is a required element to define the base of a logical unit. It contains basic information on the
41  * build being used by the enclosed plug-ins. This allows the host to quickly determine if it should pursue
42  * loading this container or not, and might need to apply patches to fix interface variations appearing
43  * between SDK versions.
44  *
45  * The container being versioned means this format could eventually change, but the goal was to make it generic
46  * enough to keep it stable. It's easier to add up plug-ins to extend the format than to modify it.
47  */
49 #ifdef __cplusplus
51 #endif
52 {
53 #ifndef __cplusplus
54  struct ak_wwise_plugin_base_interface m_baseInterface;
55 #endif
56 
57  uint64_t m_wwiseSdkVersion; ///< Wwise Authoring version included with this SDK.
58 
59  struct ak_wwise_plugin_info* m_pluginInfos; ///< A chained list of all the plug-ins embedded in this container
60 
61 #ifdef __cplusplus
62  // Must not go higher than 18 44674 407 370 9551615 (ULLONG_MAX)
63  // aaaaa iii sss bbbbbbb
64 
65  constexpr inline static uint64_t SdkVersionBuildMultiplier() { return 1; }
66  constexpr inline static uint64_t SdkVersionBuildMax() { return 9999999; }
67  constexpr inline static uint64_t SdkVersionSubminorMultiplier() { return SdkVersionBuildMultiplier() * (SdkVersionBuildMax() + 1); }
68  constexpr inline static uint64_t SdkVersionSubminorMax() { return 999; }
69  constexpr inline static uint64_t SdkVersionMinorMultiplier() { return SdkVersionSubminorMultiplier() * (SdkVersionSubminorMax() + 1); }
70  constexpr inline static uint64_t SdkVersionMinorMax() { return 999; }
71  constexpr inline static uint64_t SdkVersionMajorMultiplier() { return SdkVersionMinorMultiplier() * (SdkVersionMinorMax() + 1); }
72  constexpr inline static uint64_t SdkVersionMajorMax() { return 99999; }
73 
74  /// \brief (C++) Major SDK version (ex. 2020)
75  constexpr inline uint32_t MajorSdkVersion() const { return (uint32_t)(m_wwiseSdkVersion / SdkVersionMajorMultiplier()); }
76  /// \brief (C++) Minor SDK version (ex. 1)
77  constexpr inline uint32_t MinorSdkVersion() const { return (uint32_t)((m_wwiseSdkVersion % (SdkVersionMinorMultiplier() * (SdkVersionMinorMax() + 1))) / SdkVersionMinorMultiplier()); }
78  /// \brief (C++) Patch / Subminor SDK version (ex. 0)
79  constexpr inline uint32_t SubminorSdkVersion() const { return (uint32_t)((m_wwiseSdkVersion % (SdkVersionSubminorMultiplier() * (SdkVersionSubminorMax() + 1))) / SdkVersionSubminorMultiplier()); }
80  /// \brief (C++) Build number (ex. 9404)
81  constexpr inline uint32_t BuildSdkVersion() const { return (uint32_t)((m_wwiseSdkVersion % (SdkVersionBuildMultiplier() * (SdkVersionBuildMax() + 1)))); }
82 
86  m_pluginInfos(nullptr)
87  {}
91  m_pluginInfos(in_pluginInfos)
92  {}
93 #endif
94 };
95 #define AK_WWISE_PLUGIN_CONTAINER_CTOR_IDS() \
96  .m_baseInterface = AK_WWISE_PLUGIN_BASE_INTERFACE_FROM_ID(AK_WWISE_PLUGIN_INTERFACE_TYPE_PLUGIN_CONTAINER, 1), \
97  .m_wwiseSdkVersion = (uint64_t)AK_WWISESDK_VERSION_MAJOR * 1000000000 + (uint64_t)AK_WWISESDK_VERSION_MINOR * 10000000 + (uint64_t)AK_WWISESDK_VERSION_SUBMINOR * 100000 + (uint64_t)AK_WWISESDK_VERSION_BUILD
constexpr static uint64_t SdkVersionMajorMax()
Definition: PluginContainer.h:72
@ AK_WWISE_PLUGIN_INTERFACE_TYPE_PLUGIN_CONTAINER
2021.1 Plug-in container plug-in. Contains all the other plug-ins. ak_wwise_plugin_container
constexpr static uint64_t SdkVersionMajorMultiplier()
Definition: PluginContainer.h:71
constexpr uint32_t SubminorSdkVersion() const
(C++) Patch / Subminor SDK version (ex. 0)
Definition: PluginContainer.h:79
ak_wwise_plugin_container(ak_wwise_plugin_info *in_pluginInfos)
Definition: PluginContainer.h:88
struct ak_wwise_plugin_info * m_pluginInfos
A chained list of all the plug-ins embedded in this container.
Definition: PluginContainer.h:59
Root interface allowing a logical unit (variable, library) to contain more than one interface.
Definition: PluginContainer.h:52
constexpr static uint64_t SdkVersionMinorMultiplier()
Definition: PluginContainer.h:69
#define AK_WWISESDK_VERSION_SUBMINOR
Wwise SDK sub-minor version.
constexpr static uint64_t SdkVersionSubminorMultiplier()
Definition: PluginContainer.h:67
constexpr static uint64_t SdkVersionBuildMax()
Definition: PluginContainer.h:66
#define AK_WWISESDK_VERSION_MINOR
Wwise SDK minor version.
#define AK_WWISESDK_VERSION_MAJOR
Wwise SDK major version.
constexpr uint32_t MajorSdkVersion() const
(C++) Major SDK version (ex. 2020)
Definition: PluginContainer.h:75
uint64_t m_wwiseSdkVersion
Wwise Authoring version included with this SDK.
Definition: PluginContainer.h:57
constexpr uint32_t MinorSdkVersion() const
(C++) Minor SDK version (ex. 1)
Definition: PluginContainer.h:77
Interface description and base class for every Wwise Authoring plug-in interface.
#define AK_WWISESDK_VERSION_BUILD
Wwise SDK build number.
constexpr static uint64_t SdkVersionBuildMultiplier()
Definition: PluginContainer.h:65
constexpr static uint64_t SdkVersionMinorMax()
Definition: PluginContainer.h:70
constexpr static uint64_t SdkVersionSubminorMax()
Definition: PluginContainer.h:68
constexpr uint32_t BuildSdkVersion() const
(C++) Build number (ex. 9404)
Definition: PluginContainer.h:81