![]() |
ICF 3.0.5.47
Technical documentation of ICF Libraries
|
Generic implementation of a data model changes notifier. More...
#include <CMultiModelDispatcherBase.h>
Inherits istd::IPolymorphic.
Inherited by i2dgui::CMultiBitmapViewComp [protected]
, i2dgui::CViewProviderGuiComp [protected]
, iauthgui::CUserControllerGuiComp [protected]
, ibase::CTranslationManagerComp [protected]
, icalib::CComposedAffineCalibrationComp [protected]
, icalibgui::CPerspectiveCalibEditorComp [protected]
, icalibgui::CSimpleLensCorrectionEditorComp [protected]
, icmpstr::CComponentNoteEditorComp [protected]
, icmpstr::CRegistryStatisticsViewComp [protected]
, icmpstr::CRegistryTreeViewComp [protected]
, icmpstr::CRootRegistryGuiComp [protected]
, icmpstr::CVisualRegistryEditorComp [protected]
, idoc::CMultiDocumentManagerBase::SingleDocumentData, ifile::CAutoPersistenceComp [protected]
, ifile::CFileSystemInfoProviderComp [protected]
, ifilegui::CFileSystemExplorerGuiComp [protected]
, ifilegui::CFileTreeViewGuiComp, iinspgui::CInspectionTaskGuiComp [protected]
, iinspgui::CMessageBasedViewExtenderComp [private]
, iiprgui::CMultiLineSupplierGuiComp::CShape [protected]
, iloggui::CLogGuiComp [protected]
, imeasgui::CNumericParamsGuiComp [protected]
, iprm::CManagerParamsSetShadowerComp [protected]
, iprmgui::COptionsManagerGuiComp [protected]
, iprmgui::CParamsPresetEditorComp [protected]
, iprmgui::CSelectionParamGuiComp [protected]
, iprocgui::CDocumentProcessingManagerCompBase [protected]
, istdgui::CCommandsBinderComp [protected]
, istdgui::CMultiPageGuiCompBase [protected]
, and istdgui::CSimpleMainWindowGuiComp::CommandsObserver.
Classes | |
class | ObserverProxy |
Public Member Functions | |
bool | RegisterModel (IModel *modelPtr, int modelId=0, const istd::IChangeable::ChangeSet &relevantFlags=istd::IChangeable::GetAllChanges()) |
Register the data model to be observed. | |
void | UnregisterModel (int modelId=0) |
Unregister the data model object. | |
void | UnregisterAllModels () |
Unregister all observed data objects. | |
template<class Object > | |
Object * | GetObjectAt (int modelId) const |
Get concrete object instance of the obsered model. | |
Protected Member Functions | |
virtual void | OnModelChanged (int modelId, const istd::IChangeable::ChangeSet &changeSet)=0 |
Called when some model observed by dispatcher will be changed. | |
Generic implementation of a data model changes notifier.
You can register several data models objects that you want to observe with RegisterModel method. You will get a notification event on each change in the observed data model via OnModelChanged method call of your notification consumer.
Definition at line 34 of file CMultiModelDispatcherBase.h.
Object * imod::CMultiModelDispatcherBase::GetObjectAt | ( | int | modelId | ) | const |
Get concrete object instance of the obsered model.
Definition at line 98 of file CMultiModelDispatcherBase.h.
|
protectedpure virtual |
Called when some model observed by dispatcher will be changed.
Implemented in i2dgui::CMultiBitmapViewComp, i2dgui::CViewProviderGuiComp, iauthgui::CUserControllerGuiComp, ibase::CTranslationManagerComp, icalib::CComposedAffineCalibrationComp, icalibgui::CPerspectiveCalibEditorComp, icalibgui::CSimpleLensCorrectionEditorComp, icmpstr::CComponentNoteEditorComp, icmpstr::CRegistryStatisticsViewComp, icmpstr::CRegistryTreeViewComp, icmpstr::CRootRegistryGuiComp, icmpstr::CVisualRegistryEditorComp, idoc::CMultiDocumentManagerBase::SingleDocumentData, ifile::CAutoPersistenceComp, ifile::CFileSystemInfoProviderComp, ifilegui::CFileSystemExplorerGuiComp, ifilegui::CFileTreeViewGuiComp, iinspgui::CInspectionTaskGuiComp, iinspgui::CMessageBasedViewExtenderComp, iiprgui::CMultiLineSupplierGuiComp::CShape, iloggui::CLogGuiComp, imeasgui::CNumericParamsGuiComp, iprm::CManagerParamsSetShadowerComp, iprmgui::COptionsManagerGuiComp, iprmgui::CParamsPresetEditorComp, iprmgui::CSelectionParamGuiComp, iprocgui::CDocumentProcessingManagerCompBase, istdgui::CCommandsBinderComp, istdgui::CMultiPageGuiCompBase, and istdgui::CSimpleMainWindowGuiComp::CommandsObserver.
bool imod::CMultiModelDispatcherBase::RegisterModel | ( | IModel * | modelPtr, |
int | modelId = 0, | ||
const istd::IChangeable::ChangeSet & | relevantFlags = istd::IChangeable::GetAllChanges() ) |
Register the data model to be observed.
If model registration was successfull, the function returns true
.
modelPtr | Pointer to the data model object, which should be observed. |
modelId | Logical model ID for possible event filtering in the notification callback. Each observed model must be registered with unique ID. If you use the same ID twice, the previous connection will be disconnected. |
relefantFlags | The notification will only be triggered if the value of relevantFlags matches the model change flags. |
void imod::CMultiModelDispatcherBase::UnregisterAllModels | ( | ) |
Unregister all observed data objects.
void imod::CMultiModelDispatcherBase::UnregisterModel | ( | int | modelId = 0 | ) |
Unregister the data model object.
modelId | object ID used at the object registration. |
© Witold Gantzke and Kirill Lepskiy