epoc32/include/mw/tzlocalizationdatatypes.inl
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 3 e1b950c65cb4
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     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 "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.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 // CTzLocalizedArray's inline functions
    42 //==================================================================
    43 /**
    44 Destructor
    45 @internalTechnology
    46 */
    47 template <class T>
    48 inline CTzLocalizedArray<T>::~CTzLocalizedArray()
    49 	{
    50 	iArray.ResetAndDestroy();
    51 	}
    52 
    53 /**
    54 Default constructor
    55 @internalTechnology
    56 */
    57 template <class T>
    58 inline CTzLocalizedArray<T>::CTzLocalizedArray()
    59 	{
    60 	}
    61 /**
    62 Returns the element at the specified index.
    63 @param aIndex Index of the element to get.
    64 @return The element at aIndex.
    65 @internalTechnology
    66 */
    67 template <class T>
    68 inline T& CTzLocalizedArray<T>::At(TInt aIndex) const
    69 	{
    70 	return *(iArray[aIndex]);
    71 	}
    72 
    73 /**
    74 Returns the number of elements in the array.
    75 @return The number of elements in the array.
    76 @internalTechnology
    77 */
    78 template <class T>
    79 inline TInt CTzLocalizedArray<T>::Count() const
    80 	{
    81 	return iArray.Count();
    82 	}
    83 
    84 /**
    85 Appends aElement to this array.
    86 @param aElement The element to add.
    87 @internalTechnology
    88 */
    89 template <class T>
    90 inline void CTzLocalizedArray<T>::AppendL(T* aElement)
    91 	{
    92 	iArray.AppendL(aElement);
    93 	}
    94 
    95 /**
    96 Removes the element at the specified index.
    97 @param aIndex The index of the element to remove.
    98 @internalTechnology
    99 */
   100 template <class T>
   101 inline void CTzLocalizedArray<T>::Remove(TInt aIndex)
   102 	{
   103 	iArray.Remove(aIndex);
   104 	}
   105 
   106 /**
   107 Sorts this array.
   108 @param aOrder The sorting function to use.
   109 @internalTechnology
   110 */
   111 template <class T>
   112 inline void CTzLocalizedArray<T>::Sort(TLinearOrder<T> aOrder)
   113 	{
   114 	iArray.Sort(aOrder);
   115 	}
   116 
   117 /**
   118 Finds an element in this array.
   119 @param aIdentityRelation finding function to use.
   120 @internalTechnology
   121 */
   122 template <class T>
   123 inline TInt CTzLocalizedArray<T>::Find(T* aEntry,TIdentityRelation<T> aIdentityRelation)
   124 	{
   125 	return iArray.Find(aEntry,aIdentityRelation);
   126 	}
   127 
   128 template <class T>
   129 inline void CTzLocalizedArray<T>::ReserveL(TInt aCount)
   130 	{
   131 	iArray.ReserveL(aCount);
   132 	}
   133 
   134 #endif //__TZLOCAL_DATATYPES_INL__