6#ifndef imod_CModelUpdateBridge_included
7#define imod_CModelUpdateBridge_included
11#include <QtCore/QVector>
12#include <QtCore/QReadWriteLock>
82 typedef QVector<imod::IModel*> Models;
89 mutable QReadWriteLock m_modelListMutex;
Reflects the changes of observed objects as changes of some other object (over istd::IChangeable),...
CModelUpdateBridge(istd::IChangeable *changeablePtr, int updateFlags=UF_DELEGATED)
CModelUpdateBridge(CModelUpdateBridge &&bridge) noexcept
void AfterModelChange(imod::IModel *modelPtr, const istd::IChangeable::ChangeSet &changeSet) override
This function will be called after update of the observer contents occures.
void EnsureModelsDetached()
Remove all observed models from this bridge.
UpdateFlags
Flags to control the change set using for the change notification of the target object.
@ UF_DELEGATED
Change notification of the target object will be done using change set containing CF_DELEGATED flag o...
@ UF_SOURCE
Change notification of the target object will be done using change set of observered object.
void BeforeModelChange(imod::IModel *modelPtr) override
This function will be called before update of the observer contents occures.
imod::IModel * GetObservedModel(int modelIndex) const
Get access to connected model with the index index.
int GetModelCount() const
Gets the number of connected models.
bool OnModelDetached(imod::IModel *modelPtr) override
This call back function will be called, if an observable object is about to be detached.
virtual ~CModelUpdateBridge()
bool OnModelAttached(imod::IModel *modelPtr, istd::IChangeable::ChangeSet &changeMask) override
This call back function will be called, if an observable object is about to be attached.
bool IsModelAttached(const imod::IModel *modelPtr) const override
Check if specified model is attached.
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...
Set of change flags (its IDs).
Common interface for data model objects, which can be changed.
This namespace containes basic implementation of Model/Observer design pattern This package is system...