ICF 3.0.5.47
Technical documentation of ICF Libraries
ibase::CMultiObserverBinderComp Class Reference

Component for binding of more observers to a data model. More...

#include <CMultiObserverBinderComp.h>

Inheritance diagram for ibase::CMultiObserverBinderComp:
Collaboration diagram for ibase::CMultiObserverBinderComp:

Public Types

typedef icomp::CComponentBase BaseClass
 
- Public Types inherited from imod::IModelEditor
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.
 
- Public Member Functions inherited from icomp::CComponentBase
 CComponentBase ()
 Create component and assign it to specific context.
 
 CComponentBase (const CComponentBase &)=delete
 
CComponentBaseoperator= (const CComponentBase &)=delete
 
virtual const ICompositeComponentGetParentComponent (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 IComponentContextGetComponentContext () 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.
 
- Public Member Functions inherited from icomp::IComponent
- Public Member Functions inherited from imod::IModelEditor
- Public Member Functions inherited from imod::IObserver

Protected Member Functions

void OnComponentDestroyed () override
 
- Protected Member Functions inherited from icomp::CComponentBase
bool IsComponentActive () const
 Check if component is active.
 
virtual void OnComponentCreated ()
 
virtual const IRealComponentStaticInfoGetComponentStaticInfo () const =0
 Get access to static info of this component.
 

Additional Inherited Members

- Static Protected Member Functions inherited from icomp::CComponentBase
static const IRealComponentStaticInfoInitStaticInfo (IComponent *componentPtr)
 
static QByteArray GetComponentId (const IComponentContext *componentContextPtr, const QByteArray &contextId=QByteArray())
 

Detailed Description

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.

Member Typedef Documentation

◆ BaseClass

Constructor & Destructor Documentation

◆ CMultiObserverBinderComp()

ibase::CMultiObserverBinderComp::CMultiObserverBinderComp ( )

Member Function Documentation

◆ AfterModelChange()

void ibase::CMultiObserverBinderComp::AfterModelChange ( imod::IModel * modelPtr,
const istd::IChangeable::ChangeSet & changeSet )
overridevirtual

This function will be called after update of the observer contents occures.

Implements imod::IObserver.

◆ BeforeModelChange()

void ibase::CMultiObserverBinderComp::BeforeModelChange ( imod::IModel * modelPtr)
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.

◆ IsModelAttached()

bool ibase::CMultiObserverBinderComp::IsModelAttached ( const imod::IModel * modelPtr = nullptr) const
overridevirtual

Check if specified model is attached.

\modelPtr pointer to model object. If this pointer is nullptr, any model is meaned.

Returns
true, if modelPtr is attached yet to this observer, false otherwise.

Implements imod::IObserver.

◆ IsReadOnly()

bool ibase::CMultiObserverBinderComp::IsReadOnly ( ) const
overridevirtual

Returns true if the model data can be changed.

Implements imod::IModelEditor.

◆ OnComponentDestroyed()

void ibase::CMultiObserverBinderComp::OnComponentDestroyed ( )
overrideprotectedvirtual

Reimplemented from icomp::CComponentBase.

◆ OnModelAttached()

bool ibase::CMultiObserverBinderComp::OnModelAttached ( imod::IModel * modelPtr,
istd::IChangeable::ChangeSet & changeMask )
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.

Parameters
modelPtrpointer to model object being attached.
changeMaskoutput parameter returning set of change ID's will be accepted. returns a false.

Implements imod::IObserver.

◆ OnModelDetached()

bool ibase::CMultiObserverBinderComp::OnModelDetached ( imod::IModel * modelPtr)
overridevirtual

This call back function will be called, if an observable object is about to be detached.

Implements imod::IObserver.

◆ SetReadOnly()

void ibase::CMultiObserverBinderComp::SetReadOnly ( bool state)
overridevirtual

Set flag that the model data can be changed.

Returns
true, if this feature is supported.

Implements imod::IModelEditor.

◆ UpdateEditor()

void ibase::CMultiObserverBinderComp::UpdateEditor ( const istd::IChangeable::ChangeSet & changeSet)
overridevirtual

Updates editor with model data.

This method will be called only if GUI is connected.

Parameters
changeSetthe same as changeSet in istd::IChangeable.

Implements imod::IModelEditor.

◆ UpdateModelFromEditor()

void ibase::CMultiObserverBinderComp::UpdateModelFromEditor ( ) const
overridevirtual

Updates model from editor.

This method will be called only if GUI is connected and model is attached.

Implements imod::IModelEditor.


The documentation for this class was generated from the following file:

© Witold Gantzke and Kirill Lepskiy