ROS2RobotImporterSystemComponent.cpp 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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 "ROS2RobotImporterSystemComponent.h"
  9. #include <AzCore/Serialization/EditContext.h>
  10. #include <AzCore/Serialization/EditContextConstants.inl>
  11. #include <AzCore/Serialization/SerializeContext.h>
  12. namespace ROS2
  13. {
  14. void ROS2RobotImporterSystemComponent::Reflect(AZ::ReflectContext* context)
  15. {
  16. if (auto serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
  17. {
  18. serializeContext->Class<ROS2RobotImporterSystemComponent, AZ::Component>()->Version(0);
  19. if (AZ::EditContext* ec = serializeContext->GetEditContext())
  20. {
  21. ec->Class<ROS2RobotImporterSystemComponent>(
  22. "Robot Importer", "Use this component to import robot definition from supported formats")
  23. ->ClassElement(AZ::Edit::ClassElements::EditorData, "")
  24. ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC_CE("System"))
  25. ->Attribute(AZ::Edit::Attributes::Category, "ROS2")
  26. ->Attribute(AZ::Edit::Attributes::AutoExpand, true);
  27. }
  28. }
  29. }
  30. void ROS2RobotImporterSystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided)
  31. {
  32. provided.push_back(AZ_CRC_CE("RobotImporterService"));
  33. }
  34. void ROS2RobotImporterSystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible)
  35. {
  36. incompatible.push_back(AZ_CRC_CE("RobotImporterService"));
  37. }
  38. } // namespace ROS2