Ejemplo n.º 1
0
        static public void Process()
        {
            DelayedObjectMan pDelayMan = DelayedObjectMan.PrivGetInstance();

            ColObserver pNode = pDelayMan.head;

            while (pNode != null)
            {
                // Fire off listener
                pNode.Execute();

                pNode = (ColObserver)pNode.pNext;
            }


            // remove
            pNode = pDelayMan.head;
            ColObserver pTmp = null;

            while (pNode != null)
            {
                pTmp  = pNode;
                pNode = (ColObserver)pNode.pNext;

                // remove
                pDelayMan.PrivDetach(pTmp, ref pDelayMan.head);
            }
        }
Ejemplo n.º 2
0
        static public void Process()
        {
            DelayedObjectMan pDelayMan = DelayedObjectMan.PrivGetInstance();

            ColObserver pNode = pDelayMan.head;

            while (pNode != null)
            {
                pNode.Execute();

                pNode = (ColObserver)pNode.pNext;
            }

            pNode = pDelayMan.head;
            ColObserver pTemp = null;

            while (pNode != null)
            {
                pTemp = pNode;

                pNode = (ColObserver)pNode.pNext;

                //this might have been my issue with my timermanager references
                pDelayMan.PrivDetach(pTemp, ref pDelayMan.head);
            }
        }
Ejemplo n.º 3
0
        public static void SetActive(DelayedObjectMan pSBMan)
        {
            DelayedObjectMan pMan = DelayedObjectMan.PrivGetInstance();

            Debug.Assert(pMan != null);

            Debug.Assert(pSBMan != null);
            DelayedObjectMan.pActiveDOMan = pSBMan;
        }
Ejemplo n.º 4
0
        static public void Attach(ColObserver observer)
        {
            // protection
            Debug.Assert(observer != null);

            DelayedObjectMan pDelayMan = DelayedObjectMan.PrivGetInstance();

            // add to front
            if (pDelayMan.head == null)
            {
                pDelayMan.head = observer;
                observer.pNext = null;
                observer.pPrev = null;
            }
            else
            {
                observer.pNext       = pDelayMan.head;
                observer.pPrev       = null;
                pDelayMan.head.pPrev = observer;
                pDelayMan.head       = observer;
            }
        }
Ejemplo n.º 5
0
        //Constructor is towards the bottom of the class body
        static public void Attach(ColObserver observer)
        {
            Debug.Assert(observer != null);

            DelayedObjectMan pDelayMan = DelayedObjectMan.PrivGetInstance();

            //adding to the front
            //first time
            if (pDelayMan.head == null)
            {
                pDelayMan.head = observer;
                observer.pNext = null;
                observer.pPrev = null;
            }

            //every other time
            else
            {
                observer.pNext       = pDelayMan.head;
                observer.pPrev       = null;
                pDelayMan.head.pPrev = observer;
                pDelayMan.head       = observer;
            }
        }
Ejemplo n.º 6
0
        public static void Reset()
        {
            DelayedObjectMan pDelayMan = DelayedObjectMan.PrivGetInstance();

            pDelayMan.head = null;
        }