CFileInfoCopyComp.h
Go to the documentation of this file.
1 #ifndef ifileproc_CFileInfoCopyComp_included
2 #define ifileproc_CFileInfoCopyComp_included
3 
4 
5 // Qt includes
6 #include <QtCore/QString>
7 
8 
9 // ACF includes
10 #include <QtCore/QString>
11 
12 #include "ibase/IApplicationInfo.h"
13 #include "ilog/TLoggerCompWrap.h"
15 
16 #include "ifileproc/ifileproc.h"
17 
18 
19 namespace ifileproc
20 {
21 
22 
40  public QObject,
42  virtual public ifileproc::IFileConvertCopy
43 {
44 public:
46 
47  enum MessageId
48  {
49  MI_FILE_INFO = 0xa810,
54  };
55 
56  I_BEGIN_COMPONENT(CFileInfoCopyComp);
57  I_REGISTER_INTERFACE(ifileproc::IFileConvertCopy);
58 
59  I_ASSIGN(m_applicationInfoCompPtr, "ApplicationInfo", "Provide information about versions for substitution", false, "VersionInfo");
60  I_ASSIGN(m_licensePathAttrPtr, "LicensePath", "Path of license file will be included at begin of copied file", false, "License.txt");
61  I_ASSIGN(m_useSubstitutionAttrPtr, "UseSubstitution", "If enabled strings like $AcfVersion:n$ will be substituted", true, false);
62  I_ASSIGN_MULTI_0(m_userSubstitutionTagsAttrPtr, "UserSubstitutionTags", "List of user defined substitution tags will be replaced with specified values", false);
63  I_ASSIGN_MULTI_0(m_userSubstitutionValuesAttrPtr, "UserSubstitutionValues", "List of user substitution values according to specified user tags", false);
64  I_END_COMPONENT;
65 
66  // reimplemented (ifileproc::IFileConvertCopy)
67  virtual bool ConvertFiles(
68  const QString& inputPath,
69  const QString& outputPath,
70  const iprm::IParamsSet* paramsPtr = NULL) const;
71 
72 protected:
73  bool ProcessSubstitutionTag(const QString& tag, QString& result) const;
74 
75 private:
76  I_REF(ibase::IApplicationInfo, m_applicationInfoCompPtr);
77 
78  I_ATTR(QString, m_licensePathAttrPtr);
79  I_ATTR(bool, m_useSubstitutionAttrPtr);
80  I_MULTIATTR(QString, m_userSubstitutionTagsAttrPtr);
81  I_MULTIATTR(QString, m_userSubstitutionValuesAttrPtr);
82 };
83 
84 
85 } // namespace ifileproc
86 
87 
88 #endif // !ifileproc_CFileInfoCopyComp_included
89 
90 
Common interface for file copying.
Copy of text files with some tags substitution and optional license attachment.
ilog::CLoggerComponentBase BaseClass
bool ProcessSubstitutionTag(const QString &tag, QString &result) const
virtual bool ConvertFiles(const QString &inputPath, const QString &outputPath, const iprm::IParamsSet *paramsPtr=NULL) const
Copy a file or files from inputPath to destination outputPath.

© 2007-2011 Witold Gantzke and Kirill Lepskiy