CRegistryElement.h
Go to the documentation of this file.
1 #ifndef icomp_CRegistryElement_included
2 #define icomp_CRegistryElement_included
3 
4 
5 // Qt includes
6 #include <QtCore/QByteArray>
7 #include <QtCore/QMap>
8 
9 // ACF includes
10 #include <icomp/IRegistryElement.h>
11 
12 
13 namespace icomp
14 {
15 
16 
17 class IAttributeStaticInfo;
18 
19 
20 class CRegistryElement: virtual public IRegistryElement
21 {
22 public:
24 
25  virtual AttributeInfo* GetAttributeInfo(const QByteArray& attributeId);
26 
27  // reimplemented (icomp::IRegistryElement)
28  virtual quint32 GetElementFlags() const;
29  virtual void SetElementFlags(quint32 flags);
30  virtual AttributeInfo* InsertAttributeInfo(const QByteArray& attributeId, const QByteArray& attributeType);
31  virtual iser::IObject* CreateAttribute(const QByteArray& attributeType) const;
32  virtual const AttributeInfo* GetAttributeInfo(const QByteArray& attributeId) const;
33  virtual bool RemoveAttribute(const QByteArray& attributeId);
34 
35  // reimplemented (iattr::IAttributesProvider)
36  virtual AttributeIds GetAttributeIds() const;
37  virtual iser::IObject* GetAttribute(const QByteArray& attributeId) const;
38 
39  // reimplemented (iser::ISerializable)
40  virtual bool Serialize(iser::IArchive& archive);
41 
42 protected:
43  iser::IObject* CreateAttributeIntern(const QByteArray& attributeType) const;
44 
45 private:
46  quint32 m_elementFlags;
47 
48  typedef QMap<QByteArray, AttributeInfo> AttributeInfoMap;
49  AttributeInfoMap m_attributeInfos;
50 };
51 
52 
53 } // namespace icomp
54 
55 
56 #endif // !icomp_CRegistryElement_included
57 
58 
virtual void SetElementFlags(quint32 flags)
Set flags of this registry element.
virtual iser::IObject * CreateAttribute(const QByteArray &attributeType) const
Create attribute object for specified ID.
virtual quint32 GetElementFlags() const
Get flags of this registry element.
virtual bool Serialize(iser::IArchive &archive)
Load or store state of this object as a archive stream.
Common interface for factorisable model objects.
Definition: IObject.h:19
virtual AttributeInfo * InsertAttributeInfo(const QByteArray &attributeId, const QByteArray &attributeType)
Insert new attribute info object to collection of attributes.
virtual bool RemoveAttribute(const QByteArray &attributeId)
Removes attribute info structure from this collection.
Represent input/output persistence archive.
Definition: IArchive.h:30
virtual AttributeIds GetAttributeIds() const
Get list of all attribute IDs.
virtual iser::IObject * GetAttribute(const QByteArray &attributeId) const
Get property with the given index.
Represents element of registry describing component parameters.
QSet< QByteArray > AttributeIds
iser::IObject * CreateAttributeIntern(const QByteArray &attributeType) const
Describe information stored with each attribute.
virtual AttributeInfo * GetAttributeInfo(const QByteArray &attributeId)

© 2007-2017 Witold Gantzke and Kirill Lepskiy