|
1 /* |
|
2 * Copyright (c) 2002-2004 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 LAY2CDL_H |
|
20 #define LAY2CDL_H |
|
21 |
|
22 #include <string> |
|
23 #include <vector> |
|
24 #include <iosfwd> |
|
25 #include "Layout.h" |
|
26 using namespace std; |
|
27 |
|
28 #include <cdlcompilertoolkit/cdltkinterface.h> |
|
29 using namespace CdlCompilerToolkit; |
|
30 |
|
31 |
|
32 /** |
|
33 * LayoutToCdl |
|
34 * Generate a CDL interface for a layout |
|
35 */ |
|
36 class LayoutToCdl |
|
37 { |
|
38 public: |
|
39 static int Process(const vector<string>& args); |
|
40 static void ShowHelp(ostream& stream); |
|
41 static auto_ptr<CCdlTkInterface> LayoutToInterface(const TLayout& aLayout); |
|
42 static void AddTableToInterface(CCdlTkInterface& aInterface, TLayoutTable& aTable); |
|
43 static void AddWindowLineToInterface(CCdlTkInterface& aInterface, TLayoutLine& aLine); |
|
44 static void AddTextLineToInterface(CCdlTkInterface& aInterface, TLayoutLine& aLine); |
|
45 static string TableApiName(TLayoutTable& aTable, TLayoutTable::TLayoutSubTable& aSubTable, int aSubTableNum); |
|
46 static string LineApiName(TLayoutLine& aLine); |
|
47 static void AddTableLimitsToInterface(CCdlTkInterface& aInterface, TLayoutTable& aTable, TLayoutTable::TLayoutSubTable& aSubTable, int aSubTableNum); |
|
48 static void AddSubTableToInterface(const string& aType, CCdlTkInterface& aInterface, TLayoutTable& aTable, TLayoutTable::TLayoutSubTable& aSubTable, int aSubTableNum); |
|
49 static void AddParamsToFunc(TLayoutLine& aLine, CCdlTkFunctionApi& aFunc); |
|
50 static string InterfaceName(const string& aFileName); |
|
51 static void SetHeaders(CCdlTkInterface& aInterface, const string& aCdlName, int aUid); |
|
52 private: |
|
53 static CCdlTkApi* CreateGenericApi(CCdlTkInterface& aInterface, TLayoutLine& aLine); |
|
54 }; |
|
55 |
|
56 #endif |