aknlayoutcompiler/inc/AdaptationLayerTemplate.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 ADAPTATIONLAYERTEMPLATE_H
       
    20 #define ADAPTATIONLAYERTEMPLATE_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 class AdaptationLayerTemplate : public CCdlTkSourceFileWriter
       
    35 	{
       
    36 public:
       
    37 	static int Process(const vector<string>& args);
       
    38 	static void ShowHelp(ostream& stream);
       
    39 	~AdaptationLayerTemplate();
       
    40 
       
    41 private:
       
    42 	AdaptationLayerTemplate(TLayout& aLayout, CCdlTkInterface& aLayIface, CCdlTkInterface& aScaleIface, CCdlTkInstance& aInstance, string& aExisting);
       
    43 
       
    44 	CCdlTkInstance& Instance();
       
    45 	string FwdDeclName();
       
    46 	void Process();
       
    47 
       
    48 private:
       
    49 	void AddTableToInstance(TLayoutTable& aTable);
       
    50 	void AddLineToInstance(TLayoutLine& aLine);
       
    51 	bool HasApi(const string& aName);
       
    52 	CCdlTkImplementation& FindImp(const string& aName);
       
    53 	void SetFuncLine(CCdlTkImplementation& aImp, TLayoutLine& aLine);
       
    54 	pair<string,int> GetApiMatch(const string& aName);
       
    55 
       
    56 private:
       
    57 	CCdlTkInterface& iLayIface;
       
    58 	CCdlTkInterface& iScaleIface;
       
    59 	TLayout& iLayout;
       
    60 	CCdlTkInstance& iInstance;
       
    61 	string& iExisting;
       
    62 	};
       
    63 
       
    64 #endif