epoc32/include/tzlocalizationdatatypes.inl
branchSymbian2
changeset 2 2fe1408b6811
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/tzlocalizationdatatypes.inl	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -0,0 +1,152 @@
     1.4 +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// 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
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +//
    1.18 +
    1.19 +#ifndef __TZLOCAL_DATATYPES_INL__
    1.20 +#define __TZLOCAL_DATATYPES_INL__
    1.21 +
    1.22 +//==================================================================
    1.23 +// TTzLocalizedId inline Functions
    1.24 +//==================================================================
    1.25 +/**
    1.26 +Returns the time zone ID.
    1.27 +@return The time zone ID.
    1.28 +*/
    1.29 +inline TUint16 TTzLocalizedId::TimeZoneId() const
    1.30 +	{
    1.31 +	return iTzId;
    1.32 +	}
    1.33 +
    1.34 +/**
    1.35 +Returns the resource ID.
    1.36 +@return The resource ID.
    1.37 +*/
    1.38 +inline TUint TTzLocalizedId::ResourceId() const
    1.39 +	{
    1.40 +	return iResourceId;
    1.41 +	}
    1.42 +
    1.43 +/**
    1.44 +Returns the UTC offset in minutes.
    1.45 +This value should only be used for array sorting.
    1.46 +@return The UTC offset in minutes.
    1.47 +*/
    1.48 +inline TInt TTzLocalizedId::UTCOffset() const
    1.49 +	{
    1.50 +	return iUTCOffset;
    1.51 +	}
    1.52 +
    1.53 +/**
    1.54 +Sets the UTC offset in minutes.
    1.55 +This value should only be used for internal array sorting.
    1.56 +@param aOffsetInMinutes The new UTC offset in minutes.
    1.57 +*/
    1.58 +inline void TTzLocalizedId::SetUTCOffset(TInt aOffsetInMinutes)
    1.59 +	{
    1.60 +	iUTCOffset = aOffsetInMinutes;
    1.61 +	}
    1.62 +
    1.63 +//==================================================================
    1.64 +// CTzLocalizedArray's inline functions
    1.65 +//==================================================================
    1.66 +/**
    1.67 +Destructor
    1.68 +@internalTechnology
    1.69 +*/
    1.70 +template <class T>
    1.71 +inline CTzLocalizedArray<T>::~CTzLocalizedArray()
    1.72 +	{
    1.73 +	iArray.ResetAndDestroy();
    1.74 +	}
    1.75 +
    1.76 +/**
    1.77 +Default constructor
    1.78 +@internalTechnology
    1.79 +*/
    1.80 +template <class T>
    1.81 +inline CTzLocalizedArray<T>::CTzLocalizedArray()
    1.82 +	{
    1.83 +	}
    1.84 +/**
    1.85 +Returns the element at the specified index.
    1.86 +@param aIndex Index of the element to get.
    1.87 +@return The element at aIndex.
    1.88 +@internalTechnology
    1.89 +*/
    1.90 +template <class T>
    1.91 +inline T& CTzLocalizedArray<T>::At(TInt aIndex) const
    1.92 +	{
    1.93 +	return *(iArray[aIndex]);
    1.94 +	}
    1.95 +
    1.96 +/**
    1.97 +Returns the number of elements in the array.
    1.98 +@return The number of elements in the array.
    1.99 +@internalTechnology
   1.100 +*/
   1.101 +template <class T>
   1.102 +inline TInt CTzLocalizedArray<T>::Count() const
   1.103 +	{
   1.104 +	return iArray.Count();
   1.105 +	}
   1.106 +
   1.107 +/**
   1.108 +Appends aElement to this array.
   1.109 +@param aElement The element to add.
   1.110 +@internalTechnology
   1.111 +*/
   1.112 +template <class T>
   1.113 +inline void CTzLocalizedArray<T>::AppendL(T* aElement)
   1.114 +	{
   1.115 +	iArray.AppendL(aElement);
   1.116 +	}
   1.117 +
   1.118 +/**
   1.119 +Removes the element at the specified index.
   1.120 +@param aIndex The index of the element to remove.
   1.121 +@internalTechnology
   1.122 +*/
   1.123 +template <class T>
   1.124 +inline void CTzLocalizedArray<T>::Remove(TInt aIndex)
   1.125 +	{
   1.126 +	iArray.Remove(aIndex);
   1.127 +	}
   1.128 +
   1.129 +/**
   1.130 +Sorts this array.
   1.131 +@param aOrder The sorting function to use.
   1.132 +@internalTechnology
   1.133 +*/
   1.134 +template <class T>
   1.135 +inline void CTzLocalizedArray<T>::Sort(TLinearOrder<T> aOrder)
   1.136 +	{
   1.137 +	iArray.Sort(aOrder);
   1.138 +	}
   1.139 +
   1.140 +/**
   1.141 +Finds an element in this array.
   1.142 +@param aIdentityRelation finding function to use.
   1.143 +@internalTechnology
   1.144 +*/
   1.145 +template <class T>
   1.146 +inline TInt CTzLocalizedArray<T>::Find(T* aEntry,TIdentityRelation<T> aIdentityRelation)
   1.147 +	{
   1.148 +	return iArray.Find(aEntry,aIdentityRelation);
   1.149 +	}
   1.150 +
   1.151 +#endif //__TZLOCAL_DATATYPES_INL__
   1.152 +
   1.153 +//==================================================================
   1.154 +// End of file
   1.155 +//==================================================================