Go to the documentation of this file.
6#ifndef imod_CModelProxy_included
7#define imod_CModelProxy_included
11#include <QtCore/QVector>
43 void AttachProxyObservers();
44 void DetachProxyObservers();
64 struct PendingObserver
66 PendingObserver(
imod::IObserver* observerPtr =
nullptr,
bool isPending =
false)
67 :m_observerPtr(observerPtr),
68 m_isPending(isPending)
74 return (observerPtr == m_observerPtr);
81 typedef PendingObserver Observer;
82 typedef QVector<Observer> Observers;
84 Observers m_proxyObservers;
85 ModelObserver m_modelObserver;
Implementation of the model proxy.
void SetModelPtr(imod::IModel *modelPtr)
virtual bool IsAttached(const IObserver *observerPtr) const
Returns true if observer observer is attached to this model object.
virtual void DetachObserver(IObserver *observerPtr)
Detaches model object from observer observerPtr.
virtual void DetachAllObservers()
Detaches all attached observers.
virtual bool AttachObserver(IObserver *observerPtr)
Attaches model object to observer observerPtr.
Common interface for model objects, that supports Model/Observer design pattern.
Common interface for all classes implementing the Observer functionality in the Model/Observer design...
Basic implementation for a single model observer with binding to concrete data object interface.
This namespace containes basic implementation of Model/Observer design pattern This package is system...
© Witold Gantzke and Kirill Lepskiy