ROS2EditorModule.cpp 2.1 KB

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