public ulong ComputeTotalPadding(SymbolAnalyzer symbolAnalyzer) { if (TotalPadding.HasValue) { return(TotalPadding.Value); } TotalPadding = (ulong)((long)Padding + Members.Sum(info => { if (info.AlignWithPrevious) { return(0); } if (info.Category == SymbolMemberInfo.MemberCategory.Member) { return(0); } if (info.TypeName == Name) { return(0); // avoid infinite loops } var referencedInfo = symbolAnalyzer.FindSymbolInfo(info.TypeName); if (referencedInfo == null) { return(0); } return((long)referencedInfo.ComputeTotalPadding(symbolAnalyzer)); })); return(TotalPadding.Value); }
public void UpdateTotalCount(SymbolAnalyzer symbolAnalyzer, ulong count) { foreach (var member in Members) { if (member.Category != SymbolMemberInfo.MemberCategory.VTable) { var referencedInfo = symbolAnalyzer.FindSymbolInfo(member.TypeName); if (referencedInfo != null) { referencedInfo.TotalCount += count; referencedInfo.UpdateTotalCount(symbolAnalyzer, count); } } } }
public void UpdateBaseClass(SymbolAnalyzer symbolAnalyzer) { foreach (var member in Members) { if (member.Category == SymbolMemberInfo.MemberCategory.Base) { var referencedInfo = symbolAnalyzer.FindSymbolInfo(member.Name); if (referencedInfo != null) { if (referencedInfo.DerivedClasses == null) { referencedInfo.DerivedClasses = new List <SymbolInfo>(); } referencedInfo.DerivedClasses.Add(this); } } } }