ROS2EditorSystemComponent.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. #pragma once
  9. #include <AzToolsFramework/API/ToolsApplicationAPI.h>
  10. #include <AzToolsFramework/Entity/EditorEntityContextBus.h>
  11. #include <Clients/ROS2SystemComponent.h>
  12. namespace ROS2
  13. {
  14. /// System component for ROS2 editor
  15. class ROS2EditorSystemComponent
  16. : public ROS2SystemComponent
  17. , protected AzToolsFramework::EditorEvents::Bus::Handler
  18. , private AzToolsFramework::EditorEntityContextNotificationBus::Handler
  19. {
  20. using BaseSystemComponent = ROS2SystemComponent;
  21. public:
  22. AZ_COMPONENT_DECL(ROS2EditorSystemComponent);
  23. static void Reflect(AZ::ReflectContext* context);
  24. ROS2EditorSystemComponent();
  25. ~ROS2EditorSystemComponent();
  26. private:
  27. static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided);
  28. static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible);
  29. static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required);
  30. static void GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& dependent);
  31. //////////////////////////////////////////////////////////////////////////
  32. // AZ::Component overrides
  33. void Activate() override;
  34. void Deactivate() override;
  35. //////////////////////////////////////////////////////////////////////////
  36. //////////////////////////////////////////////////////////////////////////
  37. // EditorEntityContextNotificationBus overrides
  38. void OnStartPlayInEditorBegin() override;
  39. void OnStopPlayInEditor() override;
  40. //////////////////////////////////////////////////////////////////////////
  41. };
  42. } // namespace ROS2