|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Mifconv converter base class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __MIFCONVFILECONVERTER_H__ |
|
20 #define __MIFCONVFILECONVERTER_H__ |
|
21 |
|
22 #include <vector> |
|
23 #include "mifconv.h" |
|
24 #include "mifconv_sourcefile.h" |
|
25 |
|
26 /** |
|
27 * Virtual base class for file converters |
|
28 */ |
|
29 class MifConvFileConverter |
|
30 { |
|
31 public: |
|
32 |
|
33 /** |
|
34 * Destructor |
|
35 */ |
|
36 virtual ~MifConvFileConverter(){}; |
|
37 |
|
38 /** |
|
39 * Appends source file to the internal file list. |
|
40 * @param Source file object |
|
41 */ |
|
42 virtual void AppendFile( const MifConvSourceFile& sourcefile ) = 0; |
|
43 |
|
44 /** |
|
45 * Converts all the files in the internal file list. |
|
46 */ |
|
47 virtual void Convert() = 0; |
|
48 |
|
49 /** |
|
50 * Cleans up the temporary files etc. |
|
51 * @param error True in error situations |
|
52 */ |
|
53 virtual void Cleanup(bool error = false) = 0; |
|
54 |
|
55 virtual void Init() = 0; |
|
56 |
|
57 virtual void CleanupTargetFiles() = 0; |
|
58 |
|
59 protected: |
|
60 // Internal file list |
|
61 MifConvSourceFileList iSourceFiles; |
|
62 }; |
|
63 |
|
64 typedef std::vector<MifConvFileConverter*> MifConvFileConverterList; |
|
65 |
|
66 #endif |