Public Types | Public Member Functions | List of all members
icomp::TSimComponentWrap< Base > Class Template Reference

Simulation wrapper of component. More...

#include <TSimComponentWrap.h>

Inheritance diagram for icomp::TSimComponentWrap< Base >:
icomp::TComponentWrap< Base > icomp::CSimComponentContextBase icomp::ICompositeComponent icomp::IComponentContext istd::CIdManipBase icomp::IComponent istd::IPolymorphic istd::IPolymorphic icomp::TSimComponentsFactory< Base >

Public Types

typedef TComponentWrap< Base > BaseClass
 
typedef CSimComponentContextBase BaseClass2
 
- Public Types inherited from icomp::TComponentWrap< Base >
typedef Base BaseClass
 
- Public Types inherited from icomp::CSimComponentContextBase
typedef istd::TIFactory
< icomp::IComponent
ComponentsFactory
 

Public Member Functions

 TSimComponentWrap ()
 
void InitComponent ()
 Initialilze component after setting all its attributes and references. More...
 
virtual const QByteArray & GetContextId () const
 Get ID of this component in the context tree. More...
 
virtual IComponentGetSubcomponent (const QByteArray &componentId) const
 Get access to subcomponent using its ID. More...
 
virtual const IComponentContextGetSubcomponentContext (const QByteArray &componentId) const
 Get access to context of subcomponent using its ID. More...
 
virtual IComponentCreateSubcomponent (const QByteArray &componentId) const
 Create instance of subcomponent using its ID. More...
 
virtual void OnSubcomponentDeleted (const IComponent *subcomponentPtr)
 Called if subcomponent is removed from memory. More...
 
virtual const ICompositeComponentGetParentComponent (bool ownerOnly=false) const
 Get parent of this component. More...
 
- Public Member Functions inherited from icomp::TComponentWrap< Base >
 TComponentWrap ()
 
virtual ~TComponentWrap ()
 
virtual void SetComponentContext (const IComponentContext *contextPtr, const ICompositeComponent *parentPtr, bool isParentOwner)
 
- Public Member Functions inherited from icomp::CSimComponentContextBase
 CSimComponentContextBase (const IComponentStaticInfo *infoPtr)
 
bool SetAttr (const QByteArray &attributeId, const iser::IObject *attributePtr)
 Set named attribute. More...
 
bool SetRef (const QByteArray &referenceId, IComponent *componentPtr, const QByteArray &subelementId="")
 Set named reference to some component. More...
 
bool InsertMultiRef (const QByteArray &referenceId, IComponent *componentPtr, const QByteArray &subelementId="")
 Set named reference to some component. More...
 
bool SetFactory (const QByteArray &factoryId, const ComponentsFactory *factoryPtr)
 Set factory of component instance. More...
 
bool InsertMultiFactory (const QByteArray &factoryId, const ComponentsFactory *factoryPtr)
 Insert new factory instance into multi-factory attribute. More...
 
bool SetBoolAttr (const QByteArray &attributeId, bool value)
 Set instance of bool attribute. More...
 
bool SetIntAttr (const QByteArray &attributeId, int value)
 Set instance of int attribute. More...
 
bool SetDoubleAttr (const QByteArray &attributeId, double value)
 Set instance of double attribute. More...
 
bool SetStringAttr (const QByteArray &attributeId, const QString &value)
 Set instance of QString attribute. More...
 
bool SetIdAttr (const QByteArray &attributeId, const QByteArray &value)
 Set instance of QByteArray attribute. More...
 
template<class Attribute >
bool InsertMultiAttr (const QByteArray &attributeId, const Attribute &attribute)
 Insert new attribute to multi attributes. More...
 
bool InsertMultiAttr (const QByteArray &attributeId, const QString &attribute)
 
virtual const IRegistryElementGetRegistryElement () const
 Get access to component registry element object. More...
 
virtual const
IComponentStaticInfo
GetStaticInfo () const
 Get component static info associated with this context. More...
 
virtual const IComponentContextGetParentContext () const
 Get access to parent component context. More...
 
virtual const iser::IObjectGetAttribute (const QByteArray &attributeId, int *definitionLevelPtr=NULL) const
 Get attribute using its ID. More...
 
- Public Member Functions inherited from istd::IPolymorphic
virtual ~IPolymorphic ()
 
- Public Member Functions inherited from icomp::IComponent
virtual void * GetInterface (const istd::CClassInfo &interfaceType, const QByteArray &subId="")=0
 Get access to specified component interface. More...
 
