SimulationInterfacesROS2EditorSystemComponent.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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/SimulationInterfacesROS2SystemComponent.h>
  12. #include <ROS2/ROS2Bus.h>
  13. namespace SimulationInterfacesROS2
  14. {
  15. /// System component for SimulationInterfacesROS2 editor
  16. class SimulationInterfacesROS2EditorSystemComponent
  17. : public SimulationInterfacesROS2SystemComponent
  18. , protected AzToolsFramework::EditorEvents::Bus::Handler
  19. {
  20. using BaseSystemComponent = SimulationInterfacesROS2SystemComponent;
  21. public:
  22. AZ_COMPONENT_DECL(SimulationInterfacesROS2EditorSystemComponent);
  23. static void Reflect(AZ::ReflectContext* context);
  24. SimulationInterfacesROS2EditorSystemComponent();
  25. ~SimulationInterfacesROS2EditorSystemComponent();
  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. // AZ::Component
  32. void Activate() override;
  33. void Deactivate() override;
  34. bool m_systemComponentActivated = false;
  35. ROS2::ROS2Requests::NodeChangedEvent::Handler m_nodeHandler;
  36. };
  37. } // namespace SimulationInterfacesROS2