2
0

ROS2EditorModule.cpp 1.7 KB

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