ONNXEditorModule.cpp 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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 <ONNXModuleInterface.h>
  9. #include "ONNXEditorSystemComponent.h"
  10. namespace ONNX
  11. {
  12. class ONNXEditorModule
  13. : public ONNXModuleInterface
  14. {
  15. public:
  16. AZ_RTTI(ONNXEditorModule, "{E006F52B-8EC8-4DFE-AB9D-C5EF7A1A8F32}", ONNXModuleInterface);
  17. AZ_CLASS_ALLOCATOR(ONNXEditorModule, AZ::SystemAllocator, 0);
  18. ONNXEditorModule()
  19. {
  20. // Push results of [MyComponent]::CreateDescriptor() into m_descriptors here.
  21. // Add ALL components descriptors associated with this gem to m_descriptors.
  22. // This will associate the AzTypeInfo information for the components with the the SerializeContext, BehaviorContext and EditContext.
  23. // This happens through the [MyComponent]::Reflect() function.
  24. m_descriptors.insert(m_descriptors.end(), {
  25. ONNXEditorSystemComponent::CreateDescriptor(),
  26. });
  27. }
  28. /**
  29. * Add required SystemComponents to the SystemEntity.
  30. * Non-SystemComponents should not be added here
  31. */
  32. AZ::ComponentTypeList GetRequiredSystemComponents() const override
  33. {
  34. return AZ::ComponentTypeList {
  35. azrtti_typeid<ONNXEditorSystemComponent>(),
  36. };
  37. }
  38. };
  39. }// namespace ONNX
  40. AZ_DECLARE_MODULE_CLASS(Gem_ONNX, ONNX::ONNXEditorModule)