Beispiel #1
0
 private static void SetChildOwners(IDxfItemInternal item, HashSet <IDxfItemInternal> visitedChildren)
 {
     foreach (var child in item.GetChildItems())
     {
         if (child != null && visitedChildren.Add(child))
         {
             SetOwner(child, item, isWriting: false);
             SetChildOwners(child, visitedChildren);
         }
     }
 }
Beispiel #2
0
 private static void ClearPointers(IDxfItemInternal item, HashSet <IDxfItemInternal> visitedItems)
 {
     if (item != null && visitedItems.Add(item))
     {
         item.Handle = 0u;
         foreach (var child in item.GetChildItems())
         {
             ClearPointers(child, visitedItems);
         }
     }
 }
Beispiel #3
0
        private static void GatherPointers(IDxfItemInternal item, Dictionary <uint, IDxfItemInternal> handleMap, HashSet <IDxfItemInternal> visitedItems)
        {
            if (item != null && visitedItems.Add(item))
            {
                if (item.Handle != 0u)
                {
                    handleMap[item.Handle] = item;
                }

                foreach (var child in item.GetChildItems())
                {
                    GatherPointers(child, handleMap, visitedItems);
                }
            }
        }