ROS2SpawnPointComponent.cpp 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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 "ROS2SpawnPointComponent.h"
  9. #include "Spawner/ROS2SpawnPointComponentController.h"
  10. #include <AzCore/Component/Entity.h>
  11. #include <AzCore/Serialization/EditContext.h>
  12. #include <AzCore/Serialization/EditContextConstants.inl>
  13. #include <AzCore/Serialization/SerializeContext.h>
  14. #include <AzFramework/Components/TransformComponent.h>
  15. namespace ROS2
  16. {
  17. ROS2SpawnPointComponent::ROS2SpawnPointComponent(const ROS2SpawnPointComponentConfig& config)
  18. : ROS2SpawnPointComponentBase(config)
  19. {
  20. }
  21. void ROS2SpawnPointComponent::Activate()
  22. {
  23. ROS2SpawnPointComponentBase::Activate();
  24. }
  25. void ROS2SpawnPointComponent::Deactivate()
  26. {
  27. ROS2SpawnPointComponentBase::Deactivate();
  28. }
  29. void ROS2SpawnPointComponent::Reflect(AZ::ReflectContext* context)
  30. {
  31. ROS2SpawnPointComponentBase::Reflect(context);
  32. if (AZ::SerializeContext* serialize = azrtti_cast<AZ::SerializeContext*>(context))
  33. {
  34. serialize->Class<ROS2SpawnPointComponent, ROS2SpawnPointComponentBase>()->Version(1);
  35. }
  36. }
  37. AZStd::pair<AZStd::string, SpawnPointInfo> ROS2SpawnPointComponent::GetInfo() const
  38. {
  39. return m_controller.GetInfo();
  40. }
  41. } // namespace ROS2