${Name}Module.cpp 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #include <${Name}/${Name}TypeIds.h>
  9. #include <${Name}ModuleInterface.h>
  10. #include "${Name}SystemComponent.h"
  11. #include <AzCore/RTTI/RTTI.h>
  12. #include <Components/${Name}Component.h>
  13. namespace ${Name}
  14. {
  15. class ${Name}Module
  16. : public ${Name}ModuleInterface
  17. {
  18. public:
  19. AZ_RTTI(${Name}Module, ${Name}ModuleTypeId, ${Name}ModuleInterface);
  20. AZ_CLASS_ALLOCATOR(${Name}Module, AZ::SystemAllocator);
  21. ${Name}Module()
  22. {
  23. m_descriptors.insert(m_descriptors.end(),
  24. {
  25. ${Name}SystemComponent::CreateDescriptor(),
  26. ${Name}Component::CreateDescriptor(),
  27. });
  28. }
  29. AZ::ComponentTypeList GetRequiredSystemComponents() const
  30. {
  31. return AZ::ComponentTypeList{ azrtti_typeid<${Name}SystemComponent>() };
  32. }
  33. };
  34. }// namespace ${Name}
  35. AZ_DECLARE_MODULE_CLASS(Gem_${Name}, ${Name}::${Name}Module)