IRegistry.h
Go to the documentation of this file.
1 #ifndef icomp_IRegistry_included
2 #define icomp_IRegistry_included
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 
13 #include <iser/ISerializable.h>
14 
15 #include <icomp/IRegistryElement.h>
17 
18 
19 namespace icomp
20 {
21 
22 
30 class IRegistry: virtual public iser::ISerializable
31 {
32 public:
33  typedef QSet<QByteArray> Ids;
35 
40  {
41  CF_ELEMENT_ADDED = 0xf72390,
46  };
47 
51  struct ElementInfo
52  {
55  };
56 
60  typedef QMap<QByteArray, QByteArray> ExportedInterfacesMap;
61 
65  typedef QMap<QByteArray, QByteArray> ExportedElementsMap;
66 
70  virtual Ids GetElementIds() const = 0;
71 
75  virtual const ElementInfo* GetElementInfo(const QByteArray& elementId) const = 0;
76 
84  const QByteArray& elementId,
85  const icomp::CComponentAddress& address,
86  bool ensureElementCreated = true) = 0;
87 
91  virtual bool RemoveElementInfo(const QByteArray& elementId) = 0;
92 
98  virtual bool RenameElement(const QByteArray& oldElementId, const QByteArray& newElementId) = 0;
99 
105  virtual Ids GetEmbeddedRegistryIds() const = 0;
106 
111  virtual IRegistry* GetEmbeddedRegistry(const QByteArray& registryId) const = 0;
112 
117  virtual IRegistry* InsertEmbeddedRegistry(const QByteArray& registryId) = 0;
118 
123  virtual bool RemoveEmbeddedRegistry(const QByteArray& registryId) = 0;
124 
130  virtual bool RenameEmbeddedRegistry(const QByteArray& oldRegistryId, const QByteArray& newRegistryId) = 0;
131 
135  virtual const ExportedInterfacesMap& GetExportedInterfacesMap() const = 0;
136 
140  virtual const ExportedElementsMap& GetExportedElementsMap() const = 0;
141 
148  virtual void SetElementInterfaceExported(
149  const QByteArray& elementId,
150  const QByteArray& interfaceName,
151  bool state = true) = 0;
152 
158  virtual void SetElementExported(
159  const QByteArray& exportId,
160  const QByteArray& elementId) = 0;
161 
165  virtual const QString& GetDescription() const = 0;
166 
170  virtual void SetDescription(const QString& description) = 0;
171 
175  virtual const QString& GetKeywords() const = 0;
176 
180  virtual void SetKeywords(const QString& keywords) = 0;
181 };
182 
183 
184 } //namespace icomp
185 
186 
187 #endif // !icomp_IRegistry_included
188 
189 
Represents global address of component.
QMap< QByteArray, QByteArray > ExportedInterfacesMap
Map assigning interface ID (undecorated) to component ID exporting this interface.
Definition: IRegistry.h:60
virtual void SetElementExported(const QByteArray &exportId, const QByteArray &elementId)=0
Set element to be exported.
Interface representing information stored in component registry.
Definition: IRegistry.h:30
ElementPtr elementPtr
Pointer to registry element.
Definition: IRegistry.h:53
Common class for all classes which objects can be archived or restored from archive.
Definition: ISerializable.h:23
virtual const ExportedInterfacesMap & GetExportedInterfacesMap() const =0
Get access to information structure of exported interfaces.
virtual const QString & GetKeywords() const =0
Get keywords for this registry used for search.
ChangeFlags
Change flags.
Definition: IRegistry.h:39
virtual void SetDescription(const QString &description)=0
set human readable description of this registry.
virtual ElementInfo * InsertElementInfo(const QByteArray &elementId, const icomp::CComponentAddress &address, bool ensureElementCreated=true)=0
Insert new attribute info object to collection of attributes.
virtual void SetKeywords(const QString &keywords)=0
Set keywords for this registry used for search.
istd::TDelPtr< IRegistryElement > ElementPtr
Definition: IRegistry.h:34
virtual IRegistry * GetEmbeddedRegistry(const QByteArray &registryId) const =0
Get access to embedded registry using its ID.
virtual void SetElementInterfaceExported(const QByteArray &elementId, const QByteArray &interfaceName, bool state=true)=0
Enable or disable exporting single or all interfaces of element.
Describe information stored with each element.
Definition: IRegistry.h:51
virtual const QString & GetDescription() const =0
Get human readable description of this registry.
virtual const ElementInfo * GetElementInfo(const QByteArray &elementId) const =0
Get access to stored attribute info structure.
virtual bool RenameEmbeddedRegistry(const QByteArray &oldRegistryId, const QByteArray &newRegistryId)=0
Rename a embedded registry.
QSet< QByteArray > Ids
Definition: IRegistry.h:33
icomp::CComponentAddress address
Address of component used to create its instance.
Definition: IRegistry.h:54
virtual const ExportedElementsMap & GetExportedElementsMap() const =0
Get access to map used to convert exported sub-elements to internal sub-element ID's.
virtual Ids GetEmbeddedRegistryIds() const =0
Get list of IDs of embedded registries.
QMap< QByteArray, QByteArray > ExportedElementsMap
Map assigning exported sub-component names to internal subcomponent ID's.
Definition: IRegistry.h:65
virtual bool RemoveElementInfo(const QByteArray &elementId)=0
Removes attribute info structure from this collection.
virtual Ids GetElementIds() const =0
Get ID list of existing elements.
virtual IRegistry * InsertEmbeddedRegistry(const QByteArray &registryId)=0
Insert embedded registry with specified ID.
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.

© 2007-2017 Witold Gantzke and Kirill Lepskiy