virtual const IComponentContextGetComponentContext () const =0
 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)=0
 Set component context of this component. More...
 

Additional Inherited Members

- Protected Types inherited from icomp::CSimComponentContextBase
typedef QMap< QByteArray,
IComponent * > 
ComponentsMap
 
typedef QMap< QByteArray,
const ComponentsFactory * > 
FactoriesMap
 
- Protected Member Functions inherited from icomp::CSimComponentContextBase
template<class AttrType >
bool IsAttributeTypeCorrect (const QByteArray &attributeId)
 Check if attribute type is corrected. More...
 
- Static Protected Member Functions inherited from istd::CIdManipBase
static bool SplitId (const QByteArray &complexId, QByteArray &baseId, QByteArray &subId)
 Split component ID into separated ID's. More...
 
static QByteArray JoinId (const QByteArray &baseId, const QByteArray &subId)
 Join base component ID and sub ID into composed component ID. More...
 
- Protected Attributes inherited from icomp::CSimComponentContextBase
ComponentsMap m_componentsMap
 
FactoriesMap m_factoriesMap
 

Detailed Description

template<class Base>
class icomp::TSimComponentWrap< Base >

Simulation wrapper of component.

It allows to use components directly from static linked libraries, without component framework.

Definition at line 23 of file TSimComponentWrap.h.

Member Typedef Documentation

template<class Base >
typedef TComponentWrap<Base> icomp::TSimComponentWrap< Base >::BaseClass

Definition at line 29 of file TSimComponentWrap.h.

template<class Base >
typedef CSimComponentContextBase icomp::TSimComponentWrap< Base >::BaseClass2

Definition at line 30 of file TSimComponentWrap.h.

Constructor & Destructor Documentation

template<class Base >
icomp::TSimComponentWrap< Base >::TSimComponentWrap ( )

Definition at line 56 of file TSimComponentWrap.h.

Member Function Documentation

template<class Base >
IComponent * icomp::TSimComponentWrap< Base >::CreateSubcomponent ( const QByteArray &  componentId) const
virtual

Create instance of subcomponent using its ID.

Implements icomp::ICompositeComponent.

Reimplemented in icomp::TSimComponentsFactory< Base >.

Definition at line 104 of file TSimComponentWrap.h.

References NULL.

template<class Base >
const QByteArray & icomp::TSimComponentWrap< Base >::GetContextId ( ) const
virtual

Get ID of this component in the context tree.

This should be unique for all elements in the same tree level.

Implements icomp::IComponentContext.

Definition at line 73 of file TSimComponentWrap.h.

template<class Base >
const ICompositeComponent * icomp::TSimComponentWrap< Base >::GetParentComponent ( bool  ownerOnly = false) const
virtual

Get parent of this component.

Parent is component who created this component. Parent component can be also owner of this component. It means manages life time of this componenent.

Parameters
ownerOnlyindicate, that parent should be returned only if it owns this component.
Returns
pointer to parent component or NULL if parent is not accessible.

Implements icomp::IComponent.

Definition at line 127 of file TSimComponentWrap.h.

References NULL.

template<class Base >
IComponent * icomp::TSimComponentWrap< Base >::GetSubcomponent ( const QByteArray &  componentId) const
virtual

Get access to subcomponent using its ID.

Implements icomp::ICompositeComponent.

Definition at line 84 of file TSimComponentWrap.h.

References NULL.

template<class Base >
const IComponentContext * icomp::TSimComponentWrap< Base >::GetSubcomponentContext ( const QByteArray &  componentId) const
virtual

Get access to context of subcomponent using its ID.

Please note, that this does'n create component instance.

Implements icomp::ICompositeComponent.

Definition at line 97 of file TSimComponentWrap.h.

References NULL.

template<class Base >
void icomp::TSimComponentWrap< Base >::InitComponent ( )

Initialilze component after setting all its attributes and references.

Definition at line 64 of file TSimComponentWrap.h.

References NULL.

template<class Base >
void icomp::TSimComponentWrap< Base >::OnSubcomponentDeleted ( const IComponent subcomponentPtr)
virtual

Called if subcomponent is removed from memory.

Parameters
subcomponentPtrpointer to component beeing removed. It cannot be NULL.

Implements icomp::ICompositeComponent.

Definition at line 118 of file TSimComponentWrap.h.


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

© 2007-2017 Witold Gantzke and Kirill Lepskiy