IPathConversion.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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/RTTI/RTTI.h>
  10. class QString;
  11. namespace AssetProcessor
  12. {
  13. class ScanFolderInfo;
  14. //! Interface for requesting scanfolder/relative path info for a path
  15. struct IPathConversion
  16. {
  17. AZ_RTTI(IPathConversion, "{8838D113-8BC0-4270-BF4D-4DFEAB628102}");
  18. virtual ~IPathConversion() = default;
  19. virtual bool ConvertToRelativePath(QString fullFileName, QString& databaseSourceName, QString& scanFolderName) const = 0;
  20. //! given a full file name (assumed already fed through the normalization funciton), return the first matching scan folder
  21. virtual const AssetProcessor::ScanFolderInfo* GetScanFolderForFile(const QString& fullFileName) const = 0;
  22. virtual const AssetProcessor::ScanFolderInfo* GetScanFolderById(AZ::s64 id) const = 0;
  23. // Get the scan folder ID for the intermediate asset path.
  24. virtual const AZ::s64 GetIntermediateAssetScanFolderId() const
  25. {
  26. return -1;
  27. }
  28. };
  29. }