CCompositeComponentStaticInfo.h
Go to the documentation of this file.
1 #ifndef icomp_CCompositeComponentStaticInfo_included
2 #define icomp_CCompositeComponentStaticInfo_included
3 
4 
5 // Qt includes
6 #include <QtCore/QMap>
7 
8 // ACF includes
9 #include <istd/TDelPtr.h>
10 
12 #include <icomp/IRegistry.h>
14 
15 
16 namespace icomp
17 {
18 
19 
20 class IComponentEnvironmentManager;
21 class IRegistriesManager;
22 
23 
25 {
26 public:
28  const IRegistry& registry,
30  const IComponentStaticInfo* parentPtr = NULL);
31 
32  const IRegistry& GetRegistry() const;
33 
34  // reimplemented (icomp::IRealComponentStaticInfo)
35  virtual IComponent* CreateComponent() const;
36 
37  // reimplemented (icomp::IComponentStaticInfo)
38  virtual int GetComponentType() const;
39  virtual const IComponentStaticInfo* GetEmbeddedComponentInfo(const QByteArray& embeddedId) const;
40  virtual const QString& GetDescription() const;
41  virtual const QString& GetKeywords() const;
42 
43 protected:
48  const IRegistry& registry,
49  const QByteArray& elementId,
50  const icomp::IRegistriesManager& manager) const;
51 
53  {
54  public:
56  const IAttributeStaticInfo* slavePtr,
57  const iser::IObject* defaultValuePtr);
58 
59  // reimplemented (icomp::IAttributeStaticInfo)
60  virtual IElementStaticInfo::Ids GetRelatedMetaIds(int metaGroupId, int flags, int flagsMask) const;
61 
62  // reimplemented (iattr::IAttributeMetaInfo)
63  virtual QString GetAttributeDescription() const;
64  virtual const iser::IObject* GetAttributeDefaultValue() const;
65  virtual QByteArray GetAttributeTypeId() const;
66  virtual int GetAttributeFlags() const;
67 
68  private:
69  const IAttributeStaticInfo& m_slave;
70  const iser::IObject* m_defaultValuePtr;
71  };
72 
73 private:
75  typedef QMap<const IAttributeStaticInfo*, AttrMetaInfoPtr> AttrReplacers;
76  AttrReplacers m_attrReplacers;
77 
79  typedef QMap<QByteArray, ComponentInfoPtr> EmbeddedComponentInfos;
80  mutable EmbeddedComponentInfos m_embeddedComponentInfos;
81 
82  QString m_description;
83  QString m_keywords;
84 
85  const icomp::IRegistry& m_registry;
86 };
87 
88 
89 } // namespace icomp
90 
91 
92 #endif // !icomp_CCompositeComponentStaticInfo_included
93 
94 
virtual QByteArray GetAttributeTypeId() const
Return attribute type ID.
virtual const QString & GetDescription() const
Get human readable description of this component.
Main component interface.
Definition: IComponent.h:31
Interface representing information stored in component registry.
Definition: IRegistry.h:30
Common interface for factorisable model objects.
Definition: IObject.h:19
virtual QString GetAttributeDescription() const
Get description of this attribute.
Standard implementation of static info for base component classes.
AttrAsOptionalDelegator(const IAttributeStaticInfo *slavePtr, const iser::IObject *defaultValuePtr)
virtual IComponent * CreateComponent() const
Create component instance.
#define NULL
Definition: istd.h:64
Describe information stored with each element.
Definition: IRegistry.h:51
const IRegistry & GetRegistry() const
virtual int GetAttributeFlags() const
Get flags of this attribute.
CCompositeComponentStaticInfo(const IRegistry &registry, const icomp::IComponentEnvironmentManager &manager, const IComponentStaticInfo *parentPtr=NULL)
virtual int GetComponentType() const
Get information about component type.
Allow access to registries defined by composed components.
virtual const iser::IObject * GetAttributeDefaultValue() const
Get default attribute value.
const IRegistry::ElementInfo * GetElementInfoFromRegistry(const IRegistry &registry, const QByteArray &elementId, const icomp::IRegistriesManager &manager) const
Get the element info for the given element ID.
Describe component attribute static information.
virtual IElementStaticInfo::Ids GetRelatedMetaIds(int metaGroupId, int flags, int flagsMask) const
Get related meta information.
virtual const QString & GetKeywords() const
Get keywords for this component.
This interface provide static information about component meta info.
Pointer wrapper providing automatic deleting pointed object during destruction.
Definition: TDelPtr.h:20
virtual const IComponentStaticInfo * GetEmbeddedComponentInfo(const QByteArray &embeddedId) const
Return number of interfaces for specific slot.

© 2007-2017 Witold Gantzke and Kirill Lepskiy