ArchiveEditorSystemComponent.cpp 2.3 KB

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