CProcessingResultsReviewComp.h
Go to the documentation of this file.
1 #ifndef ifileproc_CProcessingResultsReviewComp_included
2 #define ifileproc_CProcessingResultsReviewComp_included
3 
4 
5 // ACF includes
6 #include "ifile/IFileTypeInfo.h"
7 #include "ifile/IFileNameParam.h"
10 #include "ilog/TLoggerCompWrap.h"
11 
12 // ACF-Solutions includes
13 #include "iproc/ISupplier.h"
14 
15 
16 namespace ifileproc
17 {
18 
21  virtual public ifileproc::IFileConvertCopy
22 {
23 public:
25 
26  I_BEGIN_COMPONENT(CProcessingResultsReviewComp);
27  I_REGISTER_INTERFACE(ifileproc::IFileConvertCopy);
28  I_ASSIGN(m_inputPathCompPtr, "InputPathObject", "Optional storage of current processed input (file or directory)", false, "InputPathObject");
29  I_ASSIGN(m_currentProcessedFilePathCompPtr, "CurrentProcessedFilePath", "Full path to currently processed file, should be used by supplier as input file path", true, "ProcessingInputFilePath");
30  I_ASSIGN(m_outputSupplierCompPtr, "OutputSupplier", "Supplier to process files", true, "OutputSupplier");
31  I_ASSIGN_TO(m_outputSupplierSerializerCompPtr, m_outputSupplierCompPtr, true);
32  I_ASSIGN(m_outputFileSerializerCompPtr, "OutputFileSerializer", "Output formatter", true, "OutputFileSerializer");
33  I_ASSIGN(m_inputFileTypeInfoCompPtr, "InputFilesTypeInfo", "Optional input files type information used if user specified directory", false, "InputFilesTypeInfo");
34  I_END_COMPONENT;
35 
36  // reimplemented (ifileproc::IFileConvertCopy)
37  virtual bool ConvertFiles(
38  const QString& inputPath,
39  const QString& outputPath,
40  const iprm::IParamsSet* paramsPtr = NULL) const;
41 
42 protected:
46  virtual bool ProcessSingleFile(const QString& filePath, iser::IArchive& archive);
47 
48 private:
49  class ProcessSerializer: public iser::ISerializable
50  {
51  public:
55  ProcessSerializer(
56  const CProcessingResultsReviewComp* parentPtr,
57  const QString& path);
58 
59  // reimplemented (iser::ISerializable)
60  virtual bool Serialize(iser::IArchive& archive);
61 
62  private:
63  const CProcessingResultsReviewComp& m_parent;
64  QString m_path;
65  };
66 
67  I_REF(ifile::IFileNameParam, m_inputPathCompPtr);
68  I_REF(ifile::IFileNameParam, m_currentProcessedFilePathCompPtr);
69  I_REF(iproc::ISupplier, m_outputSupplierCompPtr);
70  I_REF(iser::ISerializable, m_outputSupplierSerializerCompPtr);
71  I_REF(ifile::IFilePersistence, m_outputFileSerializerCompPtr);
72  I_REF(ifile::IFileTypeInfo, m_inputFileTypeInfoCompPtr);
73 };
74 
75 
76 } // namespace ifileproc
77 
78 
79 #endif // !ifileproc_CProcessingResultsReviewComp_included
80 
81 
Common interface for file copying.
I_ASSIGN_TO(m_outputSupplierSerializerCompPtr, m_outputSupplierCompPtr, true)
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.
virtual bool ProcessSingleFile(const QString &filePath, iser::IArchive &archive)
Process single file and send the results to archive.
Base interface for suppliers providing synchrone processing of single object with "pull data" model...
Definition: ISupplier.h:22

© 2007-2011 Witold Gantzke and Kirill Lepskiy