Ejemplo n.º 1
0
        private void GatherItems()
        {
            var structs = session.GetStructs();

            for (var i = 0; i < structs.Count; i++)
            {
                var st = new Item {
                    kind = Item.Kind.Struct, index = i
                };
                var sth = new Item {
                    kind = Item.Kind.StructHeader, index = i
                };
                itemGraph.AddNode(st);
                itemGraph.AddNode(sth);
                itemStructs.Add(st);
                itemStructHeaders.Add(sth);
            }

            var functs = session.GetFuncts();

            for (var i = 0; i < functs.Count; i++)
            {
                var fn = new Item {
                    kind = Item.Kind.Funct, index = i
                };
                var fnh = new Item {
                    kind = Item.Kind.FunctHeader, index = i
                };
                itemGraph.AddNode(fn);
                itemGraph.AddNode(fnh);
                itemFuncts.Add(fn);
                itemFunctHeaders.Add(fnh);
            }
        }