Files
o3de/Gems/LmbrCentral/Code/Source/Builders/LuaBuilder/LuaBuilderWorker.h
T
Steve Pham 38261d0800 Shorten copyright headers by splitting into 2 lines (#2213)
* Updated all copyright headers to split the longer original copyright line into 2 shorter lines

Signed-off-by: Steve Pham <spham@amazon.com>
2021-07-16 15:25:48 -07:00

45 lines
1.8 KiB
C++

/*
* 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 <AzCore/Component/Component.h>
#include <AzCore/Outcome/Outcome.h>
#include <AssetBuilderSDK/AssetBuilderBusses.h>
#include <AssetBuilderSDK/AssetBuilderSDK.h>
namespace LuaBuilder
{
class LuaBuilderWorker
: public AssetBuilderSDK::AssetBuilderCommandBus::Handler
{
public:
AZ_TYPE_INFO(LuaBuilderWorker, "{166A7962-A3E4-4451-AC1A-AAD32E29C52C}");
~LuaBuilderWorker() override = default;
//! Asset Builder Callback Functions
void CreateJobs(const AssetBuilderSDK::CreateJobsRequest& request, AssetBuilderSDK::CreateJobsResponse& response);
void ProcessJob(const AssetBuilderSDK::ProcessJobRequest& request, AssetBuilderSDK::ProcessJobResponse& response);
//////////////////////////////////////////////////////////////////////////
// AssetBuilderSDK::AssetBuilderCommandBus
void ShutDown() override;
//////////////////////////////////////////////////////////////////////////
void ParseDependencies(const AZStd::string& file, AssetBuilderSDK::ProductPathDependencySet& outDependencies);
private:
bool m_isShuttingDown = false;
using JobStepOutcome = AZ::Outcome<AssetBuilderSDK::JobProduct, AssetBuilderSDK::ProcessJobResultCode>;
JobStepOutcome RunCompileJob(const AssetBuilderSDK::ProcessJobRequest& request);
JobStepOutcome RunCopyJob(const AssetBuilderSDK::ProcessJobRequest& request);
JobStepOutcome WriteAssetInfo(const AssetBuilderSDK::ProcessJobRequest& request, AZStd::string_view destFileName, AZStd::string_view debugName, AZ::ScriptContext& scriptContext);
};
}