ICF 3.0.5.47
Technical documentation of ICF Libraries
IRegistry.h
Go to the documentation of this file.
1/********************************************************************************
2** This file is part of the ICF Framework. Copyright (C) Witold Gantzke & Kirill Lepskiy
3** ICF Framework may be used under the terms of the LGPL License v. 2.1 by the Free Software Foundation.
4********************************************************************************/
5
6#pragma once
7
8
9// Qt includes
10#include <QtCore/QByteArray>
11#include <QtCore/QSet>
12#include <QtCore/QMap>
13
14// ICF includes
15#include <iser/ISerializable.h>
18
19
20namespace icomp
21{
22
23
29class IRegistry: virtual public iser::ISerializable
30{
31public:
32 typedef QSet<QByteArray> Ids;
33 typedef std::unique_ptr<IRegistryElement> ElementPtr;
34
46
55
59 typedef std::map<QByteArray, QByteArray> ExportedInterfacesMap;
60
64 typedef std::map<QByteArray, QByteArray> ExportedElementsMap;
65
69 virtual Ids GetElementIds() const = 0;
70
74 virtual const ElementInfo* GetElementInfo(const QByteArray& elementId) const = 0;
75
83 const QByteArray& elementId,
84 const CComponentAddress& address,
85 bool ensureElementCreated = true) = 0;
86
90 virtual bool RemoveElementInfo(const QByteArray& elementId) = 0;
91
97 virtual bool RenameElement(const QByteArray& oldElementId, const QByteArray& newElementId) = 0;
98
104 virtual Ids GetEmbeddedRegistryIds() const = 0;
105
110 virtual IRegistry* GetEmbeddedRegistry(const QByteArray& registryId) const = 0;
111
116 virtual IRegistry* InsertEmbeddedRegistry(const QByteArray& registryId) = 0;
117
122 virtual bool RemoveEmbeddedRegistry(const QByteArray& registryId) = 0;
123
129 virtual bool RenameEmbeddedRegistry(const QByteArray& oldRegistryId, const QByteArray& newRegistryId) = 0;
130
135
139 virtual const ExportedElementsMap& GetExportedElementsMap() const = 0;
140
148 const QByteArray& elementId,
149 const QByteArray& interfaceName,
150 bool state = true) = 0;
151
157 virtual void SetElementExported(
158 const QByteArray& exportId,
159 const QByteArray& elementId) = 0;
160
164 virtual const QString& GetDescription() const = 0;
165
169 virtual void SetDescription(const QString& description) = 0;
170
174 virtual const QString& GetKeywords() const = 0;
175
179 virtual void SetKeywords(const QString& keywords) = 0;
180};
181
182
183} //namespace icomp
184
185
Represents global address of component.
Interface representing information stored in component registry.
Definition IRegistry.h:30
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 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.
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.
ChangeFlags
Change flags.
Definition IRegistry.h:39
virtual ElementInfo * InsertElementInfo(const QByteArray &elementId, const CComponentAddress &address, bool ensureElementCreated=true)=0
Insert new attribute info object to collection of attributes.
QSet< QByteArray > Ids
Definition IRegistry.h:32
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.
std::map< QByteArray, QByteArray > ExportedElementsMap
Map assigning exported sub-component names to internal subcomponent ID's.
Definition IRegistry.h:64
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.
std::unique_ptr< IRegistryElement > ElementPtr
Definition IRegistry.h:33
std::map< QByteArray, QByteArray > ExportedInterfacesMap
Map assigning interface ID (undecorated) to component ID exporting this interface.
Definition IRegistry.h:59
Common class for all classes which objects can be archived or restored from archive.
Package with interfaces and class used for components concept.
Describe information stored with each element.
Definition IRegistry.h:51
CComponentAddress address
Address of component used to create its instance.
Definition IRegistry.h:53
ElementPtr elementPtr
Pointer to registry element.
Definition IRegistry.h:52

© Witold Gantzke and Kirill Lepskiy