ROS2-Gem-DemoModule.cpp 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. #include <AzCore/Memory/SystemAllocator.h>
  11. #include <AzCore/Module/Module.h>
  12. #include "ROS2-Gem-DemoSystemComponent.h"
  13. namespace ROS2_Gem_Demo
  14. {
  15. class ROS2_Gem_DemoModule
  16. : public AZ::Module
  17. {
  18. public:
  19. AZ_RTTI(ROS2_Gem_DemoModule, "{ebbd7642-5b1d-4ecb-901e-f0d52146528b}", AZ::Module);
  20. AZ_CLASS_ALLOCATOR(ROS2_Gem_DemoModule, AZ::SystemAllocator, 0);
  21. ROS2_Gem_DemoModule()
  22. : AZ::Module()
  23. {
  24. // Push results of [MyComponent]::CreateDescriptor() into m_descriptors here.
  25. m_descriptors.insert(m_descriptors.end(), {
  26. ROS2_Gem_DemoSystemComponent::CreateDescriptor(),
  27. });
  28. }
  29. /**
  30. * Add required SystemComponents to the SystemEntity.
  31. */
  32. AZ::ComponentTypeList GetRequiredSystemComponents() const override
  33. {
  34. return AZ::ComponentTypeList{
  35. azrtti_typeid<ROS2_Gem_DemoSystemComponent>(),
  36. };
  37. }
  38. };
  39. }// namespace ROS2_Gem_Demo
  40. AZ_DECLARE_MODULE_CLASS(Gem_ROS2_Gem_Demo, ROS2_Gem_Demo::ROS2_Gem_DemoModule)