MachineLearningEditorModule.cpp 1.9 KB

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