|
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 bitmap to header converter class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __MIFCONVBITMAPHEADERCONVERTER_H__ |
|
20 #define __MIFCONVBITMAPHEADERCONVERTER_H__ |
|
21 |
|
22 #include "mifconv_fileconverter.h" |
|
23 #include <fstream> |
|
24 |
|
25 /** |
|
26 * Converter class for converting source files to .mbg header files |
|
27 */ |
|
28 class MifConvBitmapHeaderConverter : public MifConvFileConverter |
|
29 { |
|
30 public: |
|
31 /** |
|
32 * Default constructor |
|
33 */ |
|
34 MifConvBitmapHeaderConverter(); |
|
35 |
|
36 /** |
|
37 * Destructor |
|
38 */ |
|
39 virtual ~MifConvBitmapHeaderConverter(); |
|
40 |
|
41 // From MifConvFileConverter |
|
42 virtual void AppendFile( const MifConvSourceFile& sourcefile ); |
|
43 virtual void Convert(); |
|
44 virtual void Cleanup(bool err = false); |
|
45 virtual void Init(); |
|
46 virtual void CleanupTargetFiles(); |
|
47 |
|
48 protected: |
|
49 |
|
50 /** |
|
51 * Writes the beginning of the header |
|
52 */ |
|
53 void WriteStart(); |
|
54 |
|
55 /** |
|
56 * Writes source file information to the header file |
|
57 * @param source Source file object representing the file to be |
|
58 * added to the header. |
|
59 */ |
|
60 void WriteItemToHeader( const MifConvSourceFile& source ); |
|
61 |
|
62 /** |
|
63 * Writes the end of the header. |
|
64 */ |
|
65 void WriteEnd(); |
|
66 |
|
67 MifConvString iHeaderFilename; |
|
68 fstream* iDestFile; |
|
69 int iCurrentSourceId; |
|
70 }; |
|
71 |
|
72 #endif |