Public Types | Public Member Functions | List of all members
imod::TMultiModelObserverBase< ModelInterface > Class Template Reference

Basic implementation of a multiple model observer. More...

#include <TMultiModelObserverBase.h>

Inheritance diagram for imod::TMultiModelObserverBase< ModelInterface >:
imod::CMultiModelObserverBase imod::IObserver istd::IPolymorphic

Public Types

typedef CMultiModelObserverBase BaseClass
 
typedef ModelInterface ModelType
 

Public Member Functions

ModelInterface * GetObservedObject (int objectIndex) const
 Get instance of observed object. More...
 
ModelInterface * GetObjectPtr (int objectIndex) const
 Get instance of observed object. 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...
 
- Public Member Functions inherited from imod::CMultiModelObserverBase
 CMultiModelObserverBase ()
 
virtual ~CMultiModelObserverBase ()
 
int GetModelCount () const
 Gets the number of connected models. More...
 
IModelGetObservedModel (int modelIndex) const
 Get access to connected model with the index index. More...
 
IModelGetModelPtr (int modelIndex) const
 Get access to connected model with the index index. More...
 
void EnsureModelsDetached ()
 Ensure all attached models are detached. More...
 
void SetObservedIds (const istd::IChangeable::ChangeSet &changeMask)
 Set list of ID's beeing observed. More...
 
virtual bool IsModelAttached (const IModel *modelPtr) const
 Check if specified model is attached. More...
 
virtual bool OnModelDetached (IModel *modelPtr)
 This call back function will be called, if an observable object is about to be detached. More...
 
virtual void BeforeUpdate (IModel *modelPtr)
 This function will be called before update of the observer contents occures. More...
 
virtual void AfterUpdate (IModel *modelPtr, const istd::IChangeable::ChangeSet &changeSet)
 This function will be called after update of the observer contents occures. More...
 
- Public Member Functions inherited from istd::IPolymorphic
virtual ~IPolymorphic ()
 

Additional Inherited Members

- Protected Member Functions inherited from imod::CMultiModelObserverBase
virtual void OnUpdate (IModel *modelPtr, const istd::IChangeable::ChangeSet &changeSet)
 Called on update of observed model. More...
 

Detailed Description

template<class ModelInterface>
class imod::TMultiModelObserverBase< ModelInterface >

Basic implementation of a multiple model observer.

Definition at line 21 of file TMultiModelObserverBase.h.

Member Typedef Documentation

template<class ModelInterface >
typedef CMultiModelObserverBase imod::TMultiModelObserverBase< ModelInterface >::BaseClass

Definition at line 24 of file TMultiModelObserverBase.h.

template<class ModelInterface >
typedef ModelInterface imod::TMultiModelObserverBase< ModelInterface >::ModelType

Definition at line 25 of file TMultiModelObserverBase.h.

Member Function Documentation

template<class ModelInterface >
ModelInterface * imod::TMultiModelObserverBase< ModelInterface >::GetObjectPtr ( int  objectIndex) const

Get instance of observed object.

Deprecated:
use GetObservedObject instead.

Definition at line 56 of file TMultiModelObserverBase.h.

template<class ModelInterface >
ModelInterface * imod::TMultiModelObserverBase< ModelInterface >::GetObservedObject ( int  objectIndex) const

Get instance of observed object.

Parameters
objectIndexindex of object

Definition at line 46 of file TMultiModelObserverBase.h.

template<class ModelInterface >
bool imod::TMultiModelObserverBase< ModelInterface >::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.

Reimplemented from imod::CMultiModelObserverBase.

Definition at line 68 of file TMultiModelObserverBase.h.

References NULL.


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

© 2007-2017 Witold Gantzke and Kirill Lepskiy