public void Notify() { InputObserver pNode = this.pHead; while (pNode != null) { pNode.Notify(); pNode = (InputObserver)pNode.pNext; } }
public void NotifyObservers() { InputObserver curr = this.pObservers; while (curr != null) { curr.Update(); curr = (InputObserver)curr.pONext; } }
public void Notify() { InputObserver pNode = this.head; while (pNode != null) { // Fire off listener pNode.Notify(); pNode = (InputObserver)pNode.pNext; } }
public void notify() { InputObserver pNode = this.pHead; while (pNode != null) { // notify observers pNode.notify(); pNode = (InputObserver)pNode.pNext; } }
public void Notify(float xCurs, float yCurs) { InputObserver pNode = this.head; while (pNode != null) { // Fire off listener pNode.Notify(xCurs, yCurs); pNode = (InputObserver)pNode.pNext; } }
public void attachObserver(InputObserver mObserver) { Debug.Assert(mObserver != null); if (observer == null) { observer = mObserver; observer.pPrev = null; observer.pNext = null; } else { mObserver.pNext = observer; observer.pPrev = observer; observer = mObserver; } }
public void RegisterObserver(InputObserver observer) { Debug.Assert(observer != null); observer.pSubject = this; if (pObservers == null) { pObservers = observer; observer.pONext = null; observer.pOPrev = null; } else { observer.pONext = pObservers; pObservers.pOPrev = observer; pObservers = observer; } }
//------------------------------------------------------------------------------- // Methods //------------------------------------------------------------------------------- public void attach(InputObserver observer) { Debug.Assert(observer != null); observer.pSubject = this; // add to front if (this.pHead == null) { this.pHead = observer; observer.pPrev = null; observer.pNext = null; } else { observer.pPrev = null; observer.pNext = this.pHead; this.pHead.pPrev = observer; this.pHead = observer; } }
public void Attach(InputObserver observer) { // protection Debug.Assert(observer != null); observer.pSubject = this; // add to front if (head == null) { head = observer; observer.pNext = null; observer.pPrev = null; } else { observer.pNext = head; observer.pPrev = null; head.pPrev = observer; head = observer; } }
public void Attach(InputObserver observer) { // protection Debug.Assert(observer != null); observer.pSubject = this; // add to front if (head == null) { head = observer; observer.SetNext(null); observer.SetPrev(null); } else { observer.SetNext(head); observer.SetPrev(null); head.SetPrev(observer); head = observer; } }
public void Attach(InputObserver observer) { Debug.Assert(observer != null); observer.pSubject = this; if (pHead == null) { pHead = observer; observer.pNext = null; observer.pPrev = null; } else { //attaching to the front observer.pNext = pHead; observer.pPrev = null; pHead.pPrev = observer; pHead = observer; } }
public void Attach(InputObserver observer) { // protection Debug.Assert(observer != null); base.baseAttach(observer); }
public void Detach(InputObserver observer) { base.baseDetach(observer); }
// Constructor ------------------------ public InputSubject() { this.head = null; }
public InputSubject() { observer = null; }
public void setObserver(InputObserver mobserver) { this.observer = mobserver; }