1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- // {BEGIN_LICENSE}
- /*
- * Copyright (c) Contributors to the Open 3D Engine Project.
- * For complete copyright and license terms please see the LICENSE at the root of this distribution.
- *
- * SPDX-License-Identifier: Apache-2.0 OR MIT
- *
- */
- // {END_LICENSE}
- #include <AzCore/Serialization/SerializeContext.h>
- #include "${Name}EditorSystemComponent.h"
- #include <${Name}/${Name}TypeIds.h>
- namespace ${SanitizedCppName}
- {
- AZ_COMPONENT_IMPL(${SanitizedCppName}EditorSystemComponent, "${SanitizedCppName}EditorSystemComponent",
- ${SanitizedCppName}EditorSystemComponentTypeId);
- void ${SanitizedCppName}EditorSystemComponent::Reflect(AZ::ReflectContext* context)
- {
- if (auto serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
- {
- serializeContext->Class<${SanitizedCppName}EditorSystemComponent, AZ::Component>();
- }
- }
- ${SanitizedCppName}EditorSystemComponent::${SanitizedCppName}EditorSystemComponent()
- {
- if (${SanitizedCppName}Interface::Get() == nullptr)
- {
- ${SanitizedCppName}Interface::Register(this);
- }
- }
- ${SanitizedCppName}EditorSystemComponent::~${SanitizedCppName}EditorSystemComponent()
- {
- if (${SanitizedCppName}Interface::Get() == this)
- {
- ${SanitizedCppName}Interface::Unregister(this);
- }
- }
- void ${SanitizedCppName}EditorSystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided)
- {
- provided.push_back(AZ_CRC_CE("${SanitizedCppName}EditorService"));
- }
- void ${SanitizedCppName}EditorSystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible)
- {
- incompatible.push_back(AZ_CRC_CE("${SanitizedCppName}EditorService"));
- }
- void ${SanitizedCppName}EditorSystemComponent::GetRequiredServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& required)
- {
- }
- void ${SanitizedCppName}EditorSystemComponent::GetDependentServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& dependent)
- {
- }
- void ${SanitizedCppName}EditorSystemComponent::Activate()
- {
- ${SanitizedCppName}RequestBus::Handler::BusConnect();
- }
- void ${SanitizedCppName}EditorSystemComponent::Deactivate()
- {
- ${SanitizedCppName}RequestBus::Handler::BusDisconnect();
- }
- } // namespace ${SanitizedCppName}
|