CFileConvertOverProcessorComp.h
Go to the documentation of this file.
1 #ifndef ifileproc_CFileConvertOverProcessorComp_included
2 #define ifileproc_CFileConvertOverProcessorComp_included
3 
4 
5 // Qt includes
6 #include <QtCore/QMutex>
7 
8 // ACF includes
9 #include "istd/TSmartPtr.h"
10 
11 #include "ifile/IFilePersistence.h"
12 
14 #include "ilog/TLoggerCompWrap.h"
15 
16 #include "ibase/IProgressManager.h"
17 #include "iproc/IProcessor.h"
18 
19 
20 namespace ifileproc
21 {
22 
23 
29  virtual public ifileproc::IFileConvertCopy
30 {
31 public:
33 
35 
36  I_BEGIN_COMPONENT(CFileConvertOverProcessorComp);
37  I_REGISTER_INTERFACE(ifileproc::IFileConvertCopy);
38  I_ASSIGN(m_inputFileLoaderCompPtr, "InputFileLoader", "Loader for the input file", true, "InputFileLoader");
39  I_ASSIGN(m_outputFileLoaderCompPtr, "OutputFileLoader", "Persistence for the output file. If not set, the input file loader will be used", false, "OutputFileLoader");
40  I_ASSIGN(m_processorCompPtr, "DataProcessor", "Processor for the file", true, "FileProcessor");
41  I_ASSIGN(m_inputDataCompPtr, "InputData", "Input data definition", true, "InputData");
42  I_ASSIGN(m_outputDataCompPtr, "OutputData", "Output data definition", true, "OutputData");
43  I_ASSIGN(m_progressManagerCompPtr, "ProgressManager", "Processing progress observer", false, "ProgressManager");
44  I_ASSIGN(m_processingParamsSetCompPtr, "ProcessingParams", "Processing parameters", false, "ProcessingParams");
45  I_END_COMPONENT;
46 
47  // reimplemented (ifileproc::IFileConvertCopy)
48  virtual bool ConvertFiles(
49  const QString& inputPath,
50  const QString& outputPath,
51  const iprm::IParamsSet* paramsPtr = NULL) const;
52 
53 private:
54  I_REF(ifile::IFilePersistence, m_inputFileLoaderCompPtr);
55  I_REF(ifile::IFilePersistence, m_outputFileLoaderCompPtr);
56  I_REF(iproc::IProcessor, m_processorCompPtr);
57  I_REF(istd::IChangeable, m_inputDataCompPtr);
58  I_REF(istd::IChangeable, m_outputDataCompPtr);
59  I_REF(ibase::IProgressManager, m_progressManagerCompPtr);
60  I_REF(iprm::IParamsSet, m_processingParamsSetCompPtr);
61 
62  mutable QMutex m_mutex;
63 };
64 
65 
66 } // namespace ifileproc
67 
68 
69 #endif // !ifileproc_CFileConvertOverProcessorComp_included
70 
71 
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.
Common interface for file copying.
Interface for all synchrone and assynchrone processors with "push data" model.
Definition: IProcessor.h:24
Component for a file conversion over a data processor.

© 2007-2011 Witold Gantzke and Kirill Lepskiy