AkListBareLight.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. Commercial License Usage
  5. Licensees holding valid commercial licenses to the AUDIOKINETIC Wwise Technology
  6. may use this file in accordance with the end user license agreement provided
  7. with the software or, alternatively, in accordance with the terms contained in a
  8. written agreement between you and Audiokinetic Inc.
  9. Apache License Usage
  10. Alternatively, this file may be used under the Apache License, Version 2.0 (the
  11. "Apache License"); you may not use this file except in compliance with the
  12. Apache License. You may obtain a copy of the Apache License at
  13. http://www.apache.org/licenses/LICENSE-2.0.
  14. Unless required by applicable law or agreed to in writing, software distributed
  15. under the Apache License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
  16. OR CONDITIONS OF ANY KIND, either express or implied. See the Apache License for
  17. the specific language governing permissions and limitations under the License.
  18. Copyright (c) 2023 Audiokinetic Inc.
  19. *******************************************************************************/
  20. // AkListBareLight.h
  21. #ifndef _AKLISTBARELIGHT_H
  22. #define _AKLISTBARELIGHT_H
  23. #include <AK/Tools/Common/AkListBare.h>
  24. // this one lets you define the structure
  25. // only requirement is that T must have member pNextLightItem,
  26. // or use the template getter.
  27. // client is responsible for allocation/deallocation of T.
  28. // WATCH OUT !
  29. // - remember that removeall/term can't delete the elements for you.
  30. // - be sure to destroy elements AFTER removing them from the list, as remove will
  31. // access members of the element.
  32. // WARNING : Each AkListBareLight item can be used in only one AkListBareLight at
  33. // once since the member pNextLightItem cannot be re-used.
  34. /// Next item name policy.
  35. template <class T> struct AkListBareLightNextItem
  36. {
  37. /// Default policy.
  38. static AkForceInline T *& Get( T * in_pItem )
  39. {
  40. return in_pItem->pNextLightItem;
  41. }
  42. };
  43. /// Implementation of List Bare Light.
  44. template <class T, template <class> class U_NEXTITEM = AkListBareLightNextItem > class AkListBareLight : public AkListBare< T, U_NEXTITEM, AkCountPolicyNoCount, AkLastPolicyNoLast > {};
  45. #endif // _AKLISTBARELIGHT_H