AssetBuilderApplication.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. #pragma once
  9. #include <AzCore/std/string/string.h>
  10. #include <AssetBuilderSDK/AssetBuilderBusses.h>
  11. #include <AssetBuilderSDK/AssetBuilderSDK.h>
  12. #include <AzToolsFramework/Application/ToolsApplication.h>
  13. #include "AssetBuilderInfo.h"
  14. #include <QCoreApplication>
  15. struct IBuilderApplication
  16. {
  17. AZ_RTTI(IBuilderApplication, "{FEDD188E-D5FF-4852-B945-F82F7CC1CA5F}");
  18. IBuilderApplication() = default;
  19. virtual ~IBuilderApplication() = default;
  20. virtual void InitializeBuilderComponents() = 0;
  21. AZ_DISABLE_COPY_MOVE(IBuilderApplication);
  22. };
  23. class AssetBuilderApplication
  24. : public AzToolsFramework::ToolsApplication
  25. , public IBuilderApplication
  26. {
  27. public:
  28. AZ_CLASS_ALLOCATOR(AssetBuilderApplication, AZ::SystemAllocator)
  29. AssetBuilderApplication(int* argc, char*** argv);
  30. AssetBuilderApplication(int* argc, char*** argv, AZ::ComponentApplicationSettings componentAppSettings);
  31. ~AssetBuilderApplication();
  32. AZ::ComponentTypeList GetRequiredSystemComponents() const override;
  33. void RegisterCoreComponents() override;
  34. void StartCommon(AZ::Entity* systemEntity) override;
  35. bool IsInDebugMode() const;
  36. void InitializeBuilderComponents() override;
  37. private:
  38. void InstallCtrlHandler();
  39. QCoreApplication m_qtApplication;
  40. };