cdlcompilertoolkit/inc/CdlTkStdTrans.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Mon, 18 Jan 2010 21:13:05 +0200
changeset 1 b700e12870ca
parent 0 f58d6ec98e88
permissions -rw-r--r--
Revision: 201001 Kit: 201003

/*
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:
*
*/
// These are the standard data type translations supplied by the CDL compiler toolkit

struct SStdTranslation
	{
	const char* iType;
	const char* iInit;
	const char* iRef;
	};

// these are the standard translations. First gets matched last.
const SStdTranslation gStdTranslations[] =
	{
		{
		"aType", 
		"aType const aName = ?value", 
		"&aName"
		},
		{
		"TDesC",
		"_LIT(aName,\"\")",
		"LIT_AS_DESC_PTR(aName)"
		},
		{
		"TCdlArray<aType>",
		"CDL_ARRAY_START(aType, aName)\n\t{\n?array_contents\n\t}\nCDL_ARRAY_END(aType, aName)",
		"&aName"
		},
		{
		"TInt64", 
		"SCdlInt64 const aName = { ?low_word, ?high_word }", 
		"(const TInt64*)&aName"
		},
		{
		"TVersion", 
		"SCdlVersion const aName = { ?major, ?minor, ?build }", 
		"(const TVersion*)&aName"
		},
		{
		"TDateTime", 
		"CDL_DATETIME(aName, ?year, ?month, ?day, ?hour, ?minute, ?second, ?microSecond)", 
		"(const TDateTime*)&aName"
		},
		{
		"TPoint", 
		"SCdlPoint const aName = { ?x, ?y }", 
		"(const TPoint*)&aName"
		},
		{
		"TSize", 
		"SCdlSize const aName = { ?width, ?height }", 
		"(const TSize*)&aName"
		},
		{
		"TRect", 
		"SCdlRect const aName = { { ?left, ?top }, { ?right+1, ?bottom+1 } }", 
		"(const TRect*)&aName"
		},
		{
		"TRgb", 
		"CDL_COLOR(aName, ?red, ?green, ?blue)", 
		"(const TRgb*)&aName"
		},
	};