|
ACF $AcfVersion:0$
|
Factory of components used as component member. More...
#include <TFactoryMember.h>
Public Types | |
| typedef TAttributeMember< CFactoryAttribute > | BaseClass |
| typedef CInterfaceManipBase | BaseClass2 |
| typedef Interface | InterfaceType |
| typedef istd::IFactoryInfo::KeyList | KeyList |
Public Types inherited from icomp::TAttributeMember< CFactoryAttribute > | |
| typedef CFactoryAttribute | AttributeType |
| typedef Attribute::ValueType | AttributeValueType |
| typedef void | InterfaceType |
Public Types inherited from istd::IFactoryInfo | |
| typedef QSet< QByteArray > | KeyList |
Public Member Functions | |
| TFactoryMember () | |
| void | Init (const IComponent *ownerPtr, const IRealAttributeStaticInfo &staticInfo) |
| bool | IsValid () const |
| Check if this factory can be resolved. | |
| IComponentUniquePtr | CreateComponent () const |
| Create component without extracting any interface. | |
| virtual istd::TUniqueInterfacePtr< Interface > | CreateInstance (const QByteArray &typeId=QByteArray()) const override |
| virtual KeyList | GetFactoryKeys () const override |
| Returns all possible keys for this factory. | |
Public Member Functions inherited from icomp::TAttributeMember< CFactoryAttribute > | |
| TAttributeMember () | |
| void | Init (const IComponent *ownerPtr, const IRealAttributeStaticInfo &staticInfo) |
| Initialize this attribute. | |
| bool | IsValid () const |
| Check if this attribute is valid. | |
| const CFactoryAttribute * | GetAttributePtr () const |
| Access to internal attribute pointer. | |
| const AttributeValueType & | GetOriginalValue () const |
| Get value of attribute. | |
| const CFactoryAttribute * | operator-> () const |
| Access to internal attribute pointer. | |
| const AttributeValueType & | operator* () const |
| Get value of attribute. | |
Public Member Functions inherited from istd::IPolymorphic | |
| virtual | ~IPolymorphic () |
Static Public Member Functions | |
| static Interface * | ExtractInterface (istd::IPolymorphic *instancePtr, 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 | |
| TFactoryMember (const TFactoryMember &ptr) | |
Protected Member Functions inherited from icomp::TAttributeMember< CFactoryAttribute > | |
| void | SetAttribute (const CFactoryAttribute *attributePtr) |
| bool | InitInternal (const IComponent *ownerPtr, const IRealAttributeStaticInfo &staticInfo, const IComponent **definitionComponentPtr) |
| Internal initialize of attribute. | |
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 23 of file TFactoryMember.h.
| typedef TAttributeMember<CFactoryAttribute> icomp::TFactoryMember< Interface >::BaseClass |
Definition at line 29 of file TFactoryMember.h.
| typedef CInterfaceManipBase icomp::TFactoryMember< Interface >::BaseClass2 |
Definition at line 30 of file TFactoryMember.h.
| typedef Interface icomp::TFactoryMember< Interface >::InterfaceType |
Definition at line 31 of file TFactoryMember.h.
| typedef istd::IFactoryInfo::KeyList icomp::TFactoryMember< Interface >::KeyList |
Definition at line 32 of file TFactoryMember.h.
| icomp::TFactoryMember< Interface >::TFactoryMember | ( | ) |
Definition at line 79 of file TFactoryMember.h.
|
protected |
Definition at line 174 of file TFactoryMember.h.
| IComponentUniquePtr icomp::TFactoryMember< Interface >::CreateComponent | ( | ) | const |
Create component without extracting any interface.
Definition at line 101 of file TFactoryMember.h.
References icomp::ICompositeComponent::CreateSubcomponent(), and NULL.
|
overridevirtual |
Implements istd::TInterfaceFactory< Interface >.
Definition at line 125 of file TFactoryMember.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.
| instancePtr | pointer to component object, typically returned by method CreateComponent(). If it is NULL, this function return also NULL value. |
| subId | optionally ID parameter identifing subcomponent. |
Definition at line 156 of file TFactoryMember.h.
References NULL.
|
overridevirtual |
Returns all possible keys for this factory.
Retrieves the complete set of keys (identifiers) that this factory can use to create objects. Each key corresponds to a specific object type or variant that the factory knows how to instantiate.
Implements istd::IFactoryInfo.
Definition at line 142 of file TFactoryMember.h.
| void icomp::TFactoryMember< Interface >::Init | ( | const IComponent * | ownerPtr, |
| const IRealAttributeStaticInfo & | staticInfo | ||
| ) |
Definition at line 86 of file TFactoryMember.h.
| bool icomp::TFactoryMember< 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 93 of file TFactoryMember.h.
References NULL.