diff -r 000000000000 -r 08ec8eefde2f persistentstorage/dbms/utable/UT_PRJCT.CPP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/persistentstorage/dbms/utable/UT_PRJCT.CPP Fri Jan 22 11:06:30 2010 +0200 @@ -0,0 +1,89 @@ +// Copyright (c) 1998-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: +// + +#include "UT_STD.H" + +// Class HDbColumnMap + +class HDbColumnMap + { +public: + static HDbColumnMap* NewL(const RSqlColumnList& aSelect,const HDbColumnSet& aColumns); + inline const TDbColNo& operator[](TDbColNo aCol) const + {__ASSERT(aCol>0&&aCol<=iCount);return iMap[aCol-1];} + inline TInt Count() const + {return iCount;} +private: + TInt iCount; + TDbColNo iMap[1]; // at least one + }; + +HDbColumnMap* HDbColumnMap::NewL(const RSqlColumnList& aSelect,const HDbColumnSet& aColumns) + { + TInt count=aSelect.Count(); + HDbColumnMap* self=(HDbColumnMap*)User::AllocLC(_FOFF(HDbColumnMap,iMap[count])); + self->iCount=count; + TDbColNo* pCol=&self->iMap[0]; + for (TInt ii=0;iiCount(); + } + +const TDbColumnDef& CDbProjectStage::ColumnDef(TDbColNo aCol) const + { + return CDbDataStage::ColumnDef((*iMap)[aCol]); + }