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 <iinsp/ISupplier.h>
14 
15 
16 namespace ifileproc
17 {
18 
19 
27  virtual public ifileproc::IFileConversion
28 {
29 public:
31 
32  I_BEGIN_COMPONENT(CProcessingResultsReviewComp);
33  I_REGISTER_INTERFACE(ifileproc::IFileConversion);
34  I_ASSIGN(m_inputPathCompPtr, "InputPathObject", "Optional storage of current processed input (file or directory)", false, "InputPathObject");
35  I_ASSIGN(m_currentProcessedFilePathCompPtr, "CurrentProcessedFilePath", "Full path to currently processed file, should be used by supplier as input file path", true, "ProcessingInputFilePath");
36  I_ASSIGN(m_outputSupplierCompPtr, "OutputSupplier", "Supplier to process files", true, "OutputSupplier");
37  I_ASSIGN_TO(m_outputSupplierSerializerCompPtr, m_outputSupplierCompPtr, true);
38  I_ASSIGN(m_outputFileSerializerCompPtr, "OutputFileSerializer", "Output formatter", true, "OutputFileSerializer");
39  I_ASSIGN(m_inputFileTypeInfoCompPtr, "InputFilesTypeInfo", "Optional input files type information used if user specified directory", false, "InputFilesTypeInfo");
40  I_END_COMPONENT;
41 
42  // reimplemented (ifileproc::IFileConversion)
43  virtual int ConvertFiles(
44  const QString& inputPath,
45  QString& outputPath,
46  const iprm::IParamsSet* paramsPtr = NULL,
47  ibase::IProgressManager* progressManagerPtr = NULL) const;
48 
49 protected:
53  virtual bool ProcessSingleFile(const QString& filePath, iser::IArchive& archive);
54 
55 private:
56  class ProcessSerializer: public iser::ISerializable
57  {
58  public:
62  ProcessSerializer(
63  const CProcessingResultsReviewComp* parentPtr,
64  const QString& path,
65  ibase::IProgressManager* progressManagerPtr);
66 
67  // reimplemented (iser::ISerializable)
68  virtual bool Serialize(iser::IArchive& archive);
69 
70  bool isCanceled;
71 
72  private:
73  const CProcessingResultsReviewComp& m_parent;
74  QString m_path;
75  ibase::IProgressManager* m_progressManagerPtr;
76  };
77 
78  I_REF(ifile::IFileNameParam, m_inputPathCompPtr);
79  I_REF(ifile::IFileNameParam, m_currentProcessedFilePathCompPtr);
80  I_REF(iinsp::ISupplier, m_outputSupplierCompPtr);
81  I_REF(iser::ISerializable, m_outputSupplierSerializerCompPtr);
82  I_REF(ifile::IFilePersistence, m_outputFileSerializerCompPtr);
83  I_REF(ifile::IFileTypeInfo, m_inputFileTypeInfoCompPtr);
84 };
85 
86 
87 } // namespace ifileproc
88 
89 
90 #endif // !ifileproc_CProcessingResultsReviewComp_included
91 
92 
Component for creating single file with results of processing single input file or all files in some ...
virtual int ConvertFiles(const QString &inputPath, QString &outputPath, const iprm::IParamsSet *paramsPtr=NULL, ibase::IProgressManager *progressManagerPtr=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 calculating of objects on demand ("pull data" model)...
Definition: ISupplier.h:22
General interface for conversion of files.

© 2007-2017 Witold Gantzke and Kirill Lepskiy