${Name}Interface.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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 <AzCore/EBus/EBus.h>
  12. #include <AzCore/Interface/Interface.h>
  13. namespace ${SanitizedCppName}
  14. {
  15. class ${SanitizedCppName}Requests
  16. {
  17. public:
  18. AZ_RTTI(${SanitizedCppName}Requests, "{${Random_Uuid}}");
  19. virtual ~${SanitizedCppName}Requests() = default;
  20. // Put your public methods here
  21. };
  22. class ${SanitizedCppName}BusTraits
  23. : public AZ::EBusTraits
  24. {
  25. public:
  26. //////////////////////////////////////////////////////////////////////////
  27. // EBusTraits overrides
  28. static constexpr AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single;
  29. static constexpr AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single;
  30. //////////////////////////////////////////////////////////////////////////
  31. };
  32. using ${SanitizedCppName}RequestBus = AZ::EBus<${SanitizedCppName}Requests, ${SanitizedCppName}BusTraits>;
  33. using ${SanitizedCppName}Interface = AZ::Interface<${SanitizedCppName}Requests>;
  34. } // namespace ${SanitizedCppName}