예제 #1
0
        public static List <VTableComponent> GatherVTableMethodEntries(VTableLayout layout)
        {
            var entries = new List <VTableComponent>();

            foreach (var component in layout.Components)
            {
                if (component.Kind == VTableComponentKind.CompleteDtorPointer)
                {
                    continue;
                }

                if (component.Kind == VTableComponentKind.RTTI)
                {
                    continue;
                }

                if (component.Kind == VTableComponentKind.UnusedFunctionPointer)
                {
                    continue;
                }

                if (component.Method != null)
                {
                    entries.Add(component);
                }
            }

            return(entries);
        }
예제 #2
0
        AST.VTableLayout VisitVTableLayout(VTableLayout layout)
        {
            var _layout = new AST.VTableLayout();

            for (uint i = 0; i < layout.ComponentsCount; ++i)
            {
                var component  = layout.getComponents(i);
                var _component = VisitVTableComponent(component);
                _layout.Components.Add(_component);
            }

            return(_layout);
        }
예제 #3
0
파일: VTables.cs 프로젝트: daxiazh/CppSharp
        private static List<VTableComponent> GatherVTableMethodEntries(VTableLayout layout)
        {
            var entries = new List<VTableComponent>();
            if (layout == null)
                return entries;

            entries.AddRange(from component in layout.Components
                             where component.Kind != VTableComponentKind.CompleteDtorPointer &&
                                   component.Kind != VTableComponentKind.RTTI &&
                                   component.Kind != VTableComponentKind.UnusedFunctionPointer &&
                                   component.Method != null
                             select component);

            return entries;
        }
예제 #4
0
        private static List <VTableComponent> GatherVTableMethodEntries(VTableLayout layout)
        {
            var entries = new List <VTableComponent>();

            if (layout == null)
            {
                return(entries);
            }

            entries.AddRange(from component in layout.Components
                             where component.Kind != VTableComponentKind.CompleteDtorPointer &&
                             component.Kind != VTableComponentKind.RTTI &&
                             component.Kind != VTableComponentKind.UnusedFunctionPointer &&
                             component.Method != null
                             select component);

            return(entries);
        }
예제 #5
0
 public ClassLayout(ClassLayout classLayout)
     : this()
 {
     ABI             = classLayout.ABI;
     HasOwnVFPtr     = classLayout.HasOwnVFPtr;
     VBPtrOffset     = classLayout.VBPtrOffset;
     PrimaryBase     = classLayout.PrimaryBase;
     HasVirtualBases = classLayout.HasVirtualBases;
     Alignment       = classLayout.Alignment;
     Size            = classLayout.Size;
     DataSize        = classLayout.DataSize;
     VFTables.AddRange(classLayout.VFTables);
     if (classLayout.Layout != null)
     {
         Layout = new VTableLayout();
         Layout.Components.AddRange(classLayout.Layout.Components);
     }
 }
예제 #6
0
 public static int GetVTableComponentIndex(VTableLayout layout, VTableComponent entry)
 {
     return(layout.Components.IndexOf(entry));
 }
예제 #7
0
 public ClassLayout(ClassLayout classLayout)
     : this()
 {
     ABI = classLayout.ABI;
     HasOwnVFPtr = classLayout.HasOwnVFPtr;
     VBPtrOffset = classLayout.VBPtrOffset;
     PrimaryBase = classLayout.PrimaryBase;
     HasVirtualBases = classLayout.HasVirtualBases;
     Alignment = classLayout.Alignment;
     Size = classLayout.Size;
     DataSize = classLayout.DataSize;
     VFTables.AddRange(classLayout.VFTables);
     if (classLayout.Layout != null)
     {
         Layout = new VTableLayout();
         Layout.Components.AddRange(classLayout.Layout.Components);
     }
 }
예제 #8
0
파일: VTables.cs 프로젝트: jijamw/CppSharp
 public static int GetVTableComponentIndex(VTableLayout layout, VTableComponent entry)
 {
     return layout.Components.IndexOf(entry);
 }