/* * All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or * its licensors. * * For complete copyright and license terms please see the LICENSE at the root of this * distribution (the "License"). All use of this software is governed by the License, * or, if provided, by the license below or the license accompanying this file. Do not * remove or modify any license notices. This file is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * */ #pragma once #include #include #include namespace AZ { namespace Data { struct AssetId; } } namespace AssetProcessor { class SpecializedDependencyScanner; /// Tracks additional information about a potential dependency, such as /// what string in the file is associated with the dependency, and what scanner. class PotentialDependencyMetaData { public: PotentialDependencyMetaData() { } PotentialDependencyMetaData( AZStd::string sourceString, AZStd::shared_ptr scanner) : m_sourceString(sourceString), m_scanner(scanner) { } // Needed to store these in a sorted container, which is used to guarantee // logs show up in the same order for every sacn. bool operator<(const PotentialDependencyMetaData& rhs) const { return m_sourceString < rhs.m_sourceString; } /// The portion of the scanned file that matches the missing dependency. AZStd::string m_sourceString; /// Which scanner found this dependency. AZStd::shared_ptr m_scanner; }; /// Stores the collections of potential product dependencies found in a file. class PotentialDependencies { public: AZStd::set m_paths; // Using a map instead of a multimap to avoid polluting the results with the // same missing dependency. If a file references the same potential dependency // more than once, then only one result will be available. AZStd::map m_uuids; AZStd::map m_assetIds; }; }