![]() |
ICF 3.0.5.47
Technical documentation of ICF Libraries
|
Simulation wrapper of component. More...
#include <TSimComponentWrap.h>
Public Types | |
typedef TComponentWrap< Base > | BaseClass |
typedef CSimComponentContextBase | BaseClass2 |
![]() | |
typedef Base | BaseClass |
![]() | |
typedef istd::TIFactory< IComponent > | ComponentsFactory |
Public Member Functions | |
TSimComponentWrap () | |
void | InitComponent () |
Initialilze component after setting all its attributes and references. | |
virtual const QByteArray & | GetContextId () const |
Get ID of this component in the context tree. | |
virtual IComponent * | GetSubcomponent (const QByteArray &componentId) const |
Get access to subcomponent using its ID. | |
virtual const IComponentContext * | GetSubcomponentContext (const QByteArray &componentId) const |
Get access to context of subcomponent using its ID. | |
virtual std::unique_ptr< IComponent > | CreateSubcomponent (const QByteArray &componentId) const |
Create instance of subcomponent using its ID. | |
virtual void | OnSubcomponentDeleted (const IComponent *subcomponentPtr) |
Called if subcomponent is removed from memory. | |
virtual const ICompositeComponent * | GetParentComponent (bool ownerOnly=false) const |
Get parent of this component. | |
![]() | |
TComponentWrap () | |
virtual | ~TComponentWrap () |
void | SetComponentContext (const IComponentContext *contextPtr, const ICompositeComponent *parentPtr, bool isParentOwner) override |
![]() | |
CSimComponentContextBase (const IComponentStaticInfo *infoPtr) | |
bool | SetAttr (const QByteArray &attributeId, const iser::IObject *attributePtr) |
Set named attribute. | |
bool | SetRef (const QByteArray &referenceId, IComponent *componentPtr, const QByteArray &subelementId="") |
Set named reference to some component. | |
bool | InsertMultiRef (const QByteArray &referenceId, IComponent *componentPtr, const QByteArray &subelementId="") |
Set named reference to some component. | |
bool | SetFactory (const QByteArray &factoryId, const ComponentsFactory *factoryPtr) |
Set factory of component instance. | |
bool | InsertMultiFactory (const QByteArray &factoryId, const 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 const IRegistryElement & | GetRegistryElement () const |
Get access to component registry element object. | |
virtual const IComponentStaticInfo & | GetStaticInfo () const |
Get component static info associated with this context. | |
virtual const IComponentContext * | GetParentContext () const |
Get access to parent component context. | |
virtual const iser::IObject * | GetAttribute (const QByteArray &attributeId, int *definitionLevelPtr=nullptr) const |
Get attribute using its ID. | |
![]() | |
![]() | |
![]() | |
virtual void * | GetInterface (const istd::CClassInfo &interfaceType, const QByteArray &subId="")=0 |
Get access to specified component interface. | |
virtual const IComponentContext * | GetComponentContext () const =0 |
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)=0 |
Set component context of this component. | |
Additional Inherited Members | |
![]() | |
typedef QMap< QByteArray, IComponent * > | ComponentsMap |
typedef QMap< QByteArray, const ComponentsFactory * > | FactoriesMap |
![]() | |
template<class AttrType > | |
bool | IsAttributeTypeCorrect (const QByteArray &attributeId) |
Check if attribute type is corrected. | |
![]() | |
static bool | SplitId (const QByteArray &complexId, QByteArray &baseId, QByteArray &subId) |
Split component ID into separated ID's. | |
static QByteArray | JoinId (const QByteArray &baseId, const QByteArray &subId) |
Join base component ID and sub ID into composed component ID. | |
![]() | |
ComponentsMap | m_componentsMap |
FactoriesMap | m_factoriesMap |
Simulation wrapper of component.
It allows to use components directly from static linked libraries, without component framework.
Definition at line 25 of file TSimComponentWrap.h.
TComponentWrap<Base> icomp::TSimComponentWrap< Base >::BaseClass |
Definition at line 31 of file TSimComponentWrap.h.
CSimComponentContextBase icomp::TSimComponentWrap< Base >::BaseClass2 |
Definition at line 32 of file TSimComponentWrap.h.
icomp::TSimComponentWrap< Base >::TSimComponentWrap | ( | ) |
Definition at line 58 of file TSimComponentWrap.h.
|
virtual |
Create instance of subcomponent using its ID.
Implements icomp::ICompositeComponent.
Reimplemented in icomp::TSimComponentsFactory< Base >.
Definition at line 106 of file TSimComponentWrap.h.
|
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 75 of file TSimComponentWrap.h.
References istd::CClassInfo::GetName().
|
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.
ownerOnly | indicate, that parent should be returned only if it owns this component. |
Implements icomp::IComponent.
Definition at line 129 of file TSimComponentWrap.h.
|
virtual |
Get access to subcomponent using its ID.
Implements icomp::ICompositeComponent.
Definition at line 86 of file TSimComponentWrap.h.
|
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 99 of file TSimComponentWrap.h.
void icomp::TSimComponentWrap< Base >::InitComponent | ( | ) |
Initialilze component after setting all its attributes and references.
Definition at line 66 of file TSimComponentWrap.h.
|
virtual |
Called if subcomponent is removed from memory.
subcomponentPtr | pointer to component beeing removed. It cannot be nullptr. |
Implements icomp::ICompositeComponent.
Definition at line 120 of file TSimComponentWrap.h.
© Witold Gantzke and Kirill Lepskiy