${Name}Bus.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. // {BEGIN_LICENSE}
  2. /*
  3. * Copyright (c) Contributors to the Open 3D Engine Project.
  4. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  5. *
  6. * SPDX-License-Identifier: Apache-2.0 OR MIT
  7. *
  8. */
  9. // {END_LICENSE}
  10. #pragma once
  11. #include <${Name}/${Name}TypeIds.h>
  12. #include <AzCore/EBus/EBus.h>
  13. #include <AzCore/Interface/Interface.h>
  14. namespace ${SanitizedCppName}
  15. {
  16. class ${SanitizedCppName}Requests
  17. {
  18. public:
  19. AZ_RTTI(${SanitizedCppName}Requests, ${SanitizedCppName}RequestsTypeId);
  20. virtual ~${SanitizedCppName}Requests() = default;
  21. // Put your public methods here
  22. };
  23. class ${SanitizedCppName}BusTraits
  24. : public AZ::EBusTraits
  25. {
  26. public:
  27. //////////////////////////////////////////////////////////////////////////
  28. // EBusTraits overrides
  29. static constexpr AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single;
  30. static constexpr AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single;
  31. //////////////////////////////////////////////////////////////////////////
  32. };
  33. using ${SanitizedCppName}RequestBus = AZ::EBus<${SanitizedCppName}Requests, ${SanitizedCppName}BusTraits>;
  34. using ${SanitizedCppName}Interface = AZ::Interface<${SanitizedCppName}Requests>;
  35. } // namespace ${SanitizedCppName}