CComponentHelpFileProviderComp.h
Go to the documentation of this file.
1 #ifndef icmpstr_CComponentHelpFileProviderComp_included
2 #define icmpstr_CComponentHelpFileProviderComp_included
3 
4 
8 #include "icomp/CComponentBase.h"
10 
11 #include "idoc/IHelpFileProvider.h"
12 
14 
15 
16 namespace icmpstr
17 {
18 
19 
21  public icomp::CComponentBase,
22  virtual public idoc::IHelpFileProvider
23 {
24 public:
26 
27  I_BEGIN_COMPONENT(CComponentHelpFileProviderComp);
28  I_REGISTER_INTERFACE(idoc::IHelpFileProvider);
29  I_ASSIGN(m_slaveProviderCompPtr, "SlaveProvider", "Slave help file provider used if no class description is found", false, "SlaveProvider");
30  I_ASSIGN(m_metaInfoManagerCompPtr, "MetaInfoManager", "Allows access to component meta information", true, "MetaInfoManager");
31  I_ASSIGN_TO(m_externalMetaInfoManagerCompPtr, m_metaInfoManagerCompPtr, false);
32  I_ASSIGN(m_helpFileNameAttrPtr, "HelpFileName", "Name of help file in component info directory", true, "ShortDescription.html");
33  I_END_COMPONENT;
34 
35  // reimplemented (idoc::IHelpFileProvider)
36  virtual double GetHelpQuality(const QString& contextText, const istd::IPolymorphic* contextObjectPtr) const;
37  virtual QString GetHelpFilePath(const QString& contextText, const istd::IPolymorphic* contextObjectPtr) const;
38 
39 protected:
40  virtual QString GetInfoFilePath(const icomp::CComponentAddress& componentAddress) const;
41  virtual QString GetHelpFilePath(const icomp::CComponentAddress& componentAddress) const;
42 
43  bool ExtractComponentAddress(const QString& contextText, const istd::IPolymorphic* contextObjectPtr, icomp::CComponentAddress& result) const;
44 
45 private:
46  I_REF(idoc::IHelpFileProvider, m_slaveProviderCompPtr);
47  I_REF(icomp::IMetaInfoManager, m_metaInfoManagerCompPtr);
48  I_REF(IExternalMetaInfoManager, m_externalMetaInfoManagerCompPtr);
49  I_ATTR(QString, m_helpFileNameAttrPtr);
50 };
51 
52 
53 } // namespace icmpstr
54 
55 
56 #endif // !icmpstr_CComponentHelpFileProviderComp_included
57 
58 
virtual QString GetInfoFilePath(const icomp::CComponentAddress &componentAddress) const
virtual double GetHelpQuality(const QString &contextText, const istd::IPolymorphic *contextObjectPtr) const
bool ExtractComponentAddress(const QString &contextText, const istd::IPolymorphic *contextObjectPtr, icomp::CComponentAddress &result) const
I_ASSIGN_TO(m_externalMetaInfoManagerCompPtr, m_metaInfoManagerCompPtr, false)
virtual QString GetHelpFilePath(const QString &contextText, const istd::IPolymorphic *contextObjectPtr) const

© 2007-2011 Witold Gantzke and Kirill Lepskiy