WwiseGroupValueInfo.h 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /*******************************************************************************
  2. The content of this file includes portions of the proprietary AUDIOKINETIC Wwise
  3. Technology released in source code form as part of the game integration package.
  4. The content of this file may not be used without valid licenses to the
  5. AUDIOKINETIC Wwise Technology.
  6. Note that the use of the game engine is subject to the Unreal(R) Engine End User
  7. License Agreement at https://www.unrealengine.com/en-US/eula/unreal
  8. License Usage
  9. Licensees holding valid licenses to the AUDIOKINETIC Wwise Technology may use
  10. this file in accordance with the end user license agreement provided with the
  11. software or, alternatively, in accordance with the terms contained
  12. in a written agreement between you and Audiokinetic Inc.
  13. Copyright (c) 2023 Audiokinetic Inc.
  14. *******************************************************************************/
  15. #pragma once
  16. #include "CoreMinimal.h"
  17. #include "Wwise/Info/WwiseObjectInfo.h"
  18. #include "WwiseGroupValueInfo.generated.h"
  19. USTRUCT(BlueprintType, Meta = (Category = "Wwise", DisplayName = "GroupValue Info", HasNativeMake = "/Script/WwiseResourceLoader.WwiseGroupValueInfoLibrary:MakeStruct", HasNativeBreak = "/Script/WwiseResourceLoader.WwiseGroupValueInfoLibrary:BreakStruct"))
  20. struct WWISERESOURCELOADER_API FWwiseGroupValueInfo: public FWwiseObjectInfo
  21. {
  22. GENERATED_BODY()
  23. UPROPERTY(EditAnyWhere, Category = "Info")
  24. uint32 GroupShortId = 0;
  25. FWwiseGroupValueInfo() :
  26. FWwiseObjectInfo(),
  27. GroupShortId(0)
  28. {}
  29. FWwiseGroupValueInfo(const FWwiseGroupValueInfo& InGroupValueInfo) :
  30. FWwiseObjectInfo(InGroupValueInfo),
  31. GroupShortId(InGroupValueInfo.GroupShortId)
  32. {}
  33. FWwiseGroupValueInfo(const FGuid& InWwiseGuid, uint32 InGroupShortId, uint32 InWwiseShortId, const FString& InWwiseName) :
  34. FWwiseObjectInfo(InWwiseGuid, InGroupShortId, InWwiseName),
  35. GroupShortId(InGroupShortId)
  36. {}
  37. FWwiseGroupValueInfo(const FGuid& InWwiseGuid, uint32 InGroupShortId, uint32 InWwiseShortId, const FName& InWwiseName) :
  38. FWwiseObjectInfo(InWwiseGuid, InGroupShortId, InWwiseName),
  39. GroupShortId(InGroupShortId)
  40. {}
  41. FWwiseGroupValueInfo(uint32 InGroupShortId, uint32 InWwiseShortId, const FString& InWwiseName) :
  42. FWwiseObjectInfo(InWwiseShortId, InWwiseName),
  43. GroupShortId(InGroupShortId)
  44. {}
  45. FWwiseGroupValueInfo(uint32 InGroupShortId, uint32 InWwiseShortId, const FName& InWwiseName) :
  46. FWwiseObjectInfo(InWwiseShortId, InWwiseName),
  47. GroupShortId(InGroupShortId)
  48. {}
  49. bool operator==(const FWwiseGroupValueInfo& Rhs) const
  50. {
  51. return (!WwiseGuid.IsValid() || !Rhs.WwiseGuid.IsValid() || WwiseGuid == Rhs.WwiseGuid) &&
  52. ((GroupShortId == 0 && WwiseShortId == 0) || (Rhs.GroupShortId == 0 && Rhs.WwiseShortId == 0) || (GroupShortId == Rhs.GroupShortId && WwiseShortId == Rhs.WwiseShortId)) &&
  53. (WwiseName.IsNone() || Rhs.WwiseName.IsNone() || WwiseName == Rhs.WwiseName);
  54. }
  55. bool operator!=(const FWwiseGroupValueInfo& Rhs) const
  56. {
  57. return !operator==(Rhs);
  58. }
  59. };
  60. inline uint32 GetTypeHash(const FWwiseGroupValueInfo& InValue)
  61. {
  62. return HashCombine(HashCombine(HashCombine(
  63. GetTypeHash(InValue.WwiseGuid),
  64. GetTypeHash(InValue.GroupShortId)),
  65. GetTypeHash(InValue.WwiseShortId)),
  66. GetTypeHash(InValue.WwiseName));
  67. }