|
1 /* |
|
2 * Copyright (c) 2006 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MLCompDataLayPerfWriter_H |
|
20 #define MLCompDataLayPerfWriter_H |
|
21 |
|
22 // disable "decorated name length exceeded, name was truncated" |
|
23 #pragma warning (disable:4503) |
|
24 |
|
25 #include "WriterBase.h" |
|
26 #include "MLCompData.h" |
|
27 |
|
28 class TMLCompDataLayPerfWriter; |
|
29 |
|
30 #include <cdlcompilertoolkit/cdltkinterface.h> |
|
31 using namespace CdlCompilerToolkit; |
|
32 |
|
33 |
|
34 /** |
|
35 * TLayPerfTableWriter |
|
36 * Writes a layout table in .lay format |
|
37 */ |
|
38 class TMLCompDataLayPerfTableWriter |
|
39 { |
|
40 public: |
|
41 TMLCompDataLayPerfTableWriter(TMLCompDataLayPerfWriter* aParent, TMLCompDataTable& aTable, string& aInterfaceName, int aTableId); |
|
42 ~TMLCompDataLayPerfTableWriter(); |
|
43 void Write(ostream& out); |
|
44 |
|
45 private: |
|
46 void WriteTable(ostream& out); |
|
47 void WriteLine(ostream& out, TMLCompDataLine& line); |
|
48 string BuildMacroName(TMLCompDataLine& aLine); |
|
49 string BuildApiName(TMLCompDataLine& aLine); |
|
50 string BuildParams(TMLCompDataLine& aLine); |
|
51 string BuildParamLimitParams(TMLCompDataLine& aLine); |
|
52 |
|
53 private: |
|
54 TMLCompDataLayPerfWriter* iParent; |
|
55 TMLCompDataTable& iTable; |
|
56 string iInterfaceName; |
|
57 int iTableId; |
|
58 }; |
|
59 |
|
60 /** |
|
61 * TMLCompDataLayPerfWriter |
|
62 * Writes a layout in LayPerf format, using the build in macros to do the work. |
|
63 */ |
|
64 class TMLCompDataLayPerfWriter : public TMLWriterBase<TMLCompData> |
|
65 { |
|
66 public: |
|
67 TMLCompDataLayPerfWriter(CCdlTkInterface& aInterface, TMLCompData& aLayout, const std::string& aName); |
|
68 void Write(const std::string& aLayName); |
|
69 public: |
|
70 CCdlTkInterface& iInterface; // not owned |
|
71 }; |
|
72 |
|
73 #endif // MLCompDataLayPerfWriter_H |
|
74 |
|
75 // End of File |