BootstrapModule.cpp 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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 <AzCore/Memory/SystemAllocator.h>
  9. #include <AzCore/Module/Module.h>
  10. #include <BootstrapSystemComponent.h>
  11. namespace AZ
  12. {
  13. namespace Render
  14. {
  15. namespace Bootstrap
  16. {
  17. class BootstrapModule
  18. : public AZ::Module
  19. {
  20. public:
  21. AZ_RTTI(BootstrapModule, "{ADDE20F4-03E6-4692-A736-E56B87952727}", AZ::Module);
  22. AZ_CLASS_ALLOCATOR(BootstrapModule, AZ::SystemAllocator);
  23. BootstrapModule()
  24. : AZ::Module()
  25. {
  26. // Push results of [MyComponent]::CreateDescriptor() into m_descriptors here.
  27. m_descriptors.insert(m_descriptors.end(), {
  28. BootstrapSystemComponent::CreateDescriptor()
  29. });
  30. }
  31. /**
  32. * Add required SystemComponents to the SystemEntity.
  33. */
  34. AZ::ComponentTypeList GetRequiredSystemComponents() const override
  35. {
  36. return AZ::ComponentTypeList{
  37. azrtti_typeid<BootstrapSystemComponent>()
  38. };
  39. }
  40. };
  41. } // namespace Bootstrap
  42. } // namespace Render
  43. } // namespace AZ
  44. #if defined(O3DE_GEM_NAME)
  45. AZ_DECLARE_MODULE_CLASS(AZ_JOIN(Gem_, O3DE_GEM_NAME), AZ::Render::Bootstrap::BootstrapModule)
  46. #else
  47. AZ_DECLARE_MODULE_CLASS(Gem_Atom_Bootstrap, AZ::Render::Bootstrap::BootstrapModule)
  48. #endif