Beispiel #1
0
            OutputConnectionCacheWalker(TraversalCache cache, int slotIndex, TOutputPort port, TraversalCache.Hierarchy hierarchy, bool traverseAllPorts)
            {
                m_Cache = cache;

                m_SlotIndex        = slotIndex;
                m_Port             = port;
                m_CurrentIndex     = -1;
                m_TraverseAllPorts = traverseAllPorts;
                m_Mask             = cache.GetMask(hierarchy);

                var slot            = m_Cache.OrderedTraversal[slotIndex];
                var count           = 0;
                var childTableIndex = slot.ChildTableIndex;

                for (var i = 0; i < slot.ChildCount; i++)
                {
                    var cacheConn = m_Cache.ChildTable[childTableIndex + i];
                    if ((m_TraverseAllPorts || cacheConn.OutputPort.Equals(m_Port)) &&
                        (cacheConn.TraversalFlags & m_Mask) != 0)
                    {
                        count++;
                    }
                }

                Count = count;
            }
Beispiel #2
0
 public OutputConnectionCacheWalker GetChildConnectionsByPort(TOutputPort port, TraversalCache.Hierarchy hierarchy = TraversalCache.Hierarchy.Traversal)
 => new OutputConnectionCacheWalker(m_Cache, m_SlotIndex, port, hierarchy);
Beispiel #3
0
 public OutputVertexCacheWalker GetChildrenByPort(TOutputPort port, TraversalCache.Hierarchy hierarchy = TraversalCache.Hierarchy.Traversal)
 => new OutputVertexCacheWalker(m_Cache, m_SlotIndex, port, hierarchy);
Beispiel #4
0
 internal OutputConnectionCacheWalker(TraversalCache cache, int slotIndex, TOutputPort port, TraversalCache.Hierarchy hierarchy)
     : this(cache, slotIndex, port, hierarchy, false)
 {
 }