21template <
class Interface>
73template <
class Interface>
75: m_definitionComponentPtr(
NULL)
80template <
class Interface>
83 BaseClass::InitInternal(ownerPtr, staticInfo, &m_definitionComponentPtr);
87template <
class Interface>
90 return (m_definitionComponentPtr !=
NULL) && BaseClass::IsValid();
95template <
class Interface>
98 if ((m_definitionComponentPtr !=
NULL) && BaseClass::IsValid()){
100 if (parentPtr !=
NULL){
101 const QByteArray& componentId = BaseClass::operator[](index);
105 BaseClass2::SplitId(componentId, baseId, subId);
106 Q_ASSERT(subId.isEmpty());
111 qCritical(
"Component %s is defined, but definition component has no parent", BaseClass::operator[](index).constData());
119template <
class Interface>
123 if (newComponentPtr !=
nullptr) {
124 Interface* retVal = BaseClass2::ExtractInterface<Interface>(newComponentPtr.get());
125 if (retVal !=
NULL) {
136template <
class Interface>
139 return BaseClass2::ExtractInterface<Interface>(componentPtr, subId);
145template <
class Interface>
148 m_definitionComponentPtr(ptr.m_definitionComponentPtr)
Main component interface.
Composite component interface.
virtual IComponentUniquePtr CreateSubcomponent(const QByteArray &componentId) const =0
Create instance of subcomponent using its ID.
Interface adding to attribute static info functionality existing only for real attributes.
Pointer to component attribute.
Factory of components used as component member.
icomp::IComponentUniquePtr CreateComponent(int index) const
Create component for specified index without extracting any interface.
bool IsValid() const
Check if this factory can be resolved.
CInterfaceManipBase BaseClass2
istd::TUniqueInterfacePtr< Interface > CreateInstance(int index) const
Create instance of interface for specified index.
TMultiAttributeMember< CMultiFactoryAttribute > BaseClass
void Init(const IComponent *ownerPtr, const IRealAttributeStaticInfo &staticInfo)
static Interface * ExtractInterface(IComponent *componentPtr, const QByteArray &subId="")
Extract interface from some component.
Unique ownership smart pointer for interface types.
Package with interfaces and class used for components concept.
std::unique_ptr< IComponent > IComponentUniquePtr