MachineLearningModuleInterface.cpp 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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 "MachineLearningModuleInterface.h"
  9. #include <AzCore/Memory/Memory.h>
  10. #include <MachineLearning/MachineLearningTypeIds.h>
  11. #include <MachineLearningSystemComponent.h>
  12. #include <Components/MultilayerPerceptronComponent.h>
  13. namespace MachineLearning
  14. {
  15. AZ_TYPE_INFO_WITH_NAME_IMPL(MachineLearningModuleInterface, "MachineLearningModuleInterface", MachineLearningModuleInterfaceTypeId);
  16. AZ_RTTI_NO_TYPE_INFO_IMPL(MachineLearningModuleInterface, AZ::Module);
  17. AZ_CLASS_ALLOCATOR_IMPL(MachineLearningModuleInterface, AZ::SystemAllocator);
  18. MachineLearningModuleInterface::MachineLearningModuleInterface()
  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. MachineLearningSystemComponent::CreateDescriptor(),
  26. MultilayerPerceptronComponent::CreateDescriptor()
  27. });
  28. }
  29. AZ::ComponentTypeList MachineLearningModuleInterface::GetRequiredSystemComponents() const
  30. {
  31. return AZ::ComponentTypeList{
  32. azrtti_typeid<MachineLearningSystemComponent>(),
  33. };
  34. }
  35. } // namespace MachineLearning