Public Types | Public Member Functions | Protected Member Functions | List of all members
ibase::CMultiObserverBinderComp Class Reference

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

#include <CMultiObserverBinderComp.h>

Inheritance diagram for ibase::CMultiObserverBinderComp:
icomp::CComponentBase imod::IModelEditor imod::IObserver icomp::IComponent istd::IPolymorphic istd::IPolymorphic istd::IPolymorphic

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 ()
 
virtual bool IsModelAttached (const imod::IModel *modelPtr=NULL) const
 Check if specified model is attached. More...
 
virtual bool OnModelAttached (imod::IModel *modelPtr, istd::IChangeable::ChangeSet &changeMask)
 This call back function will be called, if an observable object is about to be attached. More...
 
virtual bool OnModelDetached (imod::IModel *modelPtr)
 This call back function will be called, if an observable object is about to be detached. More...
 
virtual void BeforeUpdate (imod::IModel *modelPtr)
 This function will be called before update of the observer contents occures. More...
 
virtual void AfterUpdate (imod::IModel *modelPtr, const istd::IChangeable::ChangeSet &changeSet)
 This function will be called after update of the observer contents occures. More...
 
virtual void UpdateEditor (const istd::IChangeable::ChangeSet &changeSet)
 Updates editor with model data. More...
 
virtual void UpdateModelFromEditor () const
 Updates model from editor. More...
 
virtual bool IsReadOnly () const
 Returns true if the model data can be changed. More...
 
virtual void SetReadOnly (bool state)
 Set flag that the model data can be changed. More...
 
- Public Member Functions inherited from icomp::CComponentBase
 CComponentBase ()
 Create component and assign it to specific context. More...
 
virtual const ICompositeComponentGetParentComponent (bool ownerOnly=false) const
 Get parent of this component. More...
 
virtual void * GetInterface (const istd::CClassInfo &interfaceType, const QByteArray &subId="")
 Get access to specified component interface. More...
 
virtual const IComponentContextGetComponentContext () const
 Get access to component context describing all application-specified component information loaded from components registry. More...
 
virtual void SetComponentContext (const icomp::IComponentContext *contextPtr, const ICompositeComponent *parentPtr, bool isParentOwner)
 Set component context of this component. More...
 
- Public Member Functions inherited from istd::IPolymorphic
virtual ~IPolymorphic ()
 

Protected Member Functions

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

Additional Inherited Members

- Static Protected Member Functions inherited from icomp::CComponentBase
static const
icomp::IRealComponentStaticInfo
InitStaticInfo (IComponent *componentPtr)
 
static QByteArray GetComponentId (const icomp::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 25 of file CMultiObserverBinderComp.h.

Member Typedef Documentation

Definition at line 31 of file CMultiObserverBinderComp.h.

Constructor & Destructor Documentation

ibase::CMultiObserverBinderComp::CMultiObserverBinderComp ( )

Member Function Documentation

virtual void ibase::CMultiObserverBinderComp::AfterUpdate ( imod::IModel modelPtr,
const istd::IChangeable::ChangeSet changeSet 
)
virtual

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

Implements imod::IObserver.

virtual void ibase::CMultiObserverBinderComp::BeforeUpdate ( imod::IModel modelPtr)
virtual

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

Please note, that in some cases no following AfterUpdate can be called.

Implements imod::IObserver.

virtual bool ibase::CMultiObserverBinderComp::IsModelAttached ( const imod::IModel modelPtr = NULL) const
virtual

Check if specified model is attached.

pointer to model object. If this pointer is NULL, any model is meaned.

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

Implements imod::IObserver.

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

Returns true if the model data can be changed.

Implements imod::IModelEditor.

virtual void ibase::CMultiObserverBinderComp::OnComponentDestroyed ( )
protectedvirtual

Reimplemented from icomp::CComponentBase.

virtual bool ibase::CMultiObserverBinderComp::OnModelAttached ( imod::IModel modelPtr,
istd::IChangeable::ChangeSet changeMask 
)
virtual

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.

virtual bool ibase::CMultiObserverBinderComp::OnModelDetached ( imod::IModel modelPtr)
virtual

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

Implements imod::IObserver.

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

Set flag that the model data can be changed.

Returns
true, if this feature is supported.

Implements imod::IModelEditor.

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

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.

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

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:

© 2007-2017 Witold Gantzke and Kirill Lepskiy