![]() |
ICF 3.0.5.47
Technical documentation of ICF Libraries
|
Component for binding of more observers to a data model. More...
#include <CMultiObserverBinderComp.h>
Public Types | |
typedef icomp::CComponentBase | BaseClass |
![]() | |
enum | ChangeFlags { CF_INIT_EDITOR = 0x3720694 } |
Data model change notification flags. More... | |
Public Member Functions | |
CMultiObserverBinderComp () | |
bool | IsModelAttached (const imod::IModel *modelPtr=nullptr) 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. | |
void | UpdateEditor (const istd::IChangeable::ChangeSet &changeSet) override |
Updates editor with model data. | |
void | UpdateModelFromEditor () const override |
Updates model from editor. | |
bool | IsReadOnly () const override |
Returns true if the model data can be changed. | |
void | SetReadOnly (bool state) override |
Set flag that the model data can be changed. | |
![]() | |
CComponentBase () | |
Create component and assign it to specific context. | |
CComponentBase (const CComponentBase &)=delete | |
CComponentBase & | operator= (const CComponentBase &)=delete |
virtual const ICompositeComponent * | GetParentComponent (bool ownerOnly=false) const |
Get parent of this component. | |
virtual void * | GetInterface (const istd::CClassInfo &interfaceType, const QByteArray &subId="") |
Get access to specified component interface. | |
virtual const IComponentContext * | GetComponentContext () const |
Get access to component context describing all application-specified component information loaded from components registry. | |
virtual void | SetComponentContext (const IComponentContext *contextPtr, const ICompositeComponent *parentPtr, bool isParentOwner) |
Set component context of this component. | |
![]() | |
![]() | |
![]() |
Protected Member Functions | |
void | OnComponentDestroyed () override |
![]() | |
bool | IsComponentActive () const |
Check if component is active. | |
virtual void | OnComponentCreated () |
virtual const IRealComponentStaticInfo & | GetComponentStaticInfo () const =0 |
Get access to static info of this component. | |
Additional Inherited Members | |
![]() | |
static const IRealComponentStaticInfo & | InitStaticInfo (IComponent *componentPtr) |
static QByteArray | GetComponentId (const IComponentContext *componentContextPtr, const QByteArray &contextId=QByteArray()) |
Component for binding of more observers to a data model.
All methods calls of imod::IModelEditor and imod::IObserver interfaces are delegated to underlaying observers specified in multi-component-reference m_observersCompPtr
and m_modelEditorsCompPtr
. This allows forking of observer functionality from a central location.
Definition at line 29 of file CMultiObserverBinderComp.h.
Definition at line 35 of file CMultiObserverBinderComp.h.
ibase::CMultiObserverBinderComp::CMultiObserverBinderComp | ( | ) |
|
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.
|
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 |
Returns true
if the model data can be changed.
Implements imod::IModelEditor.
|
overrideprotectedvirtual |
Reimplemented from icomp::CComponentBase.
|
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.
|
overridevirtual |
Set flag that the model data can be changed.
Implements imod::IModelEditor.
|
overridevirtual |
Updates editor with model data.
This method will be called only if GUI is connected.
changeSet | the same as changeSet in istd::IChangeable . |
Implements imod::IModelEditor.
|
overridevirtual |
Updates model from editor.
This method will be called only if GUI is connected and model is attached.
Implements imod::IModelEditor.
© Witold Gantzke and Kirill Lepskiy