PythonCoverageSystemComponent.cpp 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #include <PythonCoverageSystemComponent.h>
  2. #include <AzCore/Serialization/SerializeContext.h>
  3. #include <AzCore/Serialization/EditContext.h>
  4. #include <AzCore/Serialization/EditContextConstants.inl>
  5. namespace PythonCoverage
  6. {
  7. void PythonCoverageSystemComponent::Reflect(AZ::ReflectContext* context)
  8. {
  9. if (AZ::SerializeContext* serialize = azrtti_cast<AZ::SerializeContext*>(context))
  10. {
  11. serialize->Class<PythonCoverageSystemComponent, AZ::Component>()
  12. ->Version(0)
  13. ;
  14. if (AZ::EditContext* ec = serialize->GetEditContext())
  15. {
  16. ec->Class<PythonCoverageSystemComponent>("PythonCoverage", "[Description of functionality provided by this System Component]")
  17. ->ClassElement(AZ::Edit::ClassElements::EditorData, "")
  18. ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC("System"))
  19. ->Attribute(AZ::Edit::Attributes::AutoExpand, true)
  20. ;
  21. }
  22. }
  23. }
  24. void PythonCoverageSystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided)
  25. {
  26. provided.push_back(AZ_CRC("PythonCoverageService"));
  27. }
  28. void PythonCoverageSystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible)
  29. {
  30. incompatible.push_back(AZ_CRC("PythonCoverageService"));
  31. }
  32. void PythonCoverageSystemComponent::GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required)
  33. {
  34. AZ_UNUSED(required);
  35. }
  36. void PythonCoverageSystemComponent::GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& dependent)
  37. {
  38. AZ_UNUSED(dependent);
  39. }
  40. void PythonCoverageSystemComponent::Init()
  41. {
  42. }
  43. void PythonCoverageSystemComponent::Activate()
  44. {
  45. PythonCoverageRequestBus::Handler::BusConnect();
  46. AZ::TickBus::Handler::BusConnect();
  47. }
  48. void PythonCoverageSystemComponent::Deactivate()
  49. {
  50. AZ::TickBus::Handler::BusDisconnect();
  51. PythonCoverageRequestBus::Handler::BusDisconnect();
  52. }
  53. void PythonCoverageSystemComponent::OnTick(float /*deltaTime*/, AZ::ScriptTimePoint /*time*/)
  54. {
  55. }
  56. } // namespace PythonCoverage