diff -r 666f914201fb -r 2fe1408b6811 epoc32/include/tzlocalizationdatatypes.inl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/tzlocalizationdatatypes.inl Tue Mar 16 16:12:26 2010 +0000 @@ -0,0 +1,152 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __TZLOCAL_DATATYPES_INL__ +#define __TZLOCAL_DATATYPES_INL__ + +//================================================================== +// TTzLocalizedId inline Functions +//================================================================== +/** +Returns the time zone ID. +@return The time zone ID. +*/ +inline TUint16 TTzLocalizedId::TimeZoneId() const + { + return iTzId; + } + +/** +Returns the resource ID. +@return The resource ID. +*/ +inline TUint TTzLocalizedId::ResourceId() const + { + return iResourceId; + } + +/** +Returns the UTC offset in minutes. +This value should only be used for array sorting. +@return The UTC offset in minutes. +*/ +inline TInt TTzLocalizedId::UTCOffset() const + { + return iUTCOffset; + } + +/** +Sets the UTC offset in minutes. +This value should only be used for internal array sorting. +@param aOffsetInMinutes The new UTC offset in minutes. +*/ +inline void TTzLocalizedId::SetUTCOffset(TInt aOffsetInMinutes) + { + iUTCOffset = aOffsetInMinutes; + } + +//================================================================== +// CTzLocalizedArray's inline functions +//================================================================== +/** +Destructor +@internalTechnology +*/ +template +inline CTzLocalizedArray::~CTzLocalizedArray() + { + iArray.ResetAndDestroy(); + } + +/** +Default constructor +@internalTechnology +*/ +template +inline CTzLocalizedArray::CTzLocalizedArray() + { + } +/** +Returns the element at the specified index. +@param aIndex Index of the element to get. +@return The element at aIndex. +@internalTechnology +*/ +template +inline T& CTzLocalizedArray::At(TInt aIndex) const + { + return *(iArray[aIndex]); + } + +/** +Returns the number of elements in the array. +@return The number of elements in the array. +@internalTechnology +*/ +template +inline TInt CTzLocalizedArray::Count() const + { + return iArray.Count(); + } + +/** +Appends aElement to this array. +@param aElement The element to add. +@internalTechnology +*/ +template +inline void CTzLocalizedArray::AppendL(T* aElement) + { + iArray.AppendL(aElement); + } + +/** +Removes the element at the specified index. +@param aIndex The index of the element to remove. +@internalTechnology +*/ +template +inline void CTzLocalizedArray::Remove(TInt aIndex) + { + iArray.Remove(aIndex); + } + +/** +Sorts this array. +@param aOrder The sorting function to use. +@internalTechnology +*/ +template +inline void CTzLocalizedArray::Sort(TLinearOrder aOrder) + { + iArray.Sort(aOrder); + } + +/** +Finds an element in this array. +@param aIdentityRelation finding function to use. +@internalTechnology +*/ +template +inline TInt CTzLocalizedArray::Find(T* aEntry,TIdentityRelation aIdentityRelation) + { + return iArray.Find(aEntry,aIdentityRelation); + } + +#endif //__TZLOCAL_DATATYPES_INL__ + +//================================================================== +// End of file +//==================================================================