CRegistryConsistInfoComp.h
Go to the documentation of this file.
1 #ifndef icmpstr_CRegistryConsistInfoComp_included
2 #define icmpstr_CRegistryConsistInfoComp_included
3 
4 
5 // Qt includes
6 #include <QtCore/QHash>
7 #include <QtGui/QIcon>
8 
10 #include "icomp/CComponentBase.h"
11 
14 
15 
16 namespace icmpstr
17 {
18 
19 
21  public QObject,
22  public icomp::CComponentBase,
23  virtual public IRegistryConsistInfo
24 {
25 public:
27 
28  enum MessageId
29  {
38  };
39 
40  I_BEGIN_COMPONENT(CRegistryConsistInfoComp);
41  I_REGISTER_INTERFACE(IRegistryConsistInfo);
42  I_ASSIGN(m_envManagerCompPtr, "EnvironmentManager", "Allows access to component environment information", true, "EnvironmentManager");
43  I_ASSIGN_TO(m_externalMetaInfoManagerCompPtr, m_envManagerCompPtr, false);
44  I_END_COMPONENT;
45 
46  // reimplemented (icmpstr::IRegistryConsistInfo)
47  virtual icomp::IRegistry::Ids GetCompatibleElements(
48  const icomp::IElementStaticInfo::Ids& interfaceNames,
49  const icomp::IRegistry& registry,
50  int queryFlags) const;
51  virtual bool IsRegistryValid(
52  const icomp::IRegistry& registry,
53  bool ignoreUndef,
54  bool allReasons,
55  ilog::IMessageConsumer* reasonConsumerPtr) const;
56  virtual bool IsElementValid(
57  const QByteArray& elementName,
58  const icomp::IRegistry& registry,
59  bool ignoreUndef,
60  bool allReasons,
61  ilog::IMessageConsumer* reasonConsumerPtr) const;
62  virtual bool IsElementWithInfoValid(
63  const QByteArray& elementName,
64  const icomp::IRegistry::ElementInfo& elementInfo,
65  const icomp::IComponentStaticInfo* metaInfoPtr,
66  const icomp::IRegistry& registry,
67  bool ignoreUndef,
68  bool allReasons,
69  ilog::IMessageConsumer* reasonConsumerPtr) const;
70  virtual bool IsAttributeValid(
71  const QByteArray& attributeName,
72  const QByteArray& elementName,
73  const icomp::IRegistry& registry,
74  bool ignoreUndef,
75  bool allReasons,
76  ilog::IMessageConsumer* reasonConsumerPtr) const;
77  virtual QIcon GetComponentIcon(const icomp::CComponentAddress& address) const;
78 
79 protected:
86  icomp::IRegistry::Ids GetCompatibleIds(
87  const QByteArray& elementId,
88  const icomp::IElementStaticInfo& elementStaticInfo,
89  const icomp::IElementStaticInfo::Ids& interfaceNames,
90  int queryFlags,
91  bool subcomponentsFlag) const;
93  const iser::IObject& attribute,
94  const icomp::IAttributeStaticInfo& attributeMetaInfo,
95  const QByteArray& attributeName,
96  const QByteArray& elementName,
97  const icomp::IRegistry& registry,
98  bool ignoreUndef,
99  bool allReasons,
100  ilog::IMessageConsumer* reasonConsumerPtr) const;
102  const QByteArray& pointedElementName,
103  const icomp::IElementStaticInfo::Ids& interfaceNames,
104  const icomp::IElementStaticInfo::Ids& optionalInterfaceNames,
105  const QByteArray& attributeName,
106  const QByteArray& elementName,
107  const icomp::IRegistry& registry,
108  bool ignoreUndef,
109  ilog::IMessageConsumer* reasonConsumerPtr) const;
111  const QByteArray& pointedElementName,
112  const icomp::IElementStaticInfo* pointedMetaInfoPtr,
113  const icomp::IElementStaticInfo::Ids& interfaceNames,
114  const icomp::IElementStaticInfo::Ids& optionalInterfaceNames,
115  const QByteArray& attributeName,
116  const QByteArray& elementName,
117  bool ignoreUndef,
118  ilog::IMessageConsumer* reasonConsumerPtr) const;
119 
120 private:
121  I_REF(icomp::IComponentEnvironmentManager, m_envManagerCompPtr);
122  I_REF(IExternalMetaInfoManager, m_externalMetaInfoManagerCompPtr);
123 
124  typedef QMap<icomp::CComponentAddress, QIcon> IconCache;
125  mutable IconCache m_iconCache;
126 };
127 
128 
129 } // namespace icmpstr
130 
131 
132 #endif // !icmpstr_CRegistryConsistInfoComp_included
133 
134 
virtual QIcon GetComponentIcon(const icomp::CComponentAddress &address) const
Get icon of component.
bool CheckPointedElementInfoCompatibility(const QByteArray &pointedElementName, const icomp::IElementStaticInfo *pointedMetaInfoPtr, const icomp::IElementStaticInfo::Ids &interfaceNames, const icomp::IElementStaticInfo::Ids &optionalInterfaceNames, const QByteArray &attributeName, const QByteArray &elementName, bool ignoreUndef, ilog::IMessageConsumer *reasonConsumerPtr) const
bool CheckPointedElementCompatibility(const QByteArray &pointedElementName, const icomp::IElementStaticInfo::Ids &interfaceNames, const icomp::IElementStaticInfo::Ids &optionalInterfaceNames, const QByteArray &attributeName, const QByteArray &elementName, const icomp::IRegistry &registry, bool ignoreUndef, ilog::IMessageConsumer *reasonConsumerPtr) const
virtual bool IsAttributeValid(const QByteArray &attributeName, const QByteArray &elementName, const icomp::IRegistry &registry, bool ignoreUndef, bool allReasons, ilog::IMessageConsumer *reasonConsumerPtr) const
Check if attribute is valid.
bool CheckAttributeCompatibility(const iser::IObject &attribute, const icomp::IAttributeStaticInfo &attributeMetaInfo, const QByteArray &attributeName, const QByteArray &elementName, const icomp::IRegistry &registry, bool ignoreUndef, bool allReasons, ilog::IMessageConsumer *reasonConsumerPtr) const
virtual bool IsElementValid(const QByteArray &elementName, const icomp::IRegistry &registry, bool ignoreUndef, bool allReasons, ilog::IMessageConsumer *reasonConsumerPtr) const
Check if element is valid.
virtual bool IsRegistryValid(const icomp::IRegistry &registry, bool ignoreUndef, bool allReasons, ilog::IMessageConsumer *reasonConsumerPtr) const
Check if registry is valid.
I_ASSIGN_TO(m_externalMetaInfoManagerCompPtr, m_envManagerCompPtr, false)
icomp::IRegistry::Ids GetCompatibleIds(const QByteArray &elementId, const icomp::IElementStaticInfo &elementStaticInfo, const icomp::IElementStaticInfo::Ids &interfaceNames, int queryFlags, bool subcomponentsFlag) const
Get list of compatible element ID's.
virtual bool IsElementWithInfoValid(const QByteArray &elementName, const icomp::IRegistry::ElementInfo &elementInfo, const icomp::IComponentStaticInfo *metaInfoPtr, const icomp::IRegistry &registry, bool ignoreUndef, bool allReasons, ilog::IMessageConsumer *reasonConsumerPtr) const
virtual icomp::IRegistry::Ids GetCompatibleElements(const icomp::IElementStaticInfo::Ids &interfaceNames, const icomp::IRegistry &registry, int queryFlags) const
Get list of compatible element names.

© 2007-2011 Witold Gantzke and Kirill Lepskiy