[LYN-7520] Wildcard Source Dependencies include files in cache/excluded files (#5349)
* Add folder exclusion for wildcard source dependencies Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com> * Exclude ignored files. Add unit tests Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com> * Add handling for ignored folders being added/removed Add unit tests Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com> * Add ExcludedFolderCacheInterface to cmake Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com> * Fix include Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com> * Add error message Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com> * Cleanup includes Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com> * Revert traits include Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com> * Fix missing include, minor cleanup Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com> * Add missing includes Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
#include <QSet>
|
||||
#include <QFileInfo>
|
||||
#include <AzCore/Interface/Interface.h>
|
||||
#include <AzCore/EBus/Event.h>
|
||||
|
||||
namespace AssetProcessor
|
||||
{
|
||||
@@ -51,10 +52,11 @@ namespace AssetProcessor
|
||||
/// Convenience function to check if a file or directory exists.
|
||||
virtual bool Exists(const QString& absolutePath) const = 0;
|
||||
virtual bool GetHash(const QString& absolutePath, FileHash* foundHash) = 0;
|
||||
virtual void RegisterForDeleteEvent(AZ::Event<FileStateInfo>::Handler& handler) = 0;
|
||||
|
||||
AZ_DISABLE_COPY_MOVE(IFileStateRequests);
|
||||
};
|
||||
|
||||
|
||||
class FileStateBase
|
||||
: public IFileStateRequests
|
||||
{
|
||||
@@ -89,11 +91,11 @@ namespace AssetProcessor
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
// FileStateRequestBus implementation
|
||||
bool GetFileInfo(const QString& absolutePath, FileStateInfo* foundFileInfo) const override;
|
||||
bool Exists(const QString& absolutePath) const override;
|
||||
bool GetHash(const QString& absolutePath, FileHash* foundHash) override;
|
||||
void RegisterForDeleteEvent(AZ::Event<FileStateInfo>::Handler& handler) override;
|
||||
|
||||
void AddInfoSet(QSet<AssetFileInfo> infoSet) override;
|
||||
void AddFile(const QString& absolutePath) override;
|
||||
@@ -116,9 +118,11 @@ namespace AssetProcessor
|
||||
|
||||
mutable AZStd::recursive_mutex m_mapMutex;
|
||||
QHash<QString, FileStateInfo> m_fileInfoMap;
|
||||
|
||||
|
||||
QHash<QString, FileHash> m_fileHashMap;
|
||||
|
||||
AZ::Event<FileStateInfo> m_deleteEvent;
|
||||
|
||||
using LockGuardType = AZStd::lock_guard<decltype(m_mapMutex)>;
|
||||
};
|
||||
|
||||
@@ -131,5 +135,10 @@ namespace AssetProcessor
|
||||
bool GetFileInfo(const QString& absolutePath, FileStateInfo* foundFileInfo) const override;
|
||||
bool Exists(const QString& absolutePath) const override;
|
||||
bool GetHash(const QString& absolutePath, FileHash* foundHash) override;
|
||||
void RegisterForDeleteEvent(AZ::Event<FileStateInfo>::Handler& handler) override;
|
||||
|
||||
void SignalDeleteEvent(const QString& absolutePath) const;
|
||||
protected:
|
||||
AZ::Event<FileStateInfo> m_deleteEvent;
|
||||
};
|
||||
} // namespace AssetProcessor
|
||||
|
||||
Reference in New Issue
Block a user