|
ACF $AcfVersion:0$
|
Common interface for model objects, that supports Model/Observer design pattern. More...
#include <IModel.h>
Public Member Functions | |
| virtual bool | AttachObserver (IObserver *observerPtr)=0 |
Attaches model object to observer observerPtr. | |
| virtual void | DetachObserver (IObserver *observerPtr)=0 |
Detaches model object from observer observerPtr. | |
| virtual void | DetachAllObservers ()=0 |
| Detaches all attached observers. | |
| virtual bool | IsAttached (const IObserver *observerPtr) const =0 |
Returns true if observer observer is attached to this model object. | |
Public Member Functions inherited from istd::IPolymorphic | |
| virtual | ~IPolymorphic () |
Common interface for model objects, that supports Model/Observer design pattern.
|
pure virtual |
Attaches model object to observer observerPtr.
observer will cause an assertion. | observerPtr | observer, cannot be NULL. |
Implemented in imod::CModelBase, and imod::CModelProxy.
Referenced by imod::TSingleModelObserverBase< ModelInterface >::AttachOrSetObject(), iqt2d::TShapeParamsGuiCompBase< Ui, Shape, ShapeModel >::CreateShape(), and iqt2d::TShapeParamsGuiCompBase< Ui, Shape, ShapeModel >::OnModelAttached().
|
pure virtual |
Detaches all attached observers.
Implemented in imod::CModelBase, and imod::CModelProxy.
|
pure virtual |
Detaches model object from observer observerPtr.
observer which is not attached to the observer observer will cause an assertion. To prevent this, you can use the isAttached() function. Implemented in imod::CModelBase, and imod::CModelProxy.
Referenced by iqt2d::TShapeParamsGuiCompBase< Ui, Shape, ShapeModel >::OnModelDetached().
|
pure virtual |
Returns true if observer observer is attached to this model object.
Implemented in imod::CModelBase, and imod::CModelProxy.
Referenced by iqt2d::TShapeParamsGuiCompBase< Ui, Shape, ShapeModel >::OnModelDetached().