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

© 2007-2017 Witold Gantzke and Kirill Lepskiy