3
0

ProfilerModule.cpp 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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 <ProfilerSystemComponent.h>
  9. #include <AzCore/Memory/SystemAllocator.h>
  10. #include <AzCore/Module/Module.h>
  11. namespace Profiler
  12. {
  13. class ProfilerModule
  14. : public AZ::Module
  15. {
  16. public:
  17. AZ_RTTI(ProfilerModule, "{4A286414-B387-4D20-9A7E-2F792755B769}", AZ::Module);
  18. AZ_CLASS_ALLOCATOR(ProfilerModule, AZ::SystemAllocator);
  19. ProfilerModule()
  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 EditContext.
  24. // This happens through the [MyComponent]::Reflect() function.
  25. m_descriptors.insert(m_descriptors.end(), {
  26. ProfilerSystemComponent::CreateDescriptor(),
  27. });
  28. }
  29. /**
  30. * Add required SystemComponents to the SystemEntity.
  31. */
  32. AZ::ComponentTypeList GetRequiredSystemComponents() const override
  33. {
  34. return AZ::ComponentTypeList{
  35. azrtti_typeid<ProfilerSystemComponent>(),
  36. };
  37. }
  38. };
  39. }// namespace Profiler
  40. AZ_DECLARE_MODULE_CLASS(Gem_Profiler, Profiler::ProfilerModule)