ROS2EditorModule.cpp 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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 <ROS2EditorSystemComponent.h>
  9. #include <ROS2ModuleInterface.h>
  10. #include <RobotImporter/ROS2RobotImporterEditorSystemComponent.h>
  11. namespace ROS2
  12. {
  13. class ROS2EditorModule : public ROS2ModuleInterface
  14. {
  15. public:
  16. AZ_RTTI(ROS2EditorModule, "{3DDFC98F-D1CC-4658-BAF8-2CC34A9D39F3}", ROS2ModuleInterface);
  17. AZ_CLASS_ALLOCATOR(ROS2EditorModule, AZ::SystemAllocator, 0);
  18. ROS2EditorModule()
  19. {
  20. // Push results of [MyComponent]::CreateDescriptor() into m_descriptors here.
  21. // Add ALL components descriptors associated with this gem to m_descriptors.
  22. // This will associate the AzTypeInfo information for the components with the SerializeContext, BehaviorContext and
  23. // EditContext. This happens through the [MyComponent]::Reflect() function.
  24. m_descriptors.insert(
  25. m_descriptors.end(),
  26. { ROS2EditorSystemComponent::CreateDescriptor(), ROS2RobotImporterEditorSystemComponent::CreateDescriptor() });
  27. }
  28. /**
  29. * Add required SystemComponents to the SystemEntity.
  30. * Non-SystemComponents should not be added here
  31. */
  32. AZ::ComponentTypeList GetRequiredSystemComponents() const override
  33. {
  34. return AZ::ComponentTypeList{
  35. azrtti_typeid<ROS2EditorSystemComponent>(),
  36. azrtti_typeid<ROS2RobotImporterEditorSystemComponent>(),
  37. };
  38. }
  39. };
  40. } // namespace ROS2
  41. AZ_DECLARE_MODULE_CLASS(Gem_ROS2, ROS2::ROS2EditorModule)