バージョン
menu_open
link
Wwise SDK 2023.1.2
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  class ObjectStore : public CBaseInstanceGlue<CHostObjectStore>
381  {
382  public:
384 
385  /**
386  * \brief The interface type, as requested by this plug-in.
387  */
388  enum : InterfaceTypeValue
389  {
390  /**
391  * \brief The interface type, as requested by this plug-in.
392  */
394  };
395  /**
396  * \brief The interface version, as requested by this plug-in.
397  */
398  enum : InterfaceVersion
399  {
400  /**
401  * \brief The interface version, as requested by this plug-in.
402  */
404  };
405 
406  /**
407  * \brief Inserts an inner property set into the specified list at the specified position.
408  *
409  * To create a new inner property set, use \ref CreatePropertySet . You can then insert
410  * that particular inner property set in the named list <code>in_pszListName</code>, at the
411  * <code>in_uiIndex</code> position, so it will be stored in the project data. Existing object positions
412  * equal to or higher than <code>in_uiIndex</code> will be incremented as required.
413  *
414  * Named lists are created automatically, there is no limitation for naming. However, you should use the
415  * standardized naming convention for better memory usage in Wwise Authoring. List ordering is
416  * arbitrary.
417  *
418  * \aknote
419  * You must add up indexes sequentially. If you have 0-14 indexes, adding a new one at 40 will
420  * create it at 15. Pass <code>(unsigned int)-1</code> as the in_uiIndex to insert at the end of
421  * the list.
422  * \endaknote
423  *
424  * \akwarning
425  * Never reuse the same inner property set under two different indexes or lists. If you are
426  * uncertain, or if you want to move it elsewhere, use \ref RemovePropertySet before
427  * inserting it elsewhere.
428  * \endakwarning
429  *
430  * \sa
431  * - \ref ak_wwise_plugin_notifications_object_store_v1::NotifyInnerObjectAddedRemoved
432  *
433  * \param[in] in_pszListName Name of the affected list. That list will be created or appended depending
434  * on the situation.
435  * \param[in] in_uiIndex Inner property set index in the list. If higher than or equal to the current
436  * object count in that list, will add a new index. Otherwise, increments previous object's
437  * indexes to make room for this new inner property set.
438  * \param[in] in_propertySet The inner property set to include in the list's index. This property set
439  * must be created with \ref CreatePropertySet and not used elsewhere.
440  */
441  inline void InsertPropertySet(
442  const char * in_pszListName,
443  unsigned int in_uiIndex,
444  const PropertySet& in_propertySet
445  )
446  {
447  g_cinterface->InsertPropertySet(this, in_pszListName, in_uiIndex, &in_propertySet);
448  }
449 
450  /**
451  * \brief Removes an inner property set from any list, without deleting the object itself.
452  *
453  * This is useful if you still need the object internally, or if you want to move that object to another
454  * list or index.
455  *
456  * If a list doesn't contain any items anymore, the list will automatically be deleted.
457  *
458  * The function \ref DeletePropertySet must be used if you still keep that reference without being
459  * reinserted through \ref InsertPropertySet. For normal deletion, you should execute
460  * \ref DeletePropertySet function directly, and it will remove any usage automatically.
461  *
462  * \sa
463  * - \ref ak_wwise_plugin_notifications_object_store_v1::NotifyInnerObjectAddedRemoved
464  *
465  * \param[in] in_propertySet The inner property set to remove from any list's index. The object is not
466  * deleted.
467  * \return true if successful
468  */
469  inline bool RemovePropertySet(
470  const PropertySet& in_propertySet
471  )
472  {
473  return MKBOOL(g_cinterface->RemovePropertySet(this, &in_propertySet));
474  }
475 
476  /**
477  * \brief Gets an inner property set inside the specified list at the specified position.
478  *
479  * Wwise Authoring handles the object's lifetime as long as it's inserted. You should not call
480  * \ref DeletePropertySet unless you want to remove it from your plug-in instance's objects.
481  *
482  * \aknote
483  * In order to manage property sets, you must make sure to use
484  * \ref AK::Wwise::Plugin::RequestPropertySet.
485  * \endaknote
486  *
487  * \param[in] in_pszListName Name of the polled list. If the list doesn't exist, the function will
488  * return nullptr.
489  * \param[in] in_uiIndex Inner property set index in the list. If higher than or equal to the current
490  * object count in that list, the function will return nullptr.
491  * \return The requested inner property set, or nullptr if not existing.
492  */
494  const char * in_pszListName,
495  unsigned int in_uiIndex
496  ) const
497  {
498  return static_cast<PropertySet*>(g_cinterface->GetPropertySet(this, in_pszListName, in_uiIndex));
499  }
500 
501  /**
502  * \brief Gets the number of inserted indexes inside the specified list.
503  *
504  * If the list doesn't exist, 0 will be returned.
505  *
506  * \param[in] in_pszListName Name of the polled list. If the list doesn't exist, the function will
507  * return 0.
508  * \return The number of inner property sets inside the list in_pszListName.
509  */
510  inline unsigned int GetPropertySetCount(
511  const char * in_pszListName
512  ) const
513  {
514  return g_cinterface->GetPropertySetCount(this, in_pszListName);
515  }
516 
517  /**
518  * \brief Creates a new inner property set.
519  *
520  * An inner property set must be defined as a particular <code>InnerType</code> in the plug-in's XML
521  * definition file.
522  *
523  * When this object is created, it is not bound to any list. As such, this is the only moment
524  * where it is under the plug-in's responsibility. You should either call
525  * \ref InsertPropertySet or \ref DeletePropertySet on it to make sure the plug-in doesn't cause
526  * a memory leak.
527  *
528  * \sa
529  * - \ref wwiseplugin_objectstore
530  * - \ref wwiseplugin_xml_properties_tag
531  *
532  * \param[in] in_pszType The requested InnerType, as defined in the plug-in's XML definition file.
533  * \return A new inner property set instance.
534  */
536  const char * in_pszType
537  )
538  {
539  return static_cast<PropertySet*>(g_cinterface->CreatePropertySet(this, in_pszType));
540  }
541 
542  /**
543  * \brief Frees the inner property set.
544  *
545  * It will also remove the object from its list if the object has been inserted. As such, you are not
546  * required to call \ref RemovePropertySet beforehand.
547  *
548  * \akwarning
549  * Do not use the in_pPropertySet after calling this function.
550  * \endakwarning
551  *
552  * \sa
553  * - \ref ak_wwise_plugin_notifications_object_store_v1::NotifyInnerObjectAddedRemoved
554  *
555  * \param[in] in_pPropertySet The inner property set to permanently delete.
556  */
557  inline void DeletePropertySet(
558  PropertySet* in_pPropertySet
559  )
560  {
561  g_cinterface->DeletePropertySet(this, in_pPropertySet);
562  }
563 
564  /**
565  * \brief Returns the number of inner property set lists to be used with GetListName.
566  *
567  * \return Number of property set lists, or 0 if there are none.
568  */
569  inline unsigned int GetListCount(
570  ) const
571  {
572  return g_cinterface->GetListCount(this);
573  }
574 
575  /**
576  * \brief Gets the name of the list at the specified position.
577  *
578  * List ordering is arbitrary and can vary between Wwise Authoring versions or project loads.
579  *
580  * \akwarning
581  * If you do not provide a buffer big enough to write the full string, the function will fail and
582  * return 0. Make sure to use a buffer big enough to write the entire string, depending
583  * on your own naming convention.
584  * \endakwarning
585  *
586  * \param[in] in_uiListIndex Index of the list name to retrieve.
587  * \param[out] out_pszListName Pointer to a buffer that will contain the list name.
588  * \param[in] in_uiBufferSize Size of the provided buffer. If the buffer is not big enough for the
589  * entire name alongside a string ending suffix, the function will return 0 and no string
590  * will be copied.
591  * \return Number of characters written to the buffer, zero if failed.
592  */
593  inline unsigned int GetListName(
594  unsigned int in_uiListIndex,
595  char * out_pszListName,
596  unsigned int in_uiBufferSize
597  ) const
598  {
599  return g_cinterface->GetListName(this, in_uiListIndex, out_pszListName, in_uiBufferSize);
600  }
601  };
602 
603  namespace Notifications
604  {
606 
607  /// \copydoc ak_wwise_plugin_notifications_object_store_v1
609  {
610  public:
611  /**
612  * \copydoc CObjectStore_::Instance
613  */
615 
616  /**
617  * \brief The interface type, as provided by this plug-in.
618  */
619  enum : InterfaceTypeValue
620  {
621  /**
622  * \brief The interface type, as provided by this plug-in.
623  */
625  };
626  /**
627  * \brief The interface version, as provided by this plug-in.
628  */
629  enum : InterfaceVersion
630  {
631  /**
632  * \brief The interface version, as provided by this plug-in.
633  */
635  };
636 
637  /**
638  * \brief The C interface, fulfilled by your plug-in.
639  */
640  struct Interface : public CObjectStore_
641  {
644  {
648  const GUID * in_guidPlatform,
649  const char * in_pszPropertyName)
650  {
651  static_cast<Instance*>(in_this)->NotifyInnerObjectPropertyChanged(
652  *static_cast<PropertySet*>(in_pPSet),
653  *in_guidPlatform,
654  in_pszPropertyName);
655  };
659  unsigned int in_uiIndex,
660  NotifyInnerObjectOperation in_eOperation)
661  {
662  static_cast<Instance*>(in_this)->NotifyInnerObjectAddedRemoved(
663  *static_cast<PropertySet*>(in_pPSet),
664  in_uiIndex,
665  in_eOperation);
666  };
667  }
668  };
669 
671  static Interface g_interface;
672  return &g_interface;
673  }
675  return this;
676  }
678  return this;
679  }
680 
683  {
684  }
685 
686  virtual ~ObjectStore_() {}
687 
688  /**
689  * \brief Called when an inner property set's data has changed.
690  *
691  * For example, data can change through interaction with a UI control bound to a property,
692  * or through undo/redo operations.
693  *
694  * \sa
695  * - \ref wwiseplugin_objectstore_notifications
696  *
697  * \param[in] in_PSet The inner property set that changed.
698  * \param[in] in_guidPlatform The unique ID of the queried platform.
699  * \param[in] in_pszPropertyName The name of the property that changed.
700  */
702  PropertySet& in_PSet,
703  const GUID& in_guidPlatform,
704  const char* in_pszPropertyName
705  ) {}
706 
707  /**
708  * \brief Called when an inner property set has changed.
709  *
710  * For example, at a backend data refresh, a UI control bound to a property, or through
711  * undo/redo operations.
712  *
713  * \sa
714  * - \ref wwiseplugin_objectstore_notifications
715  *
716  * \param[in] in_PSet The inner property set that was added or removed.
717  * \param[in] in_uiIndex The insertion/removal index inside a named list.
718  * \param[in] in_eOperation InnerObjectAdded or InnerObjectRemoved.
719  */
721  PropertySet& in_PSet,
722  unsigned int in_uiIndex,
723  NotifyInnerObjectOperation in_eOperation
724  ) {}
725  };
726  } // of namespace Notifications
727 
728  /**
729  * \brief Requests an ObjectStore interface, provided as m_objectStore variable.
730  *
731  * Deriving your plug-in class from RequestObjectStore will automatically request both ObjectStore and
732  * Notifications::ObjectStore_ interfaces. From this point, you will be able to derive from the virtual
733  * functions, as defined in Notifications::ObjectStore_, and access the host-provided functions in the
734  * \c m_objectStore variable.
735  */
737 
738  } // of namespace V1
739 
740  /// Latest version of the C ObjectStore interface.
742  /// Latest version of the C++ ObjectStore interface.
744  /// Latest version of the requested C++ ObjectStore interface.
746 
747  namespace Notifications
748  {
749  /// Latest version of the C ObjectStore notification interface.
751  /// Latest version of the C++ ObjectStore notification interface.
753  }
754 
760 
761 } // of namespace AK::Wwise::Plugin
762 
763 #endif
Custom inner property set interface.
ak_wwise_plugin_notifications_object_store_v1 CObjectStore_
@ k_interfaceType
The interface type, as requested by this plug-in.
unsigned int GetPropertySetCount(const char *in_pszListName) const
Gets the number of inserted indexes inside the specified list.
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
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.
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::Notifications::ObjectStore_ ObjectStore
Latest version of the C++ ObjectStore notification interface.
Wwise Authoring Plug-ins - Plug-in API for property sets.
@ k_interfaceVersion
The interface version, as provided by this plug-in.
NotifyInnerObjectOperation
Type of operation for the NotifyInnerObjectAddedRemoved function.
Definition: PluginDef.h:83
virtual void NotifyInnerObjectAddedRemoved(PropertySet &in_PSet, unsigned int in_uiIndex, NotifyInnerObjectOperation in_eOperation)
Called when an inner property set has changed.
@ 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.
void InsertPropertySet(const char *in_pszListName, unsigned int in_uiIndex, const PropertySet &in_propertySet)
Inserts an inner property set into the specified list at the specified position.
virtual void NotifyInnerObjectPropertyChanged(PropertySet &in_PSet, const GUID &in_guidPlatform, const char *in_pszPropertyName)
Called when an inner property set's data has changed.
bool RemovePropertySet(const PropertySet &in_propertySet)
Removes an inner property set from any list, without deleting the object itself.
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.
RequestedHostInterface< ObjectStore > RequestObjectStore
Requests an ObjectStore interface, provided as m_objectStore variable.
PluginInfoGenerator: Associates an existing C Interface with a variable that can be used....
CInterfacePtr InterfacePtr
Definition: PluginDef.h:995
void DeletePropertySet(PropertySet *in_pPropertySet)
Frees the inner property set.
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.
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.
PropertySet * CreatePropertySet(const char *in_pszType)
Creates a new inner property set.
Base instance type for receiving notifications on related Object Store's changes.
Definition: PluginDef.h:849
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
@ k_interfaceVersion
The interface version, as requested by this plug-in.
Interface able to receive notifications for custom inner property sets.
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.
Interface used to interact with property sets.
AK_WWISE_PLUGIN_SPECIALIZE_INTERFACE_VERSION(AudioPlugin)
PropertySet * GetPropertySet(const char *in_pszListName, unsigned int in_uiIndex) const
Gets an inner property set inside the specified list at the specified position.
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.
@ k_interfaceType
The interface type, as provided by this plug-in.
unsigned int GetListCount() const
Returns the number of inner property set lists to be used with GetListName.
Base host-provided instance type for ak_wwise_plugin_host_property_set_v1.
Definition: PluginDef.h:660
Base host-provided instance type for ak_wwise_plugin_host_object_store_v1.
Definition: PluginDef.h:651
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.
#define MKBOOL(cond)
Definition: PluginHelpers.h:74
@ 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,...
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.
AK_WWISE_PLUGIN_SPECIALIZE_INTERFACE_CLASS(AudioPlugin)
const CObjectStore_::Instance * GetInstancePointer() const

このページはお役に立ちましたか?

サポートは必要ですか?

ご質問や問題、ご不明点はございますか?お気軽にお問い合わせください。

サポートページをご確認ください

あなたのプロジェクトについて教えてください。ご不明な点はありませんか。

プロジェクトを登録していただくことで、ご利用開始のサポートをいたします。

Wwiseからはじめよう