Version
menu_open
link
Wwise SDK 2021.1.14
HostObjectStore.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.14 Build: 6590
25  Copyright (c) 2006-2023 Audiokinetic Inc.
26 *******************************************************************************/
27 
28 /**
29  * \brief Wwise Authoring Plug-ins - API for storing objects not in the plug-in XML.
30  * \file AK/Wwise/Plugin/HostObjectStore.h
31  */
32 
33 #pragma once
34 
35 #include "HostPropertySet.h"
36 
37 
38 /**
39  * \brief Custom inner property set interface.
40  *
41  * The Object Store contains named lists, and those named lists each contains a vector of inner property sets.
42  *
43  * For example, you can create a list named "Property curve points" and have 12 inner property sets with coordinates,
44  * configuration and information for the 12 user-created curve points.
45  *
46  * Inner property sets can be created from any inner types, as defined in the plug-in's XML definition file
47  * <code>InnerTypes</code> section. Your lists should contain recognizable types, as there is no way to poll the
48  * type of the created object. This system was created with a one-list-one-type design pattern; however, there is
49  * no actual restriction in using different types in a same list.
50  *
51  * You can define as many named lists as required. You should consider creating different inner property sets or
52  * lists for each platform if the property set indexes aren't linked.
53  *
54  * You can create new inner property set with \ref CreatePropertySet, and insert it in a list's index with
55  * \ref InsertPropertySet.
56  *
57  * You can also subscribe to notifications through ak_wwise_plugin_notifications_object_store_v1 in order to be
58  * informed when some inner property set changed.
59  *
60  * \aknote
61  * In order to manage property sets, you must make sure to use \ref AK::Wwise::Plugin::RequestPropertySet in
62  * your plug-in.
63  * \endaknote
64  *
65  * \aknote
66  * Historical naming convention described it as "inner object" and "inner type". For simplicity,
67  * since we are talking about property sets, the naming has been standardized to "inner property set".
68  * However, the names are interchangeable and are still being used.
69  * \endaknote
70  *
71  * \sa
72  * - \ref wwiseplugin_objectstore
73  * - \ref wwiseplugin_xml_properties_tag
74  * - \ref ak_wwise_plugin_notifications_object_store_v1
75  */
77 #ifdef __cplusplus
79 #endif
80 {
81 #ifndef __cplusplus
82  ak_wwise_plugin_base_interface m_baseInterface;
83 #endif
84 
85 #ifdef __cplusplus
86  /// Base host-provided instance type for ak_wwise_plugin_host_object_store_v1.
88 
91  {}
92 #endif
93 
94  /**
95  * \brief Inserts an inner property set into the specified list at the specified position.
96  *
97  * To create a new inner property set, use \ref CreatePropertySet . You can then insert
98  * that particular inner property set in the named list <code>in_pszListName</code>, at the
99  * <code>in_uiIndex</code> position, so it will be stored in the project data. Existing object positions
100  * equal to or higher than <code>in_uiIndex</code> will be incremented as required.
101  *
102  * Named lists are created automatically, there is no limitation for naming. However, you should use the
103  * standardized naming convention for better memory usage in Wwise Authoring. List ordering is
104  * arbitrary.
105  *
106  * \aknote
107  * You must add up indexes sequentially. If you have 0-14 indexes, adding a new one at 40 will
108  * create it at 15. Pass <code>(unsigned int)-1</code> as the in_uiIndex to insert at the end of
109  * the list.
110  * \endaknote
111  *
112  * \akwarning
113  * Never reuse the same inner property set under two different indexes or lists. If you are
114  * uncertain, or if you want to move it elsewhere, use \ref RemovePropertySet before
115  * inserting it elsewhere.
116  * \endakwarning
117  *
118  * \sa
119  * - \ref ak_wwise_plugin_notifications_object_store_v1::NotifyInnerObjectAddedRemoved
120  *
121  * \param[in] in_this Current instance of this interface.
122  * \param[in] in_pszListName Name of the affected list. That list will be created or appended depending
123  * on the situation.
124  * \param[in] in_uiIndex Inner property set index in the list. If higher than or equal to the current
125  * object count in that list, will add a new index. Otherwise, increments previous object's
126  * indexes to make room for this new inner property set.
127  * \param[in] in_pPropertySet The inner property set to include in the list's index. This property set
128  * must be created with \ref CreatePropertySet and not used elsewhere.
129  */
132  const char * in_pszListName,
133  unsigned int in_uiIndex,
134  const struct ak_wwise_plugin_host_property_set_instance_v1* in_pPropertySet
135  );
136 
137  /**
138  * \brief Removes an inner property set from any list, without deleting the object itself.
139  *
140  * This is useful if you still need the object internally, or if you want to move that object to another
141  * list or index.
142  *
143  * If a list doesn't contain any items anymore, the list will automatically be deleted.
144  *
145  * The function \ref DeletePropertySet must be used if you still keep that reference without being
146  * reinserted through \ref InsertPropertySet. For normal deletion, you should execute
147  * \ref DeletePropertySet function directly, and it will remove any usage automatically.
148  *
149  * \sa
150  * - \ref ak_wwise_plugin_notifications_object_store_v1::NotifyInnerObjectAddedRemoved
151  *
152  * \param[in] in_this Current instance of this interface.
153  * \param[in] in_pPropertySet The inner property set to remove from any list's index. The object is not
154  * deleted.
155  * \return true if successful
156  */
159  const struct ak_wwise_plugin_host_property_set_instance_v1* in_pPropertySet
160  );
161 
162  /**
163  * \brief Gets an inner property set inside the specified list at the specified position.
164  *
165  * Wwise Authoring handles the object's lifetime as long as it's inserted. You should not call
166  * \ref DeletePropertySet unless you want to remove it from your plug-in instance's objects.
167  *
168  * \aknote
169  * In order to manage property sets, you must make sure to use
170  * \ref AK::Wwise::Plugin::RequestPropertySet.
171  * \endaknote
172  *
173  * \param[in] in_this Current instance of this interface.
174  * \param[in] in_pszListName Name of the polled list. If the list doesn't exist, the function will
175  * return nullptr.
176  * \param[in] in_uiIndex Inner property set index in the list. If higher than or equal to the current
177  * object count in that list, the function will return nullptr.
178  * \return The requested inner property set, or nullptr if not existing.
179  */
180  struct ak_wwise_plugin_host_property_set_instance_v1*(*GetPropertySet)(
181  const struct ak_wwise_plugin_host_object_store_instance_v1* in_this,
182  const char * in_pszListName,
183  unsigned int in_uiIndex
184  );
185 
186  /**
187  * \brief Gets the number of inserted indexes inside the specified list.
188  *
189  * If the list doesn't exist, 0 will be returned.
190  *
191  * \param[in] in_this Current instance of this interface.
192  * \param[in] in_pszListName Name of the polled list. If the list doesn't exist, the function will
193  * return 0.
194  * \return The number of inner property sets inside the list in_pszListName.
195  */
196  unsigned int(*GetPropertySetCount)(
197  const struct ak_wwise_plugin_host_object_store_instance_v1* in_this,
198  const char * in_pszListName
199  );
200 
201  /**
202  * \brief Creates a new inner property set.
203  *
204  * An inner property set must be defined as a particular <code>InnerType</code> in the plug-in's XML
205  * definition file.
206  *
207  * When this object is created, it is not bound to any list. As such, this is the only moment
208  * where it is under the plug-in's responsibility. You should either call
209  * \ref InsertPropertySet or \ref DeletePropertySet on it to make sure the plug-in doesn't cause
210  * a memory leak.
211  *
212  * \sa
213  * - \ref wwiseplugin_objectstore
214  * - \ref wwiseplugin_xml_properties_tag
215  *
216  * \param[in] in_this Current instance of this interface.
217  * \param[in] in_pszType The requested InnerType, as defined in the plug-in's XML definition file.
218  * \return A new inner property set instance.
219  */
220  struct ak_wwise_plugin_host_property_set_instance_v1*(*CreatePropertySet)(
222  const char * in_pszType
223  );
224 
225  /**
226  * \brief Frees the inner property set.
227  *
228  * It will also remove the object from its list if the object has been inserted. As such, you are not
229  * required to call \ref RemovePropertySet beforehand.
230  *
231  * \akwarning
232  * Do not use the in_pPropertySet after calling this function.
233  * \endakwarning
234  *
235  * \sa
236  * - \ref ak_wwise_plugin_notifications_object_store_v1::NotifyInnerObjectAddedRemoved
237  *
238  * \param[in] in_this Current instance of this interface.
239  * \param[in] in_pPropertySet The inner property set to permanently delete.
240  */
243  struct ak_wwise_plugin_host_property_set_instance_v1* in_pPropertySet
244  );
245 
246  /**
247  * \brief Returns the number of inner property set lists to be used with GetListName.
248  *
249  * \param[in] in_this Current instance of this interface.
250  * \return Number of property set lists, or 0 if there are none.
251  */
252  unsigned int(*GetListCount)(
254  );
255 
256  /**
257  * \brief Gets the name of the list at the specified position.
258  *
259  * List ordering is arbitrary and can vary between Wwise Authoring versions or project loads.
260  *
261  * \akwarning
262  * If you do not provide a buffer big enough to write the full string, the function will fail and
263  * return 0. Make sure to use a buffer big enough to write the entire string, depending
264  * on your own naming convention.
265  * \endakwarning
266  *
267  * \param[in] in_this Current instance of this interface.
268  * \param[in] in_uiListIndex Index of the list name to retrieve.
269  * \param[out] out_pszListName Pointer to a buffer that will contain the list name.
270  * \param[in] in_uiBufferSize Size of the provided buffer. If the buffer is not big enough for the
271  * entire name alongside a string ending suffix, the function will return 0 and no string
272  * will be copied.
273  * \return Number of characters written to the buffer, zero if failed.
274  */
275  unsigned int(*GetListName)(
276  const struct ak_wwise_plugin_host_object_store_instance_v1* in_this,
277  unsigned int in_uiListIndex,
278  char * out_pszListName,
279  unsigned int in_uiBufferSize
280  );
281 };
282 
283 
284 /**
285  * \brief Interface able to receive notifications for custom inner property sets.
286  *
287  * \aknote
288  * In order to manage property sets, you must make sure to use \ref AK::Wwise::Plugin::RequestPropertySet in
289  * your plug-in.
290  * \endaknote
291  *
292  * \sa
293  * - \ref wwiseplugin_objectstore
294  * - \ref ak_wwise_plugin_host_object_store_v1
295  */
297 #ifdef __cplusplus
299 #endif
300 {
301 #ifndef __cplusplus
302  ak_wwise_plugin_base_interface m_baseInterface;
303 #endif
304 
305 #ifdef __cplusplus
306  /// Base instance type for receiving notifications on related Object Store's changes.
308 
311  {}
312 #endif
313 
314  /**
315  * \brief Called when an inner property set's data has changed.
316  *
317  * For example, data can change through interaction with a UI control bound to a property,
318  * or through undo/redo operations.
319  *
320  * \sa
321  * - \ref wwiseplugin_objectstore_notifications
322  *
323  * \param[in] in_this Current instance of this interface.
324  * \param[in] in_pPSet The inner property set that changed.
325  * \param[in] in_guidPlatform The unique ID of the queried platform.
326  * \param[in] in_pszPropertyName The name of the property that changed.
327  */
331  const GUID * in_guidPlatform,
332  const char * in_pszPropertyName
333  );
334 
335  /**
336  * \brief Called when an inner property set has changed.
337  *
338  * For example, at a backend data refresh, a UI control bound to a property, or through
339  * undo/redo operations.
340  *
341  * \sa
342  * - \ref wwiseplugin_objectstore_notifications
343  *
344  * \param[in] in_this Current instance of this interface.
345  * \param[in] in_pPSet The inner property set that was added or removed.
346  * \param[in] in_uiIndex The insertion/removal index inside a named list.
347  * \param[in] in_eOperation InnerObjectAdded or InnerObjectRemoved.
348  */
352  unsigned int in_uiIndex,
354  );
355 };
356 
357 
358 #define AK_WWISE_PLUGIN_HOST_OBJECT_STORE_V1_ID() \
359  AK_WWISE_PLUGIN_BASE_INTERFACE_FROM_ID(AK_WWISE_PLUGIN_INTERFACE_TYPE_HOST_OBJECT_STORE, 1)
360 #define AK_WWISE_PLUGIN_HOST_OBJECT_STORE_V1_CTOR() \
361 { \
362  .m_baseInterface = AK_WWISE_PLUGIN_HOST_OBJECT_STORE_V1_ID() \
363 }
364 
365 #define AK_WWISE_PLUGIN_NOTIFICATIONS_OBJECT_STORE_V1_ID() \
366  AK_WWISE_PLUGIN_BASE_INTERFACE_FROM_ID(AK_WWISE_PLUGIN_INTERFACE_TYPE_NOTIFICATIONS_OBJECT_STORE, 1)
367 #define AK_WWISE_PLUGIN_NOTIFICATIONS_OBJECT_STORE_V1_CTOR(/* ak_wwise_plugin_info* */ in_pluginInfo, /* void* */ in_data) \
368 { \
369  .m_baseInterface = AK_WWISE_PLUGIN_BASE_INTERFACE_CTOR(AK_WWISE_PLUGIN_NOTIFICATIONS_OBJECT_STORE_V1_ID(), in_pluginInfo, in_data) \
370 }
371 
372 
373 #ifdef __cplusplus
374 namespace AK::Wwise::Plugin
375 {
376  namespace V1
377  {
379 
380  /// \copydoc ak_wwise_plugin_host_object_store_v1
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 PropertySet& 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 PropertySet& 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  */
495  const char * in_pszListName,
496  unsigned int in_uiIndex
497  ) const
498  {
499  return static_cast<PropertySet*>(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  */
537  const char * in_pszType
538  )
539  {
540  return static_cast<PropertySet*>(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  PropertySet* 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
610  {
611  public:
612  /**
613  * \copydoc CObjectStore_::Instance
614  */
616 
617  /**
618  * \brief The interface type, as provided by this plug-in.
619  */
620  enum : InterfaceTypeValue
621  {
622  /**
623  * \brief The interface type, as provided by this plug-in.
624  */
626  };
627  /**
628  * \brief The interface version, as provided by this plug-in.
629  */
630  enum : InterfaceVersion
631  {
632  /**
633  * \brief The interface version, as provided by this plug-in.
634  */
636  };
637 
638  /**
639  * \brief The C interface, fulfilled by your plug-in.
640  */
641  struct Interface : public CObjectStore_
642  {
645  {
649  const GUID * in_guidPlatform,
650  const char * in_pszPropertyName)
651  {
652  static_cast<Instance*>(in_this)->NotifyInnerObjectPropertyChanged(
653  *static_cast<PropertySet*>(in_pPSet),
654  *in_guidPlatform,
655  in_pszPropertyName);
656  };
660  unsigned int in_uiIndex,
661  NotifyInnerObjectOperation in_eOperation)
662  {
663  static_cast<Instance*>(in_this)->NotifyInnerObjectAddedRemoved(
664  *static_cast<PropertySet*>(in_pPSet),
665  in_uiIndex,
666  in_eOperation);
667  };
668  }
669  };
670 
672  static Interface g_interface;
673  return &g_interface;
674  }
676  return this;
677  }
679  return this;
680  }
681 
684  {
685  }
686 
687  virtual ~ObjectStore_() {}
688 
689  /**
690  * \brief Called when an inner property set's data has changed.
691  *
692  * For example, data can change through interaction with a UI control bound to a property,
693  * or through undo/redo operations.
694  *
695  * \sa
696  * - \ref wwiseplugin_objectstore_notifications
697  *
698  * \param[in] in_PSet The inner property set that changed.
699  * \param[in] in_guidPlatform The unique ID of the queried platform.
700  * \param[in] in_pszPropertyName The name of the property that changed.
701  */
703  PropertySet& in_PSet,
704  const GUID& in_guidPlatform,
705  const char* in_pszPropertyName
706  ) {}
707 
708  /**
709  * \brief Called when an inner property set has changed.
710  *
711  * For example, at a backend data refresh, a UI control bound to a property, or through
712  * undo/redo operations.
713  *
714  * \sa
715  * - \ref wwiseplugin_objectstore_notifications
716  *
717  * \param[in] in_PSet The inner property set that was added or removed.
718  * \param[in] in_uiIndex The insertion/removal index inside a named list.
719  * \param[in] in_eOperation InnerObjectAdded or InnerObjectRemoved.
720  */
722  PropertySet& in_PSet,
723  unsigned int in_uiIndex,
724  NotifyInnerObjectOperation in_eOperation
725  ) {}
726  };
727  } // of namespace Notifications
728 
729  /**
730  * \brief Requests an ObjectStore interface, provided as m_objectStore variable.
731  *
732  * Deriving your plug-in class from RequestObjectStore will automatically request both ObjectStore and
733  * Notifications::ObjectStore_ interfaces. From this point, you will be able to derive from the virtual
734  * functions, as defined in Notifications::ObjectStore_, and access the host-provided functions in the
735  * \c m_objectStore variable.
736  */
738 
739  } // of namespace V1
740 
741  /// Latest version of the C ObjectStore interface.
743  /// Latest version of the C++ ObjectStore interface.
745  /// Latest version of the requested C++ ObjectStore interface.
747 
748  namespace Notifications
749  {
750  /// Latest version of the C ObjectStore notification interface.
752  /// Latest version of the C++ ObjectStore notification interface.
754  }
755 
761 
762 } // of namespace AK::Wwise::Plugin
763 
764 #endif
Custom inner property set interface.
Definition: HostObjectStore.h:80
ak_wwise_plugin_notifications_object_store_v1 CObjectStore_
Definition: HostObjectStore.h:606
CObjectStore_::Instance * GetInstancePointer()
Definition: HostObjectStore.h:675
@ k_interfaceType
The interface type, as requested by this plug-in.
Definition: HostObjectStore.h:394
unsigned int GetPropertySetCount(const char *in_pszListName) const
Gets the number of inserted indexes inside the specified list.
Definition: HostObjectStore.h:511
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.
Definition: HostObjectStore.h:594
Custom inner property set interface.
Definition: HostObjectStore.h:382
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.
Definition: HostObjectStore.h:275
ak_wwise_plugin_host_object_store_v1 CHostObjectStore
Definition: HostObjectStore.h:378
V1::Notifications::ObjectStore_ ObjectStore
Latest version of the C++ ObjectStore notification interface.
Definition: HostObjectStore.h:753
Wwise Authoring Plug-ins - Plug-in API for property sets.
@ k_interfaceVersion
The interface version, as provided by this plug-in.
Definition: HostObjectStore.h:635
NotifyInnerObjectOperation
Type of operation for the NotifyInnerObjectAddedRemoved function.
Definition: PluginDef.h:78
virtual void NotifyInnerObjectAddedRemoved(PropertySet &in_PSet, unsigned int in_uiIndex, NotifyInnerObjectOperation in_eOperation)
Called when an inner property set has changed.
Definition: HostObjectStore.h:721
@ 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.
Definition: HostObjectStore.h:196
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.
Definition: HostObjectStore.h:442
virtual void NotifyInnerObjectPropertyChanged(PropertySet &in_PSet, const GUID &in_guidPlatform, const char *in_pszPropertyName)
Called when an inner property set's data has changed.
Definition: HostObjectStore.h:702
bool RemovePropertySet(const PropertySet &in_propertySet)
Removes an inner property set from any list, without deleting the object itself.
Definition: HostObjectStore.h:470
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.
Definition: HostObjectStore.h:349
RequestedHostInterface< ObjectStore > RequestObjectStore
Requests an ObjectStore interface, provided as m_objectStore variable.
Definition: HostObjectStore.h:737
PluginInfoGenerator: Associates an existing C Interface with a variable that can be used....
CInterfacePtr InterfacePtr
Definition: PluginDef.h:968
void DeletePropertySet(PropertySet *in_pPropertySet)
Frees the inner property set.
Definition: HostObjectStore.h:558
Interface able to receive notifications for custom inner property sets.
Definition: HostObjectStore.h:610
ak_wwise_plugin_notifications_object_store_instance_v1 Instance
Base instance type for receiving notifications on related Object Store's changes.
Definition: HostObjectStore.h:307
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.
Definition: HostObjectStore.h:180
PropertySet * CreatePropertySet(const char *in_pszType)
Creates a new inner property set.
Definition: HostObjectStore.h:536
Base instance type for receiving notifications on related Object Store's changes.
Definition: PluginDef.h:833
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.
Definition: HostObjectStore.h:220
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.
Definition: HostObjectStore.h:404
Interface able to receive notifications for custom inner property sets.
Definition: HostObjectStore.h:300
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.
Definition: HostObjectStore.h:328
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.
Definition: HostObjectStore.h:494
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.
Definition: HostObjectStore.h:157
Interface description and base class for every Wwise Authoring plug-in interface.
The C interface, fulfilled by your plug-in.
Definition: HostObjectStore.h:642
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.
Definition: HostObjectStore.h:252
@ k_interfaceType
The interface type, as provided by this plug-in.
Definition: HostObjectStore.h:625
unsigned int GetListCount() const
Returns the number of inner property set lists to be used with GetListName.
Definition: HostObjectStore.h:570
Base host-provided instance type for ak_wwise_plugin_host_property_set_v1.
Definition: PluginDef.h:644
Base host-provided instance type for ak_wwise_plugin_host_object_store_v1.
Definition: PluginDef.h:635
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.
Definition: HostObjectStore.h:130
#define MKBOOL(cond)
Definition: PluginHelpers.h:75
@ 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.
Definition: HostObjectStore.h:241
AK_WWISE_PLUGIN_SPECIALIZE_INTERFACE_CLASS(AudioPlugin)
Definition: PluginHelpers.h:46
const CObjectStore_::Instance * GetInstancePointer() const
Definition: HostObjectStore.h:678

Was this page helpful?

Need Support?

Questions? Problems? Need more info? Contact us, and we can help!

Visit our Support page

Tell us about your project. We're here to help.

Register your project and we'll help you get started with no strings attached!

Get started with Wwise