Classes | |
struct | ComparisonData |
Public Types | |
enum class | ComparisonType : AZ::u8 { Delta , Union , Intersection , Complement , FilePattern , IntersectionCount , NumPatterns , Default = 255 } |
enum class | FilePatternType : AZ::u8 { Wildcard , Regex , NumPatterns , Default = 255 } |
Public Member Functions | |
AZ_TYPE_INFO (AssetFileInfoListComparison, "{AC003572-3A33-476C-9B2B-ADDA4F7BB870}") | |
AZ_CLASS_ALLOCATOR (AssetFileInfoListComparison, AZ::SystemAllocator) | |
bool | AddComparisonStep (const ComparisonData &comparisonData) |
bool | AddComparisonStep (const ComparisonData &comparisonData, size_t destinationIndex) |
bool | RemoveComparisonStep (size_t index) |
bool | MoveComparisonStep (size_t initialIndex, size_t destinationIndex) |
size_t | GetNumComparisonSteps () const |
AZStd::vector< ComparisonData > | GetComparisonList () const |
bool | SetComparisonType (size_t index, const ComparisonType comparisonType) |
bool | SetFilePatternType (size_t index, const FilePatternType filePatternType) |
bool | SetFilePattern (size_t index, const AZStd::string &filePattern) |
bool | SetFirstInput (size_t index, const AZStd::string &firstInput) |
bool | SetSecondInput (size_t index, const AZStd::string &secondInput) |
bool | SetOutput (size_t index, const AZStd::string &output) |
bool | SetCachedFirstInputPath (size_t index, const AZStd::string &firstInputPath) |
bool | SetCachedSecondInputPath (size_t index, const AZStd::string &secondInputPath) |
bool | Save (const AZStd::string &destinationFilePath) const |
This can be used to serialize the AssetFileInfoListComparison to the destination file path. | |
AZ::Outcome< AssetFileInfoList, AZStd::string > | Compare (const AZStd::vector< AZStd::string > &intersectionCountAssetListFiles={}) |
Runs all Comparison Steps and returns an AssetFileInfoList. | |
AZ::Outcome< void, AZStd::string > | CompareAndSaveResults (const AZStd::vector< AZStd::string > &intersectionCountAssetListFiles={}) |
Runs all Comparison Steps and saves all assetFileInfoList results to the destination paths stored with each Comparison Step. | |
AZ::Outcome< void, AZStd::string > | SaveResults () const |
Saves all previously completed comparisons to disk if output is a file path. | |
AZStd::vector< AZStd::string > | GetDestructiveOverwriteFilePaths () |
Get the absolute paths of any files marked for save that currently exist on disk. | |
AssetFileInfoList | GetComparisonResults (const AZStd::string &comparisonKey) |
Static Public Member Functions | |
static void | Reflect (AZ::ReflectContext *context) |
static void | FormatOutputToken (AZStd::string &tokenName) |
static AZ::Outcome< AssetFileInfoListComparison, AZStd::string > | Load (const AZStd::string &filePath) |
Loads the assetFileInfoListComparison file from the file path. | |
static bool | IsTokenFile (const AZStd::string &filePath) |
Determine whether the file is a token file or not. | |
static bool | IsOutputPath (const AZStd::string &filePath) |
Tests whether the path is non empty and not a token path (Is a theoretically writable output - doesn't test writeable status) | |
static const char * | GetComparisonRulesFileExtension () |
static const char * | GetComparisonTypeName (ComparisonType comparisonType) |
static const char * | GetFilePatternTypeName (FilePatternType filePatternType) |
static const char | GetTokenIdentifier () |
Static Public Attributes | |
static const char * | ComparisonTypeNames [aznumeric_cast< int >(ComparisonType::NumPatterns)] |
static const char * | FilePatternTypeNames [aznumeric_cast< int >(FilePatternType::NumPatterns)] |
Protected Member Functions | |
AssetFileInfoList | Delta (const AssetFileInfoList &firstAssetFileInfoList, const AssetFileInfoList &secondAssetFileInfoList) const |
AssetFileInfoList | Union (const AssetFileInfoList &firstAssetFileInfoList, const AssetFileInfoList &secondAssetFileInfoList) const |
AssetFileInfoList | Intersection (const AssetFileInfoList &firstAssetFileInfoList, const AssetFileInfoList &secondAssetFileInfoList) const |
AssetFileInfoList | Complement (const AssetFileInfoList &firstAssetFileInfoList, const AssetFileInfoList &secondAssetFileInfoList) const |
AZ::Outcome< AssetFileInfoList, AZStd::string > | FilePattern (const AssetFileInfoList &assetFileInfoList, const ComparisonData &comparisonData) const |
AZ::Outcome< AssetFileInfoList, AZStd::string > | IntersectionCount (const AZStd::vector< AZStd::string > &assetFileInfoPathList) const |
AZ::Outcome< AssetFileInfoList, AZStd::string > | PopulateAssetFileInfo (const AZStd::string &assetFileInfoPath) const |
Protected Attributes | |
AZStd::vector< ComparisonData > | m_comparisonDataList |
AZStd::unordered_map< AZStd::string, AssetFileInfoList > | m_assetFileInfoMap |
|
strong |
Enumerator | |
---|---|
Delta | Given two AssetFileInfoLists A and B, creates a new AssetFileInfoList C such that assets in it are either because they are present in B but not in A or because their file hash has changed between A and B. |
Union | Given two AssetFileInfoLists A and B, creates a new AssetFileInfoList C such that it contains all the assets present in A and B. If the asset is contained in both A and B, it will have B's information. |
Intersection | Given two AssetFileInfoLists A and B, creates a new AssetFileInfoList C such that it contains only the assets that are present in both A and B. It is not necessary that all the information of assets should match between A and B, we are only checking the assetId and the asset will have B's information. |
Complement | Given two AssetFileInfoLists A and B, creates a new AssetFileInfoList C such that it contains all the assets that are present in B but not in A. It is not necessary that all the information of assets should match in A and B, we are only checking by assetId. |
FilePattern | Given an AssetFileInfoList A, creates a new AssetFileInfoList C based on pattern matching. Pattern matching can be either wildcard or regex. |
IntersectionCount | Given a list of AssetFileInfoLists like A, B, C.. and a count N, creates a new AssetFileInfoList D such that it contains only those assets that are present at least N times in the list of input AssetFileInfoLists provided. |
NumPatterns | New types go above NumPatterns- if you add one be sure to add it to ComparisonTypeNames as well. |
|
strong |