ROS2EditorClockSystemComponent.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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 <Clock/ROS2ClockSystemComponent.h>
  12. namespace ROS2
  13. {
  14. /// System component for ROS2 editor
  15. class ROS2EditorClockSystemComponent
  16. : public ROS2ClockSystemComponent
  17. , protected AzToolsFramework::EditorEvents::Bus::Handler
  18. , private AzToolsFramework::EditorEntityContextNotificationBus::Handler
  19. {
  20. using BaseSystemComponent = ROS2ClockSystemComponent;
  21. public:
  22. AZ_COMPONENT_DECL(ROS2EditorClockSystemComponent);
  23. static void Reflect(AZ::ReflectContext* context);
  24. ROS2EditorClockSystemComponent() = default;
  25. ~ROS2EditorClockSystemComponent() override = default;
  26. private:
  27. static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided);
  28. static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible);
  29. //////////////////////////////////////////////////////////////////////////
  30. // AZ::Component overrides
  31. void Activate() override;
  32. void Deactivate() override;
  33. //////////////////////////////////////////////////////////////////////////
  34. //////////////////////////////////////////////////////////////////////////
  35. // EditorEntityContextNotificationBus overrides
  36. void OnStartPlayInEditorBegin() override;
  37. void OnStopPlayInEditor() override;
  38. //////////////////////////////////////////////////////////////////////////
  39. };
  40. } // namespace ROS2