ROS2EditorModule.cpp 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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 "ROS2EditorClockSystemComponent.h"
  9. #include "ROS2EditorSystemComponent.h"
  10. #include <Frame/ROS2FrameEditorComponent.h>
  11. #include <Frame/ROS2FrameEditorSystemComponent.h>
  12. #include <ROS2/ROS2TypeIds.h>
  13. #include <ROS2ModuleInterface.h>
  14. #ifdef WITH_GAZEBO_MSGS
  15. #include <Spawner/ROS2SpawnPointEditorComponent.h>
  16. #include <Spawner/ROS2SpawnerEditorComponent.h>
  17. #endif
  18. namespace ROS2
  19. {
  20. class ROS2EditorModule : public ROS2ModuleInterface
  21. {
  22. public:
  23. AZ_RTTI(ROS2EditorModule, ROS2EditorModuleTypeId, ROS2ModuleInterface);
  24. AZ_CLASS_ALLOCATOR(ROS2EditorModule, AZ::SystemAllocator);
  25. ROS2EditorModule()
  26. {
  27. m_descriptors.insert(
  28. m_descriptors.end(),
  29. { ROS2EditorSystemComponent::CreateDescriptor(),
  30. ROS2EditorClockSystemComponent::CreateDescriptor(),
  31. #ifdef WITH_GAZEBO_MSGS
  32. ROS2SpawnerEditorComponent::CreateDescriptor(),
  33. ROS2SpawnPointEditorComponent::CreateDescriptor(),
  34. #endif
  35. ROS2FrameEditorSystemComponent::CreateDescriptor(),
  36. ROS2FrameEditorComponent::CreateDescriptor() });
  37. }
  38. AZ::ComponentTypeList GetRequiredSystemComponents() const override
  39. {
  40. return AZ::ComponentTypeList{
  41. azrtti_typeid<ROS2EditorSystemComponent>(),
  42. azrtti_typeid<ROS2FrameEditorSystemComponent>(),
  43. azrtti_typeid<ROS2EditorClockSystemComponent>(),
  44. };
  45. }
  46. };
  47. } // namespace ROS2
  48. #if defined(O3DE_GEM_NAME)
  49. AZ_DECLARE_MODULE_CLASS(AZ_JOIN(Gem_, O3DE_GEM_NAME, _Editor), ROS2::ROS2EditorModule)
  50. #else
  51. AZ_DECLARE_MODULE_CLASS(Gem_ROS2_Editor, ROS2::ROS2EditorModule)
  52. #endif