|
ACF $AcfVersion:0$
|
Simulation wrapper of component. More...
#include <TSimComponentWrap.h>
Classes | |
| class | SimulationContext |
Public Types | |
| typedef TComponentWrap< Base > | BaseClass |
Public Types inherited from icomp::TComponentWrap< Base > | |
| typedef Base | BaseClass |
Public Member Functions | |
| TSimComponentWrap () | |
| ~TSimComponentWrap () | |
| void | InitComponent () |
| Initialilze component after setting all its attributes and references. | |
| bool | SetAttr (const QByteArray &attributeId, const iser::IObject *attributePtr) |
| Set named attribute. | |
| bool | SetRef (const QByteArray &referenceId, IComponentSharedPtr componentPtr, const QByteArray &subelementId="") |
| Set named reference to some component. | |
| bool | InsertMultiRef (const QByteArray &referenceId, IComponentSharedPtr componentPtr, const QByteArray &subelementId="") |
| Set named reference to some component. | |
| bool | SetFactory (const QByteArray &factoryId, const CSimComponentContextBase::ComponentsFactory *factoryPtr) |
| Set factory of component instance. | |
| bool | InsertMultiFactory (const QByteArray &factoryId, const CSimComponentContextBase::ComponentsFactory *factoryPtr) |
| Insert new factory instance into multi-factory attribute. | |
| bool | SetBoolAttr (const QByteArray &attributeId, bool value) |
Set instance of bool attribute. | |
| bool | SetIntAttr (const QByteArray &attributeId, int value) |
Set instance of int attribute. | |
| bool | SetDoubleAttr (const QByteArray &attributeId, double value) |
Set instance of double attribute. | |
| bool | SetStringAttr (const QByteArray &attributeId, const QString &value) |
Set instance of QString attribute. | |
| bool | SetIdAttr (const QByteArray &attributeId, const QByteArray &value) |
Set instance of QByteArray attribute. | |
| template<class Attribute > | |
| bool | InsertMultiAttr (const QByteArray &attributeId, const Attribute &attribute) |
| Insert new attribute to multi attributes. | |
| bool | InsertMultiAttr (const QByteArray &attributeId, const QString &attribute) |
| virtual IComponentSharedPtr | GetSubcomponent (const QByteArray &componentId) const override |
| Get access to subcomponent using its ID. | |
| virtual IComponentContextSharedPtr | GetSubcomponentContext (const QByteArray &componentId) const override |
| Get access to context of subcomponent using its ID. | |
| virtual IComponentUniquePtr | CreateSubcomponent (const QByteArray &componentId) const override |
| Create instance of subcomponent using its ID. | |
| virtual void | OnSubcomponentDeleted (const IComponent *subcomponentPtr) override |
| Called if subcomponent is removed from memory. | |
| virtual const IComponent * | GetParentComponent (bool ownerOnly=false) const override |
| Get parent of this component. | |
Public Member Functions inherited from icomp::TComponentWrap< Base > | |
| TComponentWrap () | |
| virtual | ~TComponentWrap () |
| virtual void | SetComponentContext (const IComponentContextSharedPtr &contextPtr, const IComponent *parentPtr, bool isParentOwner) override |
Public Member Functions inherited from icomp::IComponent | |
| virtual void * | GetInterface (const istd::CClassInfo &interfaceType, const QByteArray &subId="")=0 |
| Get access to specified component interface. | |
| virtual IComponentContextSharedPtr | GetComponentContext () const =0 |
| Get access to component context describing all application-specified component information loaded from components registry. | |
| virtual void | SetComponentContext (const IComponentContextSharedPtr &contextPtr, const icomp::IComponent *parentPtr, bool isParentOwner)=0 |
| Set component context of this component. | |
Public Member Functions inherited from istd::IPolymorphic | |
| virtual | ~IPolymorphic () |
Protected Attributes | |
| IComponentContextSharedPtr | m_contextPtr |
| IComponentSharedPtr | m_componentPtr |
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.
| typedef TComponentWrap<Base> icomp::TSimComponentWrap< Base >::BaseClass |
Definition at line 28 of file TSimComponentWrap.h.
| icomp::TSimComponentWrap< Base >::TSimComponentWrap | ( | ) |
Definition at line 226 of file TSimComponentWrap.h.
References icomp::TSimComponentWrap< Base >::m_contextPtr.
|
inline |
Definition at line 32 of file TSimComponentWrap.h.
References icomp::TSimComponentWrap< Base >::m_contextPtr.
|
overridevirtual |
Create instance of subcomponent using its ID.
Implements icomp::ICompositeComponent.
Definition at line 259 of file TSimComponentWrap.h.
References icomp::TSimComponentWrap< Base >::SimulationContext::CreateSubcomponent().
|
overridevirtual |
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.
| ownerOnly | indicate, that parent should be returned only if it owns this component. |
Implements icomp::IComponent.
Definition at line 277 of file TSimComponentWrap.h.
References NULL.
|
overridevirtual |
Get access to subcomponent using its ID.
Implements icomp::ICompositeComponent.
Definition at line 243 of file TSimComponentWrap.h.
References icomp::TSimComponentWrap< Base >::SimulationContext::GetSubcomponent().
|
overridevirtual |
Get access to context of subcomponent using its ID.
Please note, that this does'n create component instance.
Implements icomp::ICompositeComponent.
Definition at line 252 of file TSimComponentWrap.h.
| void icomp::TSimComponentWrap< Base >::InitComponent | ( | ) |
Initialilze component after setting all its attributes and references.
Definition at line 234 of file TSimComponentWrap.h.
References NULL.
Referenced by icomp::TSimComponentsFactory< Base >::TSimComponentsFactory().
|
inline |
Insert new attribute to multi attributes.
| attributeId | ID of attribute (multi attribute). |
| attribute | single attribute value. |
Definition at line 150 of file TSimComponentWrap.h.
References icomp::CSimComponentContextBase::InsertMultiAttr(), and icomp::TSimComponentWrap< Base >::m_contextPtr.
|
inline |
Definition at line 157 of file TSimComponentWrap.h.
References icomp::CSimComponentContextBase::InsertMultiAttr(), and icomp::TSimComponentWrap< Base >::m_contextPtr.
|
inline |
Insert new factory instance into multi-factory attribute.
Definition at line 87 of file TSimComponentWrap.h.
References icomp::CSimComponentContextBase::InsertMultiFactory(), and icomp::TSimComponentWrap< Base >::m_contextPtr.
|
inline |
Set named reference to some component.
Definition at line 67 of file TSimComponentWrap.h.
References icomp::CSimComponentContextBase::InsertMultiRef(), and icomp::TSimComponentWrap< Base >::m_contextPtr.
|
overridevirtual |
Called if subcomponent is removed from memory.
| subcomponentPtr | pointer to component beeing removed. It cannot be NULL. |
Implements icomp::ICompositeComponent.
Definition at line 268 of file TSimComponentWrap.h.
|
inline |
Set named attribute.
| attributeId | ID of attribute. |
| attributePtr | pointer to attribute instance. It will be automatically deleted. |
Definition at line 47 of file TSimComponentWrap.h.
References icomp::TSimComponentWrap< Base >::m_contextPtr, and icomp::CSimComponentContextBase::SetAttr().
|
inline |
Set instance of bool attribute.
Definition at line 97 of file TSimComponentWrap.h.
References icomp::TSimComponentWrap< Base >::m_contextPtr, and icomp::CSimComponentContextBase::SetBoolAttr().
|
inline |
Set instance of double attribute.
Definition at line 117 of file TSimComponentWrap.h.
References icomp::TSimComponentWrap< Base >::m_contextPtr, and icomp::CSimComponentContextBase::SetDoubleAttr().
|
inline |
Set factory of component instance.
Definition at line 77 of file TSimComponentWrap.h.
References icomp::TSimComponentWrap< Base >::m_contextPtr, and icomp::CSimComponentContextBase::SetFactory().
|
inline |
Set instance of QByteArray attribute.
Definition at line 137 of file TSimComponentWrap.h.
References icomp::TSimComponentWrap< Base >::m_contextPtr, and icomp::CSimComponentContextBase::SetIdAttr().
|
inline |
Set instance of int attribute.
Definition at line 107 of file TSimComponentWrap.h.
References icomp::TSimComponentWrap< Base >::m_contextPtr, and icomp::CSimComponentContextBase::SetIntAttr().
|
inline |
Set named reference to some component.
Definition at line 57 of file TSimComponentWrap.h.
References icomp::TSimComponentWrap< Base >::m_contextPtr, and icomp::CSimComponentContextBase::SetRef().
|
inline |
Set instance of QString attribute.
Definition at line 127 of file TSimComponentWrap.h.
References icomp::TSimComponentWrap< Base >::m_contextPtr, and icomp::CSimComponentContextBase::SetStringAttr().
|
protected |
Definition at line 219 of file TSimComponentWrap.h.
|
protected |
Definition at line 218 of file TSimComponentWrap.h.
Referenced by icomp::TSimComponentWrap< Base >::InsertMultiAttr(), icomp::TSimComponentWrap< Base >::InsertMultiAttr(), icomp::TSimComponentWrap< Base >::InsertMultiFactory(), icomp::TSimComponentWrap< Base >::InsertMultiRef(), icomp::TSimComponentWrap< Base >::SetAttr(), icomp::TSimComponentWrap< Base >::SetBoolAttr(), icomp::TSimComponentWrap< Base >::SetDoubleAttr(), icomp::TSimComponentWrap< Base >::SetFactory(), icomp::TSimComponentWrap< Base >::SetIdAttr(), icomp::TSimComponentWrap< Base >::SetIntAttr(), icomp::TSimComponentWrap< Base >::SetRef(), icomp::TSimComponentWrap< Base >::SetStringAttr(), icomp::TSimComponentWrap< Base >::TSimComponentWrap(), and icomp::TSimComponentWrap< Base >::~TSimComponentWrap().