MachineLearningSystemComponent.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. #pragma once
  9. #include <AzCore/Component/Component.h>
  10. #include <MachineLearning/IMachineLearning.h>
  11. #include <Assets/ModelAsset.h>
  12. namespace MachineLearning
  13. {
  14. class MachineLearningSystemComponent
  15. : public AZ::Component
  16. , protected MachineLearningRequestBus::Handler
  17. {
  18. public:
  19. AZ_COMPONENT_DECL(MachineLearningSystemComponent);
  20. static void Reflect(AZ::ReflectContext* context);
  21. static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided);
  22. static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible);
  23. static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required);
  24. static void GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& dependent);
  25. MachineLearningSystemComponent();
  26. ~MachineLearningSystemComponent();
  27. protected:
  28. //! AZ::Component interface
  29. //! @{
  30. void Init() override;
  31. void Activate() override;
  32. void Deactivate() override;
  33. //! @}
  34. //! IMachineLearning interface
  35. //! @{
  36. void RegisterModel(INeuralNetworkPtr model) override;
  37. void UnregisterModel(INeuralNetworkPtr model) override;
  38. ModelSet& GetModelSet() override;
  39. //! @}
  40. private:
  41. ModelSet m_registeredModels;
  42. AZStd::unique_ptr<ModelAssetHandler> m_assetHandler;
  43. };
  44. }