Exemple #1
0
        /// <summary>
        ///     Iterate through a list and retrieve it's inqured enum value with instance ID
        /// </summary>
        /// <param name="query"></param>
        /// <param name="id"></param>
        /// <param name="list"></param>
        /// <returns></returns>
        protected ListNode BaseFind(Enum query, uint id, LinkList list)
        {
            ListNode foundNode = null;

            ListNode itr = list.Head;

            while (itr != null)
            {
                if (itr.GetName().Equals(query))
                {
                    if (itr.Id == id)
                    {
                        // Found node
                        foundNode = itr;
                        break;
                    }
                }

                // Next node
                itr = itr.next;
            }

            return(foundNode);
        }
Exemple #2
0
 // Move the given node from one list to another
 private void Move(ListNode node, LinkList fromList, LinkList toList)
 {
     Debug.Assert(ReferenceEquals(fromList, toList) == false);
     node = fromList.Pop(node);
     toList.PushFront(node);
 }
Exemple #3
0
        // Constructor

        /// <summary>
        ///		Make a manager WITHOUT preallocation
        /// </summary>
        protected AbstractManager()
        {
            this.activeList   = new LinkList();
            this.reservedList = new LinkList();
        }