/* * 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 * */ #pragma once #include #include namespace TestAssetBuilder { //! TestIntermediateAssetBuilderComponent handles the lifecycle of the builder. class TestIntermediateAssetBuilderComponent : public AZ::Component, public AssetBuilderSDK::AssetBuilderCommandBus::MultiHandler { public: AZ_COMPONENT(TestIntermediateAssetBuilderComponent, "{2D40D55D-7D31-4972-AFA3-1C396D0BEAC1}"); void Init() override; void Activate() override; void Deactivate() override; static void Reflect(AZ::ReflectContext* context); static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided); static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible); static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required); static void GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& dependent); //! Asset Builder Callback Functions void CreateJobsStage1(const AssetBuilderSDK::CreateJobsRequest& request, AssetBuilderSDK::CreateJobsResponse& response); void ProcessJobStage1(const AssetBuilderSDK::ProcessJobRequest& request, AssetBuilderSDK::ProcessJobResponse& response); void CreateJobsStage2(const AssetBuilderSDK::CreateJobsRequest& request, AssetBuilderSDK::CreateJobsResponse& response); void ProcessJobStage2(const AssetBuilderSDK::ProcessJobRequest& request, AssetBuilderSDK::ProcessJobResponse& response); void CreateJobsStage3(const AssetBuilderSDK::CreateJobsRequest& request, AssetBuilderSDK::CreateJobsResponse& response); void ProcessJobStage3(const AssetBuilderSDK::ProcessJobRequest& request, AssetBuilderSDK::ProcessJobResponse& response); ////////////////////////////////////////////////////////////////////////// //!AssetBuilderSDK::AssetBuilderCommandBus interface void ShutDown() override; // if you get this you must fail all existing jobs and return. ////////////////////////////////////////////////////////////////////////// private: bool m_isShuttingDown = false; }; } // namespace TestAssetBuilder