BuilderConfigurationBus.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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/EBus/EBus.h>
  10. #include <AzCore/std/string/string.h>
  11. #include <AssetBuilderSDK/AssetBuilderSDK.h>
  12. namespace AssetProcessor
  13. {
  14. class BuilderConfigurationRequests
  15. : public AZ::EBusTraits
  16. {
  17. public:
  18. static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single;
  19. static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single;
  20. using MutexType = AZStd::recursive_mutex;
  21. virtual ~BuilderConfigurationRequests() = default;
  22. //! Load configuration data from a specific BuilderConfig.ini file
  23. virtual bool LoadConfiguration(const AZStd::string& /*configFile*/) { return false; }
  24. //! Update a job descriptor given the configuration data which has been loaded
  25. virtual bool UpdateJobDescriptor(const AZStd::string& /*jobKey*/, AssetBuilderSDK::JobDescriptor& /*jobDesc*/) { return false; }
  26. //! Update a builder desc given configuration data
  27. virtual bool UpdateBuilderDescriptor(const AZStd::string& /*builderName*/, AssetBuilderSDK::AssetBuilderDesc& /*jobDesc*/) { return false; }
  28. };
  29. using BuilderConfigurationRequestBus = AZ::EBus<BuilderConfigurationRequests>;
  30. } // namespace AssetProcessor