epoc32/include/tzlocalizationdatatypes.inl
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
permissions -rw-r--r--
Final list of Symbian^2 public API header files
     1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // 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
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 #ifndef __TZLOCAL_DATATYPES_INL__
    17 #define __TZLOCAL_DATATYPES_INL__
    18 
    19 //==================================================================
    20 // TTzLocalizedId inline Functions
    21 //==================================================================
    22 /**
    23 Returns the time zone ID.
    24 @return The time zone ID.
    25 */
    26 inline TUint16 TTzLocalizedId::TimeZoneId() const
    27 	{
    28 	return iTzId;
    29 	}
    30 
    31 /**
    32 Returns the resource ID.
    33 @return The resource ID.
    34 */
    35 inline TUint TTzLocalizedId::ResourceId() const
    36 	{
    37 	return iResourceId;
    38 	}
    39 
    40 /**
    41 Returns the UTC offset in minutes.
    42 This value should only be used for array sorting.
    43 @return The UTC offset in minutes.
    44 */
    45 inline TInt TTzLocalizedId::UTCOffset() const
    46 	{
    47 	return iUTCOffset;
    48 	}
    49 
    50 /**
    51 Sets the UTC offset in minutes.
    52 This value should only be used for internal array sorting.
    53 @param aOffsetInMinutes The new UTC offset in minutes.
    54 */
    55 inline void TTzLocalizedId::SetUTCOffset(TInt aOffsetInMinutes)
    56 	{
    57 	iUTCOffset = aOffsetInMinutes;
    58 	}
    59 
    60 //==================================================================
    61 // CTzLocalizedArray's inline functions
    62 //==================================================================
    63 /**
    64 Destructor
    65 @internalTechnology
    66 */
    67 template <class T>
    68 inline CTzLocalizedArray<T>::~CTzLocalizedArray()
    69 	{
    70 	iArray.ResetAndDestroy();
    71 	}
    72 
    73 /**
    74 Default constructor
    75 @internalTechnology
    76 */
    77 template <class T>
    78 inline CTzLocalizedArray<T>::CTzLocalizedArray()
    79 	{
    80 	}
    81 /**
    82 Returns the element at the specified index.
    83 @param aIndex Index of the element to get.
    84 @return The element at aIndex.
    85 @internalTechnology
    86 */
    87 template <class T>
    88 inline T& CTzLocalizedArray<T>::At(TInt aIndex) const
    89 	{
    90 	return *(iArray[aIndex]);
    91 	}
    92 
    93 /**
    94 Returns the number of elements in the array.
    95 @return The number of elements in the array.
    96 @internalTechnology
    97 */
    98 template <class T>
    99 inline TInt CTzLocalizedArray<T>::Count() const
   100 	{
   101 	return iArray.Count();
   102 	}
   103 
   104 /**
   105 Appends aElement to this array.
   106 @param aElement The element to add.
   107 @internalTechnology
   108 */
   109 template <class T>
   110 inline void CTzLocalizedArray<T>::AppendL(T* aElement)
   111 	{
   112 	iArray.AppendL(aElement);
   113 	}
   114 
   115 /**
   116 Removes the element at the specified index.
   117 @param aIndex The index of the element to remove.
   118 @internalTechnology
   119 */
   120 template <class T>
   121 inline void CTzLocalizedArray<T>::Remove(TInt aIndex)
   122 	{
   123 	iArray.Remove(aIndex);
   124 	}
   125 
   126 /**
   127 Sorts this array.
   128 @param aOrder The sorting function to use.
   129 @internalTechnology
   130 */
   131 template <class T>
   132 inline void CTzLocalizedArray<T>::Sort(TLinearOrder<T> aOrder)
   133 	{
   134 	iArray.Sort(aOrder);
   135 	}
   136 
   137 /**
   138 Finds an element in this array.
   139 @param aIdentityRelation finding function to use.
   140 @internalTechnology
   141 */
   142 template <class T>
   143 inline TInt CTzLocalizedArray<T>::Find(T* aEntry,TIdentityRelation<T> aIdentityRelation)
   144 	{
   145 	return iArray.Find(aEntry,aIdentityRelation);
   146 	}
   147 
   148 #endif //__TZLOCAL_DATATYPES_INL__
   149 
   150 //==================================================================
   151 // End of file
   152 //==================================================================