MachineLearningEditorSystemComponent.cpp 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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 <AzCore/Serialization/SerializeContext.h>
  9. #include "MachineLearningEditorSystemComponent.h"
  10. #include <MachineLearning/MachineLearningTypeIds.h>
  11. namespace MachineLearning
  12. {
  13. AZ_COMPONENT_IMPL(MachineLearningEditorSystemComponent, "MachineLearningEditorSystemComponent",
  14. MachineLearningEditorSystemComponentTypeId, BaseSystemComponent);
  15. void MachineLearningEditorSystemComponent::Reflect(AZ::ReflectContext* context)
  16. {
  17. if (auto serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
  18. {
  19. serializeContext->Class<MachineLearningEditorSystemComponent, MachineLearningSystemComponent>()
  20. ->Version(0);
  21. }
  22. }
  23. MachineLearningEditorSystemComponent::MachineLearningEditorSystemComponent() = default;
  24. MachineLearningEditorSystemComponent::~MachineLearningEditorSystemComponent() = default;
  25. void MachineLearningEditorSystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided)
  26. {
  27. BaseSystemComponent::GetProvidedServices(provided);
  28. provided.push_back(AZ_CRC_CE("MachineLearningEditorService"));
  29. }
  30. void MachineLearningEditorSystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible)
  31. {
  32. BaseSystemComponent::GetIncompatibleServices(incompatible);
  33. incompatible.push_back(AZ_CRC_CE("MachineLearningEditorService"));
  34. }
  35. void MachineLearningEditorSystemComponent::GetRequiredServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& required)
  36. {
  37. BaseSystemComponent::GetRequiredServices(required);
  38. }
  39. void MachineLearningEditorSystemComponent::GetDependentServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& dependent)
  40. {
  41. BaseSystemComponent::GetDependentServices(dependent);
  42. }
  43. void MachineLearningEditorSystemComponent::Activate()
  44. {
  45. MachineLearningSystemComponent::Activate();
  46. AzToolsFramework::EditorEvents::Bus::Handler::BusConnect();
  47. }
  48. void MachineLearningEditorSystemComponent::Deactivate()
  49. {
  50. AzToolsFramework::EditorEvents::Bus::Handler::BusDisconnect();
  51. MachineLearningSystemComponent::Deactivate();
  52. }
  53. } // namespace MachineLearning