MachineLearningEditorSystemComponent.cpp 2.2 KB

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