![]() |
ICF 3.1.1.10
Technical documentation of ICF Libraries
|
Reflects the changes of observed objects as changes of some other object (over istd::IChangeable), typically delegated to itself. More...
#include <CModelUpdateBridge.h>
Public Types | |
| enum | UpdateFlags { UF_DELEGATED = 0x1 , UF_SOURCE = 0x2 } |
| Flags to control the change set using for the change notification of the target object. More... | |
Public Member Functions | |
| CModelUpdateBridge (CModelUpdateBridge &&bridge) noexcept | |
| CModelUpdateBridge (istd::IChangeable *changeablePtr, int updateFlags=UF_DELEGATED) | |
| virtual | ~CModelUpdateBridge () |
| imod::IModel * | GetObservedModel (int modelIndex) const |
Get access to connected model with the index index. | |
| int | GetModelCount () const |
| Gets the number of connected models. | |
| void | EnsureModelsDetached () |
| Remove all observed models from this bridge. | |
| bool | IsModelAttached (const imod::IModel *modelPtr) const override |
| Check if specified model is attached. | |
| 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 | OnModelDetached (imod::IModel *modelPtr) override |
| This call back function will be called, if an observable object is about to be detached. | |
| void | BeforeModelChange (imod::IModel *modelPtr) override |
| This function will be called before update of the observer contents occures. | |
| void | AfterModelChange (imod::IModel *modelPtr, const istd::IChangeable::ChangeSet &changeSet) override |
| This function will be called after update of the observer contents occures. | |
Public Member Functions inherited from imod::IObserver | |
Reflects the changes of observed objects as changes of some other object (over istd::IChangeable), typically delegated to itself.
In other words: it allows to connect as observer to multiple models and call BeginChanges and EndChanges on some its changes.
Definition at line 32 of file CModelUpdateBridge.h.
Flags to control the change set using for the change notification of the target object.
Definition at line 38 of file CModelUpdateBridge.h.
|
noexcept |
|
explicit |
|
virtual |
|
overridevirtual |
This function will be called after update of the observer contents occures.
Implements imod::IObserver.
|
overridevirtual |
This function will be called before update of the observer contents occures.
Please note, that in some cases no following AfterModelChange can be called.
Implements imod::IObserver.
| void imod::CModelUpdateBridge::EnsureModelsDetached | ( | ) |
Remove all observed models from this bridge.
| int imod::CModelUpdateBridge::GetModelCount | ( | ) | const |
Gets the number of connected models.
| imod::IModel * imod::CModelUpdateBridge::GetObservedModel | ( | int | modelIndex | ) | const |
Get access to connected model with the index index.
|
overridevirtual |
Check if specified model is attached.
\modelPtr pointer to model object. If this pointer is nullptr, any model is meaned.
modelPtr is attached yet to this observer, false otherwise. Implements imod::IObserver.
|
overridevirtual |
This call back function will be called, if an observable object is about to be attached.
This function returns a true, if observable object is accepted by the implementation logic of the observer, otherwise returns false.
| modelPtr | pointer to model object being attached. |
| changeMask | output parameter returning set of change ID's will be accepted. returns a false. |
Implements imod::IObserver.
|
overridevirtual |
This call back function will be called, if an observable object is about to be detached.
Implements imod::IObserver.
© Witold Gantzke and Kirill Lepskiy