#include <CCompositeComponent.h>
|
| 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.
|
| |
| template<class Interface > |
| static Interface * | ExtractInterface (IComponent *componentPtr, const QByteArray &subId="") |
| | Extract interface from component.
|
| |
Definition at line 28 of file CCompositeComponent.h.
◆ CCompositeComponent()
| icomp::CCompositeComponent::CCompositeComponent |
( |
bool |
manualAutoInit | ) |
|
◆ ~CCompositeComponent()
| virtual icomp::CCompositeComponent::~CCompositeComponent |
( |
| ) |
|
|
virtual |
◆ CreateSubcomponent()
| virtual IComponentUniquePtr icomp::CCompositeComponent::CreateSubcomponent |
( |
const QByteArray & |
componentId | ) |
const |
|
overridevirtual |
◆ CreateSubcomponentInfo()
Create information objects and subcomponent.
- Parameters
-
| componentId | ID of subcomponent. |
| subContextPtr | pointer to subcomponent context will be set to new context object if needed. |
| subComponentPtr | optional pointer to subcomponent will be set to new component object. |
| isOwned | true, if created component will be owned by this component and should delegate its destroy event. |
- Returns
- true if success.
◆ EnsureAutoInitComponentsCreated()
| bool icomp::CCompositeComponent::EnsureAutoInitComponentsCreated |
( |
| ) |
const |
Make sure, all components with flag 'AutoInit' are initialized.
- Returns
- true, if there were components needed to be initialized.
◆ GetComponentContext()
◆ GetComponentInterface()
template<class InterfaceType >
| InterfaceType * icomp::CCompositeComponent::GetComponentInterface |
( |
const QByteArray & |
subId = "" | ) |
|
|
inline |
◆ GetInterface()
| virtual void * icomp::CCompositeComponent::GetInterface |
( |
const istd::CClassInfo & |
interfaceType, |
|
|
const QByteArray & |
subId = "" |
|
) |
| |
|
overridevirtual |
Get access to specified component interface.
- Parameters
-
| interfaceType | requested interface. |
| subId | some additional ID to identify subelement of this component. |
Implements icomp::IComponent.
Referenced by GetComponentInterface().
◆ GetParentComponent()
| virtual const icomp::IComponent * icomp::CCompositeComponent::GetParentComponent |
( |
bool |
ownerOnly = false | ) |
const |
|
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.
- Parameters
-
| ownerOnly | indicate, 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.
◆ GetSubcomponent()
| virtual IComponentSharedPtr icomp::CCompositeComponent::GetSubcomponent |
( |
const QByteArray & |
componentId | ) |
const |
|
overridevirtual |
◆ GetSubcomponentContext()
Get access to context of subcomponent using its ID.
Please note, that this does'n create component instance.
Implements icomp::ICompositeComponent.
◆ OnSubcomponentDeleted()
| virtual void icomp::CCompositeComponent::OnSubcomponentDeleted |
( |
const IComponent * |
subcomponentPtr | ) |
|
|
overridevirtual |
Called if subcomponent is removed from memory.
- Parameters
-
| subcomponentPtr | pointer to component beeing removed. It cannot be NULL. |
Implements icomp::ICompositeComponent.
◆ SetComponentContext()
Set component context of this component.
- Parameters
-
| contextPtr | new value of component context. It can be also NULL. Please avoid to use this method, it is designed for internal use only. |
| parentPtr | pointer to parent component, or NULL if this component has no parent. |
| isParentOwner | indicate, that life cycle of this component is controller by its parent. |
Implements icomp::IComponent.
The documentation for this class was generated from the following file: