ICF 3.0.5.47
Technical documentation of ICF Libraries
icomp::IComponent Class Referenceabstract

Main component interface. More...

#include <IComponent.h>

Inheritance diagram for icomp::IComponent:
Collaboration diagram for icomp::IComponent:

Public Member Functions

virtual const ICompositeComponentGetParentComponent (bool ownerOnly=false) const =0
 Get parent of this component.
 
virtual void * GetInterface (const istd::CClassInfo &interfaceType, const QByteArray &subId="")=0
 Get access to specified component interface.
 
virtual const IComponentContextGetComponentContext () 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.
 

Detailed Description

Main component interface.

Definition at line 34 of file IComponent.h.

Member Function Documentation

◆ GetComponentContext()

virtual const IComponentContext * icomp::IComponent::GetComponentContext ( ) const
pure virtual

Get access to component context describing all application-specified component information loaded from components registry.

Implemented in icomp::CComponentBase, and icomp::CCompositeComponent.

Referenced by icomp::TAttributeMember< Attribute >::InitInternal(), icomp::TMultiAttributeMember< Attribute >::InitInternal(), and ibase::TModelObserverCompBaseWrap< ObserverComponent >::OnComponentCreated().

◆ GetInterface()

virtual void * icomp::IComponent::GetInterface ( const istd::CClassInfo & interfaceType,
const QByteArray & subId = "" )
pure virtual

Get access to specified component interface.

Parameters
interfaceTyperequested interface.
subIdsome additional ID to identify subelement of this component.

Implemented in icomp::CComponentBase, and icomp::CCompositeComponent.

Referenced by icomp::CInterfaceManipBase::ExtractInterface().

◆ GetParentComponent()

virtual const ICompositeComponent * icomp::IComponent::GetParentComponent ( bool ownerOnly = false) const
pure 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 nullptr if parent is not accessible.

Implemented in icomp::CComponentBase, icomp::CCompositeComponent, and icomp::TSimComponentWrap< Base >.

Referenced by icomp::TFactoryMember< Interface >::CreateComponent(), icomp::TMultiFactoryMember< Interface >::CreateComponent(), icomp::TMultiReferenceMember< Interface >::EnsureInitialized(), icomp::TReferenceMember< Interface >::EnsureInitialized(), icomp::TAttributeMember< Attribute >::InitInternal(), and icomp::TMultiAttributeMember< Attribute >::InitInternal().

◆ SetComponentContext()

virtual void icomp::IComponent::SetComponentContext ( const IComponentContext * contextPtr,
const ICompositeComponent * parentPtr,
bool isParentOwner )
pure virtual

Set component context of this component.

Parameters
contextPtrnew value of component context. It can be also nullptr. Please avoid to use this method, it is designed for internal use only.
parentPtrpointer to parent component, or nullptr if this component has no parent.
isParentOwnerindicate, that life cycle of this component is controller by its parent.

Implemented in icomp::CComponentBase, and icomp::CCompositeComponent.


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

© Witold Gantzke and Kirill Lepskiy