버전

menu_open
Wwise SDK 2024.1.1
HostObjectStore.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 - API for storing objects not in the plug-in XML.
29  * \file AK/Wwise/Plugin/HostObjectStore.h
30  */
31 
32 #pragma once
33 
34 #include "HostPropertySet.h"
35 
36 
37 /**
38  * \brief Custom inner property set interface.
39  *
40  * The Object Store contains named lists, and those named lists each contains a vector of inner property sets.
41  *
42  * For example, you can create a list named "Property curve points" and have 12 inner property sets with coordinates,
43  * configuration and information for the 12 user-created curve points.
44  *
45  * Inner property sets can be created from any inner types, as defined in the plug-in's XML definition file
46  * <code>InnerTypes</code> section. Your lists should contain recognizable types, as there is no way to poll the
47  * type of the created object. This system was created with a one-list-one-type design pattern; however, there is
48  * no actual restriction in using different types in a same list.
49  *
50  * You can define as many named lists as required. You should consider creating different inner property sets or
51  * lists for each platform if the property set indexes aren't linked.
52  *
53  * You can create new inner property set with \ref CreatePropertySet, and insert it in a list's index with
54  * \ref InsertPropertySet.
55  *
56  * You can also subscribe to notifications through ak_wwise_plugin_notifications_object_store_v1 in order to be
57  * informed when some inner property set changed.
58  *
59  * \aknote
60  * In order to manage property sets, you must make sure to use \ref AK::Wwise::Plugin::RequestPropertySet in
61  * your plug-in.
62  * \endaknote
63  *
64  * \aknote
65  * Historical naming convention described it as "inner object" and "inner type". For simplicity,
66  * since we are talking about property sets, the naming has been standardized to "inner property set".
67  * However, the names are interchangeable and are still being used.
68  * \endaknote
69  *
70  * \sa
71  * - \ref wwiseplugin_objectstore
72  * - \ref wwiseplugin_xml_properties_tag
73  * - \ref ak_wwise_plugin_notifications_object_store_v1
74  */
76 #ifdef __cplusplus
78 #endif
79 {
80 #ifndef __cplusplus
81  ak_wwise_plugin_base_interface m_baseInterface;
82 #endif
83 
84 #ifdef __cplusplus
85  /// Base host-provided instance type for ak_wwise_plugin_host_object_store_v1.
87 
90  {}
91 #endif
92 
93  /**
94  * \brief Inserts an inner property set into the specified list at the specified position.
95  *
96  * To create a new inner property set, use \ref CreatePropertySet . You can then insert
97  * that particular inner property set in the named list <code>in_pszListName</code>, at the
98  * <code>in_uiIndex</code> position, so it will be stored in the project data. Existing object positions
99  * equal to or higher than <code>in_uiIndex</code> will be incremented as required.
100  *
101  * Named lists are created automatically, there is no limitation for naming. However, you should use the
102  * standardized naming convention for better memory usage in Wwise Authoring. List ordering is
103  * arbitrary.
104  *
105  * \aknote
106  * You must add up indexes sequentially. If you have 0-14 indexes, adding a new one at 40 will
107  * create it at 15. Pass <code>(unsigned int)-1</code> as the in_uiIndex to insert at the end of
108  * the list.
109  * \endaknote
110  *
111  * \akwarning
112  * Never reuse the same inner property set under two different indexes or lists. If you are
113  * uncertain, or if you want to move it elsewhere, use \ref RemovePropertySet before
114  * inserting it elsewhere.
115  * \endakwarning
116  *
117  * \sa
118  * - \ref ak_wwise_plugin_notifications_object_store_v1::NotifyInnerObjectAddedRemoved
119  *
120  * \param[in] in_this Current instance of this interface.
121  * \param[in] in_pszListName Name of the affected list. That list will be created or appended depending
122  * on the situation.
123  * \param[in] in_uiIndex Inner property set index in the list. If higher than or equal to the current
124  * object count in that list, will add a new index. Otherwise, increments previous object's
125  * indexes to make room for this new inner property set.
126  * \param[in] in_pPropertySet The inner property set to include in the list's index. This property set
127  * must be created with \ref CreatePropertySet and not used elsewhere.
128  */
131  const char * in_pszListName,
132  unsigned int in_uiIndex,
133  const struct ak_wwise_plugin_host_property_set_instance_v1* in_pPropertySet
134  );
135 
136  /**
137  * \brief Removes an inner property set from any list, without deleting the object itself.
138  *
139  * This is useful if you still need the object internally, or if you want to move that object to another
140  * list or index.
141  *
142  * If a list doesn't contain any items anymore, the list will automatically be deleted.
143  *
144  * The function \ref DeletePropertySet must be used if you still keep that reference without being
145  * reinserted through \ref InsertPropertySet. For normal deletion, you should execute
146  * \ref DeletePropertySet function directly, and it will remove any usage automatically.
147  *
148  * \sa
149  * - \ref ak_wwise_plugin_notifications_object_store_v1::NotifyInnerObjectAddedRemoved
150  *
151  * \param[in] in_this Current instance of this interface.
152  * \param[in] in_pPropertySet The inner property set to remove from any list's index. The object is not
153  * deleted.
154  * \return true if successful
155  */
158  const struct ak_wwise_plugin_host_property_set_instance_v1* in_pPropertySet
159  );
160 
161  /**
162  * \brief Gets an inner property set inside the specified list at the specified position.
163  *
164  * Wwise Authoring handles the object's lifetime as long as it's inserted. You should not call
165  * \ref DeletePropertySet unless you want to remove it from your plug-in instance's objects.
166  *
167  * \aknote
168  * In order to manage property sets, you must make sure to use
169  * \ref AK::Wwise::Plugin::RequestPropertySet.
170  * \endaknote
171  *
172  * \param[in] in_this Current instance of this interface.
173  * \param[in] in_pszListName Name of the polled list. If the list doesn't exist, the function will
174  * return nullptr.
175  * \param[in] in_uiIndex Inner property set index in the list. If higher than or equal to the current
176  * object count in that list, the function will return nullptr.
177  * \return The requested inner property set, or nullptr if not existing.
178  */
179  struct ak_wwise_plugin_host_property_set_instance_v1*(*GetPropertySet)(
180  const struct ak_wwise_plugin_host_object_store_instance_v1* in_this,
181  const char * in_pszListName,
182  unsigned int in_uiIndex
183  );
184 
185  /**
186  * \brief Gets the number of inserted indexes inside the specified list.
187  *
188  * If the list doesn't exist, 0 will be returned.
189  *
190  * \param[in] in_this Current instance of this interface.
191  * \param[in] in_pszListName Name of the polled list. If the list doesn't exist, the function will
192  * return 0.
193  * \return The number of inner property sets inside the list in_pszListName.
194  */
195  unsigned int(*GetPropertySetCount)(
196  const struct ak_wwise_plugin_host_object_store_instance_v1* in_this,
197  const char * in_pszListName
198  );
199 
200  /**
201  * \brief Creates a new inner property set.
202  *
203  * An inner property set must be defined as a particular <code>InnerType</code> in the plug-in's XML
204  * definition file.
205  *
206  * When this object is created, it is not bound to any list. As such, this is the only moment
207  * where it is under the plug-in's responsibility. You should either call
208  * \ref InsertPropertySet or \ref DeletePropertySet on it to make sure the plug-in doesn't cause
209  * a memory leak.
210  *
211  * \sa
212  * - \ref wwiseplugin_objectstore
213  * - \ref wwiseplugin_xml_properties_tag
214  *
215  * \param[in] in_this Current instance of this interface.
216  * \param[in] in_pszType The requested InnerType, as defined in the plug-in's XML definition file.
217  * \return A new inner property set instance.
218  */
219  struct ak_wwise_plugin_host_property_set_instance_v1*(*CreatePropertySet)(
221  const char * in_pszType
222  );
223 
224  /**
225  * \brief Frees the inner property set.
226  *
227  * It will also remove the object from its list if the object has been inserted. As such, you are not
228  * required to call \ref RemovePropertySet beforehand.
229  *
230  * \akwarning
231  * Do not use the in_pPropertySet after calling this function.
232  * \endakwarning
233  *
234  * \sa
235  * - \ref ak_wwise_plugin_notifications_object_store_v1::NotifyInnerObjectAddedRemoved
236  *
237  * \param[in] in_this Current instance of this interface.
238  * \param[in] in_pPropertySet The inner property set to permanently delete.
239  */
242  struct ak_wwise_plugin_host_property_set_instance_v1* in_pPropertySet
243  );
244 
245  /**
246  * \brief Returns the number of inner property set lists to be used with GetListName.
247  *
248  * \param[in] in_this Current instance of this interface.
249  * \return Number of property set lists, or 0 if there are none.
250  */
251  unsigned int(*GetListCount)(
253  );
254 
255  /**
256  * \brief Gets the name of the list at the specified position.
257  *
258  * List ordering is arbitrary and can vary between Wwise Authoring versions or project loads.
259  *
260  * \akwarning
261  * If you do not provide a buffer big enough to write the full string, the function will fail and
262  * return 0. Make sure to use a buffer big enough to write the entire string, depending
263  * on your own naming convention.
264  * \endakwarning
265  *
266  * \param[in] in_this Current instance of this interface.
267  * \param[in] in_uiListIndex Index of the list name to retrieve.
268  * \param[out] out_pszListName Pointer to a buffer that will contain the list name.
269  * \param[in] in_uiBufferSize Size of the provided buffer. If the buffer is not big enough for the
270  * entire name alongside a string ending suffix, the function will return 0 and no string
271  * will be copied.
272  * \return Number of characters written to the buffer, zero if failed.
273  */
274  unsigned int(*GetListName)(
275  const struct ak_wwise_plugin_host_object_store_instance_v1* in_this,
276  unsigned int in_uiListIndex,
277  char * out_pszListName,
278  unsigned int in_uiBufferSize
279  );
280 };
281 
282 
283 /**
284  * \brief Interface able to receive notifications for custom inner property sets.
285  *
286  * \aknote
287  * In order to manage property sets, you must make sure to use \ref AK::Wwise::Plugin::RequestPropertySet in
288  * your plug-in.
289  * \endaknote
290  *
291  * \sa
292  * - \ref wwiseplugin_objectstore
293  * - \ref ak_wwise_plugin_host_object_store_v1
294  */
296 #ifdef __cplusplus
298 #endif
299 {
300 #ifndef __cplusplus
301  ak_wwise_plugin_base_interface m_baseInterface;
302 #endif
303 
304 #ifdef __cplusplus
305  /// Base instance type for receiving notifications on related Object Store's changes.
307 
310  {}
311 #endif
312 
313  /**
314  * \brief Called when an inner property set's data has changed.
315  *
316  * For example, data can change through interaction with a UI control bound to a property,
317  * or through undo/redo operations.
318  *
319  * \sa
320  * - \ref wwiseplugin_objectstore_notifications
321  *
322  * \param[in] in_this Current instance of this interface.
323  * \param[in] in_pPSet The inner property set that changed.
324  * \param[in] in_guidPlatform The unique ID of the queried platform.
325  * \param[in] in_pszPropertyName The name of the property that changed.
326  */
330  const GUID * in_guidPlatform,
331  const char * in_pszPropertyName
332  );
333 
334  /**
335  * \brief Called when an inner property set has changed.
336  *
337  * For example, at a backend data refresh, a UI control bound to a property, or through
338  * undo/redo operations.
339  *
340  * \sa
341  * - \ref wwiseplugin_objectstore_notifications
342  *
343  * \param[in] in_this Current instance of this interface.
344  * \param[in] in_pPSet The inner property set that was added or removed.
345  * \param[in] in_uiIndex The insertion/removal index inside a named list.
346  * \param[in] in_eOperation InnerObjectAdded or InnerObjectRemoved.
347  */
351  unsigned int in_uiIndex,
353  );
354 };
355 
356 
357 #define AK_WWISE_PLUGIN_HOST_OBJECT_STORE_V1_ID() \
358  AK_WWISE_PLUGIN_BASE_INTERFACE_FROM_ID(AK_WWISE_PLUGIN_INTERFACE_TYPE_HOST_OBJECT_STORE, 1)
359 #define AK_WWISE_PLUGIN_HOST_OBJECT_STORE_V1_CTOR() \
360 { \
361  .m_baseInterface = AK_WWISE_PLUGIN_HOST_OBJECT_STORE_V1_ID() \
362 }
363 
364 #define AK_WWISE_PLUGIN_NOTIFICATIONS_OBJECT_STORE_V1_ID() \
365  AK_WWISE_PLUGIN_BASE_INTERFACE_FROM_ID(AK_WWISE_PLUGIN_INTERFACE_TYPE_NOTIFICATIONS_OBJECT_STORE, 1)
366 #define AK_WWISE_PLUGIN_NOTIFICATIONS_OBJECT_STORE_V1_CTOR(/* ak_wwise_plugin_info* */ in_pluginInfo, /* void* */ in_data) \
367 { \
368  .m_baseInterface = AK_WWISE_PLUGIN_BASE_INTERFACE_CTOR(AK_WWISE_PLUGIN_NOTIFICATIONS_OBJECT_STORE_V1_ID(), in_pluginInfo, in_data) \
369 }
370 
371 
372 #ifdef __cplusplus
373 namespace AK::Wwise::Plugin
374 {
375  namespace V1
376  {
378 
379  /// \copydoc ak_wwise_plugin_host_object_store_v1
380  template<typename PropertySetT = AK::Wwise::Plugin::PropertySet>
381  class ObjectStore : public CBaseInstanceGlue<CHostObjectStore>
382  {
383  public:
385 
386  /**
387  * \brief The interface type, as requested by this plug-in.
388  */
389  enum : InterfaceTypeValue
390  {
391  /**
392  * \brief The interface type, as requested by this plug-in.
393  */
395  };
396  /**
397  * \brief The interface version, as requested by this plug-in.
398  */
399  enum : InterfaceVersion
400  {
401  /**
402  * \brief The interface version, as requested by this plug-in.
403  */
405  };
406 
407  /**
408  * \brief Inserts an inner property set into the specified list at the specified position.
409  *
410  * To create a new inner property set, use \ref CreatePropertySet . You can then insert
411  * that particular inner property set in the named list <code>in_pszListName</code>, at the
412  * <code>in_uiIndex</code> position, so it will be stored in the project data. Existing object positions
413  * equal to or higher than <code>in_uiIndex</code> will be incremented as required.
414  *
415  * Named lists are created automatically, there is no limitation for naming. However, you should use the
416  * standardized naming convention for better memory usage in Wwise Authoring. List ordering is
417  * arbitrary.
418  *
419  * \aknote
420  * You must add up indexes sequentially. If you have 0-14 indexes, adding a new one at 40 will
421  * create it at 15. Pass <code>(unsigned int)-1</code> as the in_uiIndex to insert at the end of
422  * the list.
423  * \endaknote
424  *
425  * \akwarning
426  * Never reuse the same inner property set under two different indexes or lists. If you are
427  * uncertain, or if you want to move it elsewhere, use \ref RemovePropertySet before
428  * inserting it elsewhere.
429  * \endakwarning
430  *
431  * \sa
432  * - \ref ak_wwise_plugin_notifications_object_store_v1::NotifyInnerObjectAddedRemoved
433  *
434  * \param[in] in_pszListName Name of the affected list. That list will be created or appended depending
435  * on the situation.
436  * \param[in] in_uiIndex Inner property set index in the list. If higher than or equal to the current
437  * object count in that list, will add a new index. Otherwise, increments previous object's
438  * indexes to make room for this new inner property set.
439  * \param[in] in_propertySet The inner property set to include in the list's index. This property set
440  * must be created with \ref CreatePropertySet and not used elsewhere.
441  */
442  inline void InsertPropertySet(
443  const char * in_pszListName,
444  unsigned int in_uiIndex,
445  const PropertySetT& in_propertySet
446  )
447  {
448  g_cinterface->InsertPropertySet(this, in_pszListName, in_uiIndex, &in_propertySet);
449  }
450 
451  /**
452  * \brief Removes an inner property set from any list, without deleting the object itself.
453  *
454  * This is useful if you still need the object internally, or if you want to move that object to another
455  * list or index.
456  *
457  * If a list doesn't contain any items anymore, the list will automatically be deleted.
458  *
459  * The function \ref DeletePropertySet must be used if you still keep that reference without being
460  * reinserted through \ref InsertPropertySet. For normal deletion, you should execute
461  * \ref DeletePropertySet function directly, and it will remove any usage automatically.
462  *
463  * \sa
464  * - \ref ak_wwise_plugin_notifications_object_store_v1::NotifyInnerObjectAddedRemoved
465  *
466  * \param[in] in_propertySet The inner property set to remove from any list's index. The object is not
467  * deleted.
468  * \return true if successful
469  */
470  inline bool RemovePropertySet(
471  const PropertySetT& in_propertySet
472  )
473  {
474  return MKBOOL(g_cinterface->RemovePropertySet(this, &in_propertySet));
475  }
476 
477  /**
478  * \brief Gets an inner property set inside the specified list at the specified position.
479  *
480  * Wwise Authoring handles the object's lifetime as long as it's inserted. You should not call
481  * \ref DeletePropertySet unless you want to remove it from your plug-in instance's objects.
482  *
483  * \aknote
484  * In order to manage property sets, you must make sure to use
485  * \ref AK::Wwise::Plugin::RequestPropertySet.
486  * \endaknote
487  *
488  * \param[in] in_pszListName Name of the polled list. If the list doesn't exist, the function will
489  * return nullptr.
490  * \param[in] in_uiIndex Inner property set index in the list. If higher than or equal to the current
491  * object count in that list, the function will return nullptr.
492  * \return The requested inner property set, or nullptr if not existing.
493  */
494  inline PropertySetT* GetPropertySet(
495  const char * in_pszListName,
496  unsigned int in_uiIndex
497  ) const
498  {
499  return static_cast<PropertySetT*>(g_cinterface->GetPropertySet(this, in_pszListName, in_uiIndex));
500  }
501 
502  /**
503  * \brief Gets the number of inserted indexes inside the specified list.
504  *
505  * If the list doesn't exist, 0 will be returned.
506  *
507  * \param[in] in_pszListName Name of the polled list. If the list doesn't exist, the function will
508  * return 0.
509  * \return The number of inner property sets inside the list in_pszListName.
510  */
511  inline unsigned int GetPropertySetCount(
512  const char * in_pszListName
513  ) const
514  {
515  return g_cinterface->GetPropertySetCount(this, in_pszListName);
516  }
517 
518  /**
519  * \brief Creates a new inner property set.
520  *
521  * An inner property set must be defined as a particular <code>InnerType</code> in the plug-in's XML
522  * definition file.
523  *
524  * When this object is created, it is not bound to any list. As such, this is the only moment
525  * where it is under the plug-in's responsibility. You should either call
526  * \ref InsertPropertySet or \ref DeletePropertySet on it to make sure the plug-in doesn't cause
527  * a memory leak.
528  *
529  * \sa
530  * - \ref wwiseplugin_objectstore
531  * - \ref wwiseplugin_xml_properties_tag
532  *
533  * \param[in] in_pszType The requested InnerType, as defined in the plug-in's XML definition file.
534  * \return A new inner property set instance.
535  */
536  inline PropertySetT* CreatePropertySet(
537  const char * in_pszType
538  )
539  {
540  return static_cast<PropertySetT*>(g_cinterface->CreatePropertySet(this, in_pszType));
541  }
542 
543  /**
544  * \brief Frees the inner property set.
545  *
546  * It will also remove the object from its list if the object has been inserted. As such, you are not
547  * required to call \ref RemovePropertySet beforehand.
548  *
549  * \akwarning
550  * Do not use the in_pPropertySet after calling this function.
551  * \endakwarning
552  *
553  * \sa
554  * - \ref ak_wwise_plugin_notifications_object_store_v1::NotifyInnerObjectAddedRemoved
555  *
556  * \param[in] in_pPropertySet The inner property set to permanently delete.
557  */
558  inline void DeletePropertySet(
559  PropertySetT* in_pPropertySet
560  )
561  {
562  g_cinterface->DeletePropertySet(this, in_pPropertySet);
563  }
564 
565  /**
566  * \brief Returns the number of inner property set lists to be used with GetListName.
567  *
568  * \return Number of property set lists, or 0 if there are none.
569  */
570  inline unsigned int GetListCount(
571  ) const
572  {
573  return g_cinterface->GetListCount(this);
574  }
575 
576  /**
577  * \brief Gets the name of the list at the specified position.
578  *
579  * List ordering is arbitrary and can vary between Wwise Authoring versions or project loads.
580  *
581  * \akwarning
582  * If you do not provide a buffer big enough to write the full string, the function will fail and
583  * return 0. Make sure to use a buffer big enough to write the entire string, depending
584  * on your own naming convention.
585  * \endakwarning
586  *
587  * \param[in] in_uiListIndex Index of the list name to retrieve.
588  * \param[out] out_pszListName Pointer to a buffer that will contain the list name.
589  * \param[in] in_uiBufferSize Size of the provided buffer. If the buffer is not big enough for the
590  * entire name alongside a string ending suffix, the function will return 0 and no string
591  * will be copied.
592  * \return Number of characters written to the buffer, zero if failed.
593  */
594  inline unsigned int GetListName(
595  unsigned int in_uiListIndex,
596  char * out_pszListName,
597  unsigned int in_uiBufferSize
598  ) const
599  {
600  return g_cinterface->GetListName(this, in_uiListIndex, out_pszListName, in_uiBufferSize);
601  }
602  };
603 
604  namespace Notifications
605  {
607 
608  /// \copydoc ak_wwise_plugin_notifications_object_store_v1
609  template<typename PropertySetT = AK::Wwise::Plugin::PropertySet>
611  {
612  public:
613  /**
614  * \copydoc CObjectStore_::Instance
615  */
617 
618  /**
619  * \brief The interface type, as provided by this plug-in.
620  */
621  enum : InterfaceTypeValue
622  {
623  /**
624  * \brief The interface type, as provided by this plug-in.
625  */
627  };
628  /**
629  * \brief The interface version, as provided by this plug-in.
630  */
631  enum : InterfaceVersion
632  {
633  /**
634  * \brief The interface version, as provided by this plug-in.
635  */
637  };
638 
639  /**
640  * \brief The C interface, fulfilled by your plug-in.
641  */
642  struct Interface : public CObjectStore_
643  {
646  {
650  const GUID * in_guidPlatform,
651  const char * in_pszPropertyName)
652  {
653  static_cast<Instance*>(in_this)->NotifyInnerObjectPropertyChanged(
654  *static_cast<PropertySetT*>(in_pPSet),
655  *in_guidPlatform,
656  in_pszPropertyName);
657  };
661  unsigned int in_uiIndex,
662  NotifyInnerObjectOperation in_eOperation)
663  {
664  static_cast<Instance*>(in_this)->NotifyInnerObjectAddedRemoved(
665  *static_cast<PropertySetT*>(in_pPSet),
666  in_uiIndex,
667  in_eOperation);
668  };
669  }
670  };
671 
673  static Interface g_interface;
674  return &g_interface;
675  }
677  return this;
678  }
680  return this;
681  }
682 
685  {
686  }
687 
688  virtual ~ObjectStore_() {}
689 
690  /**
691  * \brief Called when an inner property set's data has changed.
692  *
693  * For example, data can change through interaction with a UI control bound to a property,
694  * or through undo/redo operations.
695  *
696  * \sa
697  * - \ref wwiseplugin_objectstore_notifications
698  *
699  * \param[in] in_PSet The inner property set that changed.
700  * \param[in] in_guidPlatform The unique ID of the queried platform.
701  * \param[in] in_pszPropertyName The name of the property that changed.
702  */
704  PropertySetT& in_PSet,
705  const GUID& in_guidPlatform,
706  const char* in_pszPropertyName
707  ) {}
708 
709  /**
710  * \brief Called when an inner property set has changed.
711  *
712  * For example, at a backend data refresh, a UI control bound to a property, or through
713  * undo/redo operations.
714  *
715  * \sa
716  * - \ref wwiseplugin_objectstore_notifications
717  *
718  * \param[in] in_PSet The inner property set that was added or removed.
719  * \param[in] in_uiIndex The insertion/removal index inside a named list.
720  * \param[in] in_eOperation InnerObjectAdded or InnerObjectRemoved.
721  */
723  PropertySetT& in_PSet,
724  unsigned int in_uiIndex,
725  NotifyInnerObjectOperation in_eOperation
726  ) {}
727  };
728  } // of namespace Notifications
729 
730  /**
731  * \brief Requests an ObjectStore interface, provided as m_objectStore variable.
732  *
733  * Deriving your plug-in class from RequestObjectStore will automatically request both ObjectStore and
734  * Notifications::ObjectStore_ interfaces. From this point, you will be able to derive from the virtual
735  * functions, as defined in Notifications::ObjectStore_, and access the host-provided functions in the
736  * \c m_objectStore variable.
737  */
741 
742  } // of namespace V1
743 
744  /// Latest version of the C ObjectStore interface.
746  /// Latest version of the C++ ObjectStore interface.
750  /// Latest version of the requested C++ ObjectStore interface.
752 
753  namespace Notifications
754  {
755  /// Latest version of the C ObjectStore notification interface.
757  /// Latest version of the C++ ObjectStore notification interface.
761  }
762 
768 
769 } // of namespace AK::Wwise::Plugin
770 
771 #endif
Custom inner property set interface.
ak_wwise_plugin_notifications_object_store_v1 CObjectStore_
PropertySetT * CreatePropertySet(const char *in_pszType)
Creates a new inner property set.
@ k_interfaceVersion
The interface version, as provided by this plug-in.
static GluedInterface * g_cinterface
The unique instance of the CInterface interface. Defined at nullptr first, overridden by the Host onc...
decltype(BaseInterface::m_version) InterfaceVersion
PluginInfoGenerator: Type for the m_version value in BaseInterface
Custom inner property set interface.
unsigned int(* GetListName)(const struct ak_wwise_plugin_host_object_store_instance_v1 *in_this, unsigned int in_uiListIndex, char *out_pszListName, unsigned int in_uiBufferSize)
Gets the name of the list at the specified position.
ak_wwise_plugin_host_object_store_v1 CHostObjectStore
V1::ObjectStore< AK::Wwise::Plugin::V2::PropertySet > ObjectStore_PropertySet_v2
Wwise Authoring Plug-ins - Plug-in API for property sets.
NotifyInnerObjectOperation
Type of operation for the NotifyInnerObjectAddedRemoved function.
Definition: PluginDef.h:83
bool RemovePropertySet(const PropertySetT &in_propertySet)
Removes an inner property set from any list, without deleting the object itself.
PluginInfoGenerator: Requests a host-provided service, and optionally receives a variable containing ...
RequestObjectStore_PropertySet_v2 RequestObjectStore
@ AK_WWISE_PLUGIN_INTERFACE_TYPE_HOST_OBJECT_STORE
2021.1 Object Store host service. ak_wwise_plugin_host_object_store_v1
unsigned int(* GetPropertySetCount)(const struct ak_wwise_plugin_host_object_store_instance_v1 *in_this, const char *in_pszListName)
Gets the number of inserted indexes inside the specified list.
@ k_interfaceType
The interface type, as requested by this plug-in.
unsigned int GetListCount() const
Returns the number of inner property set lists to be used with GetListName.
void(* NotifyInnerObjectAddedRemoved)(struct ak_wwise_plugin_notifications_object_store_instance_v1 *in_this, struct ak_wwise_plugin_host_property_set_instance_v1 *in_pPSet, unsigned int in_uiIndex, AK::Wwise::Plugin::NotifyInnerObjectOperation in_eOperation)
Called when an inner property set has changed.
PluginInfoGenerator: Associates an existing C Interface with a variable that can be used....
CInterfacePtr InterfacePtr
Definition: PluginDef.h:1057
Interface able to receive notifications for custom inner property sets.
ak_wwise_plugin_notifications_object_store_instance_v1 Instance
Base instance type for receiving notifications on related Object Store's changes.
void InsertPropertySet(const char *in_pszListName, unsigned int in_uiIndex, const PropertySetT &in_propertySet)
Inserts an inner property set into the specified list at the specified position.
struct ak_wwise_plugin_host_property_set_instance_v1 *(* GetPropertySet)(const struct ak_wwise_plugin_host_object_store_instance_v1 *in_this, const char *in_pszListName, unsigned int in_uiIndex)
Gets an inner property set inside the specified list at the specified position.
RequestedHostInterface< ObjectStore< AK::Wwise::Plugin::V2::PropertySet > > RequestObjectStore_PropertySet_v2
Base instance type for receiving notifications on related Object Store's changes.
Definition: PluginDef.h:871
struct ak_wwise_plugin_host_property_set_instance_v1 *(* CreatePropertySet)(struct ak_wwise_plugin_host_object_store_instance_v1 *in_this, const char *in_pszType)
Creates a new inner property set.
std::underlying_type< InterfaceType >::type InterfaceTypeValue
PluginInfoGenerator: Underlying storage type for the m_interface value in BaseInterface
const CObjectStore_::Instance * GetInstancePointer() const
Interface able to receive notifications for custom inner property sets.
@ k_interfaceType
The interface type, as provided by this plug-in.
void(* NotifyInnerObjectPropertyChanged)(struct ak_wwise_plugin_notifications_object_store_instance_v1 *in_this, struct ak_wwise_plugin_host_property_set_instance_v1 *in_pPSet, const GUID *in_guidPlatform, const char *in_pszPropertyName)
Called when an inner property set's data has changed.
AK_WWISE_PLUGIN_SPECIALIZE_INTERFACE_VERSION(AudioPlugin)
bool(* RemovePropertySet)(struct ak_wwise_plugin_host_object_store_instance_v1 *in_this, const struct ak_wwise_plugin_host_property_set_instance_v1 *in_pPropertySet)
Removes an inner property set from any list, without deleting the object itself.
Interface description and base class for every Wwise Authoring plug-in interface.
The C interface, fulfilled by your plug-in.
unsigned int(* GetListCount)(const struct ak_wwise_plugin_host_object_store_instance_v1 *in_this)
Returns the number of inner property set lists to be used with GetListName.
PropertySetT * GetPropertySet(const char *in_pszListName, unsigned int in_uiIndex) const
Gets an inner property set inside the specified list at the specified position.
virtual void NotifyInnerObjectAddedRemoved(PropertySetT &in_PSet, unsigned int in_uiIndex, NotifyInnerObjectOperation in_eOperation)
Called when an inner property set has changed.
Base host-provided instance type for ak_wwise_plugin_host_property_set_v1.
Definition: PluginDef.h:682
Base host-provided instance type for ak_wwise_plugin_host_object_store_v1.
Definition: PluginDef.h:669
void(* InsertPropertySet)(struct ak_wwise_plugin_host_object_store_instance_v1 *in_this, const char *in_pszListName, unsigned int in_uiIndex, const struct ak_wwise_plugin_host_property_set_instance_v1 *in_pPropertySet)
Inserts an inner property set into the specified list at the specified position.
@ k_interfaceVersion
The interface version, as requested by this plug-in.
#define MKBOOL(cond)
Definition: PluginHelpers.h:79
@ AK_WWISE_PLUGIN_INTERFACE_TYPE_NOTIFICATIONS_OBJECT_STORE
2021.1 Object Store modification notification. ak_wwise_plugin_notifications_object_store_v1
#define AK_WWISE_PLUGIN_SPECIALIZE_HOST_INTERFACE(in_name, in_varname,...)
PluginInfoGenerator: Creates a C++ host specialization for interface class specified in in_name,...
unsigned int GetListName(unsigned int in_uiListIndex, char *out_pszListName, unsigned int in_uiBufferSize) const
Gets the name of the list at the specified position.
V1::Notifications::ObjectStore_< AK::Wwise::Plugin::V2::PropertySet > ObjectStore_PropertySet_v2
virtual void NotifyInnerObjectPropertyChanged(PropertySetT &in_PSet, const GUID &in_guidPlatform, const char *in_pszPropertyName)
Called when an inner property set's data has changed.
void(* DeletePropertySet)(struct ak_wwise_plugin_host_object_store_instance_v1 *in_this, struct ak_wwise_plugin_host_property_set_instance_v1 *in_pPropertySet)
Frees the inner property set.
unsigned int GetPropertySetCount(const char *in_pszListName) const
Gets the number of inserted indexes inside the specified list.
AK_WWISE_PLUGIN_SPECIALIZE_INTERFACE_CLASS(AudioPlugin)
void DeletePropertySet(PropertySetT *in_pPropertySet)
Frees the inner property set.

이 페이지가 도움이 되었나요?

지원이 필요하신가요?

질문이 있으신가요? 문제를 겪고 계신가요? 더 많은 정보가 필요하신가요? 저희에게 문의해주시면 도와드리겠습니다!

지원 페이지를 방문해 주세요

작업하는 프로젝트에 대해 알려주세요. 언제든지 도와드릴 준비가 되어 있습니다.

프로젝트를 등록하세요. 아무런 조건이나 의무 사항 없이 빠른 시작을 도와드리겠습니다.

Wwise를 시작해 보세요