Exemple #1
0
        /// <summary>
        /// Gets everything that this file includes from our cache (direct and indirect!)
        /// </summary>
        /// <param name="AbsoluteFilePath">Path to the file</param>
        /// <returns>The list of includes</returns>
        public List <string> GetDependenciesForFile(string AbsoluteFilePath)
        {
            FlatCPPIncludeDependencyInfo DependencyInfo;

            if (DependencyMap.TryGetValue(AbsoluteFilePath, out DependencyInfo))
            {
                return(DependencyInfo.Includes);
            }

            return(null);
        }
Exemple #2
0
        /// <summary>
        /// Gets everything that this file includes from our cache (direct and indirect!)
        /// </summary>
        /// <param name="AbsoluteFilePath">Path to the file</param>
        /// <returns>The list of includes</returns>
        public List <FileItem> GetDependenciesForFile(string AbsoluteFilePath)
        {
            FlatCPPIncludeDependencyInfo DependencyInfo;

            if (DependencyMap.TryGetValue(AbsoluteFilePath.ToLowerInvariant(), out DependencyInfo))
            {
                // Update our transient cache of FileItems for each of the included files
                if (DependencyInfo.IncludeFileItems == null)
                {
                    DependencyInfo.IncludeFileItems = new List <FileItem>(DependencyInfo.Includes.Count);
                    foreach (string Dependency in DependencyInfo.Includes)
                    {
                        DependencyInfo.IncludeFileItems.Add(FileItem.GetItemByFullPath(Dependency));
                    }
                }
                return(DependencyInfo.IncludeFileItems);
            }

            return(null);
        }