ACF $AcfVersion:0$
ICompositeComponent.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ACF-Commercial
2#pragma once
3
4
5// ACF includes
6#include <icomp/IComponent.h>
7
8
9namespace icomp
10{
11
12
19class ICompositeComponent: virtual public IComponent
20{
21public:
25 virtual IComponentSharedPtr GetSubcomponent(const QByteArray& componentId) const = 0;
26
31 virtual IComponentContextSharedPtr GetSubcomponentContext(const QByteArray& componentId) const = 0;
32
36 virtual IComponentUniquePtr CreateSubcomponent(const QByteArray& componentId) const = 0;
37
42 virtual void OnSubcomponentDeleted(const IComponent* subcomponentPtr) = 0;
43};
44
45
46} // namespace icomp
47
48
Main component interface.
Definition IComponent.h:32
Composite component interface.
virtual void OnSubcomponentDeleted(const IComponent *subcomponentPtr)=0
Called if subcomponent is removed from memory.
virtual IComponentContextSharedPtr GetSubcomponentContext(const QByteArray &componentId) const =0
Get access to context of subcomponent using its ID.
virtual IComponentUniquePtr CreateSubcomponent(const QByteArray &componentId) const =0
Create instance of subcomponent using its ID.
virtual IComponentSharedPtr GetSubcomponent(const QByteArray &componentId) const =0
Get access to subcomponent using its ID.
Package with interfaces and class used for components concept.
std::unique_ptr< IComponent > IComponentUniquePtr
Definition IComponent.h:72
std::shared_ptr< icomp::IComponentContext > IComponentContextSharedPtr
std::shared_ptr< IComponent > IComponentSharedPtr
Definition IComponent.h:71