Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
 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);
             }
         }
     }
 }
Exemplo n.º 3
0
 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);
             }
         }
     }
 }