aknlayoutcompiler/inc/MakeLayConvTest.h
changeset 0 f58d6ec98e88
child 1 b700e12870ca
equal deleted inserted replaced
-1:000000000000 0:f58d6ec98e88
       
     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 MAKELAYCONVTEST_H
       
    20 #define MAKELAYCONVTEST_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 #include <cdlcompilertoolkit/cdltkinstance.h>
       
    30 #include <cdlcompilertoolkit/cdltkprocess.h>
       
    31 using namespace CdlCompilerToolkit;
       
    32 
       
    33 
       
    34 /**
       
    35 *  MakeLayoutConvTest
       
    36 *  Generate test code to test the validity of the conversion from the older 
       
    37 *  AknLayout system to AknLayout2
       
    38 */
       
    39 class MakeLayoutConvTest
       
    40 	{
       
    41 public:
       
    42 	static int Process(const vector<string>& args);
       
    43 	static void ShowHelp(ostream& stream);
       
    44 
       
    45 	MakeLayoutConvTest(CCdlTkInterface& aInterface, TLayout& aLayout);
       
    46 	~MakeLayoutConvTest();
       
    47 	void RunProcess();
       
    48 
       
    49 private:
       
    50 	void AddTableToTest(TLayoutTable& aTable);
       
    51 	void WriteTestFiles();
       
    52 	void WriteTestFile(const string& aFileName, const string& iContent);
       
    53 	void InitFiles();
       
    54 	void CompleteFiles();
       
    55 	void AddLineToTest(TLayoutLine& aLine);
       
    56 	void AddTest(TLayoutLine& aLine, const CCdlTkFunctionApi& aApi);
       
    57 	const CCdlTkFunctionApi* FindApi(const string& aName);
       
    58 
       
    59 	void AddTestToOldH(TLayoutLine& aLine, const CCdlTkFunctionApi& aApi);
       
    60 	void AddTestToOldCpp(TLayoutLine& aLine, const CCdlTkFunctionApi& aApi);
       
    61 	void AddTestFunc(TLayoutLine& aLine, const CCdlTkFunctionApi& aApi);
       
    62 
       
    63 	string OldFuncSig(TLayoutLine& aLine, const CCdlTkFunctionApi& aApi);
       
    64 
       
    65 private:
       
    66 	CCdlTkInterface& iInterface;
       
    67 	TLayout& iLayout;
       
    68 	string iOldH;
       
    69 	string iOldCpp;
       
    70 	string iFuncs;
       
    71 	string iTests;
       
    72 	};
       
    73 
       
    74 #endif