18template <
class BaseClass>
29template <
class BaseClass>
33 if (contextPtr !=
nullptr){
34 QByteArray contextId = contextPtr->GetContextId();
37 if (parentComponentPtr !=
nullptr){
42 if (parentCompositeComponentPtr !=
nullptr){
48 for (IRegistry::Ids::ConstIterator elemIter = elementIds.constBegin(); elemIter != elementIds.constEnd(); ++elemIter){
50 if (subComponentPtr !=
nullptr){
54 contextId = *elemIter;
56 parentComponentPtr = parentCompositeComponentPtr;
67 if (parentComponentPtr !=
nullptr){
68 istd::IChangeable* changeablePtr = ExtractInterface<istd::IChangeable>(clonedComponentPtr.get());
70 clonedPtr.
SetPtr(clonedComponentPtr.release(), changeablePtr);
74 if (clonedPtr->CopyFrom(*
this, mode)){
const IRegistry & GetRegistry() const
virtual IComponentSharedPtr GetSubcomponent(const QByteArray &componentId) const override
Get access to subcomponent using its ID.
virtual IComponentContextSharedPtr GetComponentContext() const override
Get access to component context describing all application-specified component information loaded fro...
virtual const icomp::IComponent * GetParentComponent(bool ownerOnly=false) const =0
Get parent of this component.
virtual IComponentContextSharedPtr GetComponentContext() const =0
Get access to component context describing all application-specified component information loaded fro...
Composite component interface.
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.
Interface representing information stored in component registry.
virtual Ids GetElementIds() const =0
Get ID list of existing elements.
virtual istd::IChangeableUniquePtr CloneMe(istd::IChangeable::CompatibilityMode mode=istd::IChangeable::CM_WITHOUT_REFS) const override
Common interface for data model objects, which can be changed.
CompatibilityMode
Control how relationship betweeen objects are interpreted.
@ CM_WITHOUT_REFS
External references are simple ignored.
@ CM_WITH_REFS
External references are part of object integrity.
@ CM_CONVERT
Data of object are interpreted in context of external references.
bool IsValid() const noexcept
void SetPtr(InterfaceType *interfacePtr)
Package with interfaces and class used for components concept.
std::unique_ptr< IComponent > IComponentUniquePtr
std::shared_ptr< icomp::IComponentContext > IComponentContextSharedPtr
istd::TUniqueInterfacePtr< istd::IChangeable > IChangeableUniquePtr