10#include <QtCore/QByteArray>
26class IMetaInfoManager;
40 template <
class InterfaceType>
77 const QByteArray& componentId,
93 bool isComponentInitialized =
false;
102 bool isContextInitialized =
false;
105 typedef std::map< QByteArray, ComponentInfo> ComponentMap;
106 mutable ComponentMap m_componentMap;
110 bool m_isParentOwner;
112 bool m_manualAutoInit;
114 mutable bool m_autoInitialized;
121template <
class InterfaceType>
126 return static_cast<InterfaceType*
>(
GetInterface(info, subId));
virtual void SetComponentContext(const IComponentContext *contextPtr, const ICompositeComponent *parentPtr, bool isParentOwner)
Set component context of this component.
std::unique_ptr< IComponentContext > ContextPtr
virtual std::unique_ptr< IComponent > CreateSubcomponent(const QByteArray &componentId) const
Create instance of subcomponent using its ID.
virtual void OnSubcomponentDeleted(const IComponent *subcomponentPtr)
Called if subcomponent is removed from memory.
virtual const IComponentContext * GetComponentContext() const
Get access to component context describing all application-specified component information loaded fro...
bool CreateSubcomponentInfo(const QByteArray &componentId, ContextPtr &subContextPtr, ComponentPtr *subComponentPtr, bool isOwned) const
Create information objects and subcomponent.
CCompositeComponent(bool manualAutoInit)
virtual void * GetInterface(const istd::CClassInfo &interfaceType, const QByteArray &subId="")
Get access to specified component interface.
bool EnsureAutoInitComponentsCreated() const
Make sure, all components with flag 'AutoInit' are initialized.
InterfaceType * GetComponentInterface(const QByteArray &subId="")
Get interface implemented by this composite component.
virtual const IComponentContext * GetSubcomponentContext(const QByteArray &componentId) const
Get access to context of subcomponent using its ID.
virtual ~CCompositeComponent()
std::unique_ptr< IComponent > ComponentPtr
virtual const ICompositeComponent * GetParentComponent(bool ownerOnly=false) const
Get parent of this component.
virtual IComponent * GetSubcomponent(const QByteArray &componentId) const
Get access to subcomponent using its ID.
Provide session context of component.
Main component interface.
Composite component interface.
Represents platform independent type info and provide set of static class manipulation functions.
Package with interfaces and class used for components concept.