ACF $AcfVersion:0$
IRegistry.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// Qt includes
6#include <QtCore/QByteArray>
7#include <QtCore/QSet>
8#include <QtCore/QMap>
9
10// ACF includes
11#include <istd/TDelPtr.h>
12#include <iser/ISerializable.h>
15
16
17namespace icomp
18{
19
20
47class IRegistry: virtual public iser::ISerializable
48{
49public:
50 typedef QSet<QByteArray> Ids;
52
64
73
77 typedef QMap<QByteArray, QByteArray> ExportedInterfacesMap;
78
82 typedef QMap<QByteArray, QByteArray> ExportedElementsMap;
83
87 virtual Ids GetElementIds() const = 0;
88
92 virtual const ElementInfo* GetElementInfo(const QByteArray& elementId) const = 0;
93
101 const QByteArray& elementId,
102 const icomp::CComponentAddress& address,
103 bool ensureElementCreated = true) = 0;
104
108 virtual bool RemoveElementInfo(const QByteArray& elementId) = 0;
109
115 virtual bool RenameElement(const QByteArray& oldElementId, const QByteArray& newElementId) = 0;
116
122 virtual Ids GetEmbeddedRegistryIds() const = 0;
123
128 virtual IRegistry* GetEmbeddedRegistry(const QByteArray& registryId) const = 0;
129
134 virtual IRegistry* InsertEmbeddedRegistry(const QByteArray& registryId) = 0;
135
140 virtual bool RemoveEmbeddedRegistry(const QByteArray& registryId) = 0;
141
147 virtual bool RenameEmbeddedRegistry(const QByteArray& oldRegistryId, const QByteArray& newRegistryId) = 0;
148
153
157 virtual const ExportedElementsMap& GetExportedElementsMap() const = 0;
158
166 const QByteArray& elementId,
167 const QByteArray& interfaceName,
168 bool state = true) = 0;
169
175 virtual void SetElementExported(
176 const QByteArray& exportId,
177 const QByteArray& elementId) = 0;
178
182 virtual const QString& GetDescription() const = 0;
183
187 virtual void SetDescription(const QString& description) = 0;
188
192 virtual const QString& GetKeywords() const = 0;
193
197 virtual void SetKeywords(const QString& keywords) = 0;
198};
199
200
201} //namespace icomp
202
203
Represents global address of component.
Interface representing information stored in component registry.
Definition IRegistry.h:48
virtual IRegistry * InsertEmbeddedRegistry(const QByteArray &registryId)=0
Insert embedded registry with specified ID.
virtual void SetKeywords(const QString &keywords)=0
Set keywords for this registry used for search.
virtual const ExportedElementsMap & GetExportedElementsMap() const =0
Get access to map used to convert exported sub-elements to internal sub-element ID's.
virtual bool RemoveEmbeddedRegistry(const QByteArray &registryId)=0
Remove embedded registry with specified ID.
virtual bool RenameElement(const QByteArray &oldElementId, const QByteArray &newElementId)=0
Rename an registry element.
virtual ElementInfo * InsertElementInfo(const QByteArray &elementId, const icomp::CComponentAddress &address, bool ensureElementCreated=true)=0
Insert new attribute info object to collection of attributes.
virtual const QString & GetKeywords() const =0
Get keywords for this registry used for search.
virtual const ExportedInterfacesMap & GetExportedInterfacesMap() const =0
Get access to information structure of exported interfaces.
virtual Ids GetEmbeddedRegistryIds() const =0
Get list of IDs of embedded registries.
QSet< QByteArray > Ids
Definition IRegistry.h:50
QMap< QByteArray, QByteArray > ExportedInterfacesMap
Map assigning interface ID (undecorated) to component ID exporting this interface.
Definition IRegistry.h:77
virtual void SetDescription(const QString &description)=0
set human readable description of this registry.
virtual const ElementInfo * GetElementInfo(const QByteArray &elementId) const =0
Get access to stored attribute info structure.
QMap< QByteArray, QByteArray > ExportedElementsMap
Map assigning exported sub-component names to internal subcomponent ID's.
Definition IRegistry.h:82
ChangeFlags
Change flags.
Definition IRegistry.h:57
istd::TDelPtr< IRegistryElement > ElementPtr
Definition IRegistry.h:51
virtual void SetElementInterfaceExported(const QByteArray &elementId, const QByteArray &interfaceName, bool state=true)=0
Enable or disable exporting single or all interfaces of element.
virtual bool RemoveElementInfo(const QByteArray &elementId)=0
Removes attribute info structure from this collection.
virtual const QString & GetDescription() const =0
Get human readable description of this registry.
virtual void SetElementExported(const QByteArray &exportId, const QByteArray &elementId)=0
Set element to be exported.
virtual Ids GetElementIds() const =0
Get ID list of existing elements.
virtual bool RenameEmbeddedRegistry(const QByteArray &oldRegistryId, const QByteArray &newRegistryId)=0
Rename a embedded registry.
virtual IRegistry * GetEmbeddedRegistry(const QByteArray &registryId) const =0
Get access to embedded registry using its ID.
Common class for all classes which objects can be archived or restored from archive.
Pointer wrapper providing automatic deleting pointed object during destruction.
Definition TDelPtr.h:21
Package with interfaces and class used for components concept.
Describe information stored with each element.
Definition IRegistry.h:69
icomp::CComponentAddress address
Address of component used to create its instance.
Definition IRegistry.h:71
ElementPtr elementPtr
Pointer to registry element.
Definition IRegistry.h:70