GeoreferencingEditorModule.cpp 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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 "GeoreferenceLevelEditorComponent.h"
  9. #include "GeoreferencingEditorSystemComponent.h"
  10. #include <Georeferencing/GeoreferencingTypeIds.h>
  11. #include <GeoreferencingModuleInterface.h>
  12. namespace Georeferencing
  13. {
  14. class GeoreferencingEditorModule : public GeoreferencingModuleInterface
  15. {
  16. public:
  17. AZ_RTTI(GeoreferencingEditorModule, GeoreferencingEditorModuleTypeId, GeoreferencingModuleInterface);
  18. AZ_CLASS_ALLOCATOR(GeoreferencingEditorModule, AZ::SystemAllocator);
  19. GeoreferencingEditorModule()
  20. {
  21. // Push results of [MyComponent]::CreateDescriptor() into m_descriptors here.
  22. // Add ALL components descriptors associated with this gem to m_descriptors.
  23. // This will associate the AzTypeInfo information for the components with the the SerializeContext, BehaviorContext and
  24. // EditContext. This happens through the [MyComponent]::Reflect() function.
  25. m_descriptors.insert(
  26. m_descriptors.end(),
  27. {
  28. GeoreferencingEditorSystemComponent::CreateDescriptor(),
  29. GeoReferenceLevelEditorComponent::CreateDescriptor(),
  30. });
  31. }
  32. /**
  33. * Add required SystemComponents to the SystemEntity.
  34. * Non-SystemComponents should not be added here
  35. */
  36. AZ::ComponentTypeList GetRequiredSystemComponents() const override
  37. {
  38. return AZ::ComponentTypeList{
  39. azrtti_typeid<GeoreferencingEditorSystemComponent>(),
  40. };
  41. }
  42. };
  43. } // namespace Georeferencing
  44. #if defined(O3DE_GEM_NAME)
  45. AZ_DECLARE_MODULE_CLASS(AZ_JOIN(Gem_, O3DE_GEM_NAME, _Editor), Georeferencing::GeoreferencingEditorModule)
  46. #else
  47. AZ_DECLARE_MODULE_CLASS(Gem_Georeferencing_Editor, Georeferencing::GeoreferencingEditorModule)
  48. #endif