版本

menu_open
Wwise SDK 2024.1.0
FirstTimeCreationMessage.h
浏览该文件的文档.
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  Copyright (c) 2024 Audiokinetic Inc.
25 *******************************************************************************/
26 
27 /**
28  * \brief Wwise Authoring Plug-ins - Plug-in that provides a special usage message when first instantiated.
29  * \file AK/Wwise/Plugin/FirstTimeCreationMessage.h
30  */
31 
32 #pragma once
33 
34 #include "PluginInfoGenerator.h"
35 
36 
37 /**
38  * \brief Plug-in that provides a special usage message when first instantiated.
39  */
41 #ifdef __cplusplus
43 #endif
44 {
45 #ifndef __cplusplus
46  ak_wwise_plugin_base_interface m_baseInterface;
47 #endif
48 
49 #ifdef __cplusplus
50  /// Base instance type for providing a message shown the first time an instance is created.
52 
55  {}
56 #endif
57 
58  /**
59  * \brief Returns a unique key used in the .wproj to indicate whether the licensing message was shown.
60  *
61  * The key should be representative of the plug-in or plug-in family, as well as user readable. Even if a GUID
62  * would be unique, it would not be helpful to the user.
63  *
64  * \param[in] in_this Current instance of this interface.
65  * \return Null-terminated string uniquely representing this plug-in or plug-in family.
66  */
67  const char*(*GetKey)(const struct ak_wwise_plugin_first_time_creation_message_instance_v1* in_this);
68 
69  /**
70  * \brief Returns a unique creation message shown to the user.
71  *
72  * Shown when the plug-in is first created and the key is not present in the .wproj yet.
73  *
74  * \param[in] in_this Current instance of this interface.
75  * \return Null-terminated string containing the text to show to the end user.
76  */
77  const char*(*GetCreationMessage)(const struct ak_wwise_plugin_first_time_creation_message_instance_v1* in_this);
78 };
79 
80 
81 #define AK_WWISE_PLUGIN_FIRST_TIME_CREATION_MESSAGE_V1_ID() \
82  AK_WWISE_PLUGIN_BASE_INTERFACE_FROM_ID(AK_WWISE_PLUGIN_INTERFACE_TYPE_FIRST_TIME_CREATION_MESSAGE, 1)
83 #define AK_WWISE_PLUGIN_FIRST_TIME_CREATION_MESSAGE_V1_CTOR(/* ak_wwise_plugin_info* */ in_pluginInfo, /* void* */ in_data) \
84 { \
85  .m_baseInterface = AK_WWISE_PLUGIN_BASE_INTERFACE_CTOR(AK_WWISE_PLUGIN_FIRST_TIME_CREATION_MESSAGE_V1_ID(), in_pluginInfo, in_data) \
86 }
87 
88 
89 #ifdef __cplusplus
90 namespace AK::Wwise::Plugin
91 {
92  namespace V1
93  {
96  {
97  public:
98  /**
99  * \copydoc CFirstTimeCreationMessage::Instance
100  */
102 
103  /**
104  * \brief The interface type, as provided by this plug-in.
105  */
106  enum : InterfaceTypeValue
107  {
108  /**
109  * \brief The interface type, as provided by this plug-in.
110  */
112  };
113  /**
114  * \brief The interface version, as provided by this plug-in.
115  */
116  enum : InterfaceVersion
117  {
118  /**
119  * \brief The interface version, as provided by this plug-in.
120  */
122  };
123 
124  /**
125  * \brief The C interface, fulfilled by your plug-in.
126  */
128  {
131  {
132  CFirstTimeCreationMessage::GetKey = [](const struct ak_wwise_plugin_first_time_creation_message_instance_v1* in_this) { return static_cast<const Instance*>(in_this)->GetKey(); };
134  }
135  };
136 
138  static Interface g_interface;
139  return &g_interface;
140  }
142  return this;
143  }
145  return this;
146  }
147 
150  {
151  }
152 
154 
155  /**
156  * \brief Returns a unique key used in the .wproj to indicate whether the licensing message was shown.
157  *
158  * The key should be representative of the plug-in or plug-in family, as well as user readable. Even if a GUID
159  * would be unique, it would not be helpful to the user.
160  *
161  * \return Null-terminated string uniquely representing this plug-in or plug-in family.
162  */
163  virtual const char* GetKey() const = 0;
164 
165  /**
166  * \brief Returns a unique creation message shown to the user.
167  *
168  * Shown when the plug-in is first created and the key is not present in the .wproj yet.
169  *
170  * \return Null-terminated string containing the text to show to the end user.
171  */
172  virtual const char* GetCreationMessage() const = 0;
173  };
174  } // of namespace V1
175 
176  /// Latest version of the C FirstTimeCreationMessage interface.
178  /// Latest version of the C++ FirstTimeCreationMessage interface.
180 
183 } // of namespace AK::Wwise::Plugin
184 
185 #endif
V1::FirstTimeCreationMessage FirstTimeCreationMessage
Latest version of the C++ FirstTimeCreationMessage interface.
const char *(* GetCreationMessage)(const struct ak_wwise_plugin_first_time_creation_message_instance_v1 *in_this)
Returns a unique creation message shown to the user.
const char *(* GetKey)(const struct ak_wwise_plugin_first_time_creation_message_instance_v1 *in_this)
Returns a unique key used in the .wproj to indicate whether the licensing message was shown.
@ k_interfaceType
The interface type, as provided by this plug-in.
decltype(BaseInterface::m_version) InterfaceVersion
PluginInfoGenerator: Type for the m_version value in BaseInterface
Base instance type for providing a message shown the first time an instance is created through ak_wwi...
Definition: PluginDef.h:925
Plug-in that provides a special usage message when first instantiated.
Wwise Authoring Plug-ins - C++ class helper to automatically determine the plug-in interfaces used in...
ak_wwise_plugin_first_time_creation_message_v1 CFirstTimeCreationMessage
CInterfacePtr InterfacePtr
Definition: PluginDef.h:1057
CFirstTimeCreationMessage::Instance * GetInstancePointer()
virtual const char * GetKey() const =0
Returns a unique key used in the .wproj to indicate whether the licensing message was shown.
std::underlying_type< InterfaceType >::type InterfaceTypeValue
PluginInfoGenerator: Underlying storage type for the m_interface value in BaseInterface
@ AK_WWISE_PLUGIN_INTERFACE_TYPE_FIRST_TIME_CREATION_MESSAGE
2021.1 First Time Creation Message plug-in. ak_wwise_plugin_first_time_creation_message_v1
AK_WWISE_PLUGIN_SPECIALIZE_INTERFACE_VERSION(AudioPlugin)
Interface description and base class for every Wwise Authoring plug-in interface.
const CFirstTimeCreationMessage::Instance * GetInstancePointer() const
@ k_interfaceVersion
The interface version, as provided by this plug-in.
virtual const char * GetCreationMessage() const =0
Returns a unique creation message shown to the user.
ak_wwise_plugin_first_time_creation_message_instance_v1 Instance
Base instance type for providing a message shown the first time an instance is created.
AK_WWISE_PLUGIN_SPECIALIZE_INTERFACE_CLASS(AudioPlugin)

此页面对您是否有帮助?

需要技术支持?

仍有疑问?或者问题?需要更多信息?欢迎联系我们,我们可以提供帮助!

查看我们的“技术支持”页面

介绍一下自己的项目。我们会竭力为您提供帮助。

来注册自己的项目,我们帮您快速入门,不带任何附加条件!

开始 Wwise 之旅