|
ACF $AcfVersion:0$
|
Factory of components used as component member. More...
#include <TMultiFactoryMember.h>
Public Types | |
| typedef TMultiAttributeMember< CMultiFactoryAttribute > | BaseClass |
| typedef CInterfaceManipBase | BaseClass2 |
| typedef Interface | InterfaceType |
Public Types inherited from icomp::TMultiAttributeMember< CMultiFactoryAttribute > | |
| typedef CMultiFactoryAttribute | AttributeType |
| typedef Attribute::ValueType | AttributeValueType |
| typedef void | InterfaceType |
Public Member Functions | |
| TMultiFactoryMember () | |
| void | Init (const IComponent *ownerPtr, const IRealAttributeStaticInfo &staticInfo) |
| bool | IsValid () const |
| Check if this factory can be resolved. | |
| icomp::IComponentUniquePtr | CreateComponent (int index) const |
| Create component for specified index without extracting any interface. | |
| istd::TUniqueInterfacePtr< Interface > | CreateInstance (int index) const |
| Create instance of interface for specified index. | |
Public Member Functions inherited from icomp::TMultiAttributeMember< CMultiFactoryAttribute > | |
| TMultiAttributeMember () | |
| void | Init (const IComponent *ownerPtr, const IRealAttributeStaticInfo &staticInfo) |
| Internal initialize of attribute. | |
| bool | IsValid () const |
| Check if this attribute is valid. | |
| int | GetCount () const |
| Get number of attributes. | |
| const AttributeValueType & | operator[] (int index) const |
| Access to object pointed by internal pointer. | |
| int | FindValue (const AttributeValueType &value) const |
| Find attribute value. | |
Static Public Member Functions | |
| static Interface * | ExtractInterface (IComponent *componentPtr, const QByteArray &subId="") |
| Extract interface from some component. | |
Static Public Member Functions inherited from istd::CIdManipBase | |
| 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. | |
Protected Member Functions | |
| TMultiFactoryMember (const TMultiFactoryMember &ptr) | |
Protected Member Functions inherited from icomp::TMultiAttributeMember< CMultiFactoryAttribute > | |
| bool | InitInternal (const IComponent *ownerPtr, const IRealAttributeStaticInfo &staticInfo, const IComponent **definitionComponentPtr) |
Additional Inherited Members | |
Static Protected Member Functions inherited from icomp::CInterfaceManipBase | |
| template<class Interface > | |
| static Interface * | ExtractInterface (IComponent *componentPtr, const QByteArray &subId="") |
| Extract interface from component. | |
Factory of components used as component member.
Don't use direct this class, use macros I_FACT and I_ASSIGN instead.
Definition at line 22 of file TMultiFactoryMember.h.
| typedef TMultiAttributeMember<CMultiFactoryAttribute> icomp::TMultiFactoryMember< Interface >::BaseClass |
Definition at line 25 of file TMultiFactoryMember.h.
| typedef CInterfaceManipBase icomp::TMultiFactoryMember< Interface >::BaseClass2 |
Definition at line 26 of file TMultiFactoryMember.h.
| typedef Interface icomp::TMultiFactoryMember< Interface >::InterfaceType |
Definition at line 27 of file TMultiFactoryMember.h.
| icomp::TMultiFactoryMember< Interface >::TMultiFactoryMember | ( | ) |
Definition at line 74 of file TMultiFactoryMember.h.
|
protected |
Definition at line 146 of file TMultiFactoryMember.h.
| icomp::IComponentUniquePtr icomp::TMultiFactoryMember< Interface >::CreateComponent | ( | int | index | ) | const |
Create component for specified index without extracting any interface.
Definition at line 96 of file TMultiFactoryMember.h.
References icomp::ICompositeComponent::CreateSubcomponent(), and NULL.
| istd::TUniqueInterfacePtr< Interface > icomp::TMultiFactoryMember< Interface >::CreateInstance | ( | int | index | ) | const |
Create instance of interface for specified index.
This is combination of the methods CreateComponent and ExtractInterface provided for convinience, if only one interface is asked in factorisied objects.
Definition at line 120 of file TMultiFactoryMember.h.
References NULL.
|
static |
Extract interface from some component.
Type of extracted interface is specified by template parameter of this class. If you want to force some factory to support more interfaces, you should simply define multiply I_FACT members with the same ID, factorise instances with any of them and extract specified interfaces using this method.
| componentPtr | pointer to component object, typically returned by method CreateComponent(). |
| subId | optionally ID parameter identifing subcomponent. |
Definition at line 137 of file TMultiFactoryMember.h.
| void icomp::TMultiFactoryMember< Interface >::Init | ( | const IComponent * | ownerPtr, |
| const IRealAttributeStaticInfo & | staticInfo | ||
| ) |
Definition at line 81 of file TMultiFactoryMember.h.
| bool icomp::TMultiFactoryMember< Interface >::IsValid | ( | ) | const |
Check if this factory can be resolved.
Please note, that it gives no guarantee, that objects can be factorised.
Definition at line 88 of file TMultiFactoryMember.h.
References NULL.