epoc32/include/e32std.inl
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
child 4 837f303aceeb
permissions -rw-r--r--
Final list of Symbian^2 public API header files
     1 // Copyright (c) 1994-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 // e32\include\e32std.inl
    15 // 
    16 //
    17 
    18 // Global leaving operator new
    19 inline TAny* operator new(TUint aSize, TLeave)
    20 	{return User::AllocL(aSize);}
    21 inline TAny* operator new(TUint aSize, TLeave, TUint aExtraSize)
    22 	{return User::AllocL(aSize + aExtraSize);}
    23 #if !defined(__VC32__) || defined (__MSVCDOTNET__)
    24 inline TAny* operator new[](TUint aSize, TLeave)
    25 	{return User::AllocL(aSize);}
    26 #endif
    27 
    28 
    29 
    30 
    31 // class Mem
    32 inline TUint8* Mem::Copy(TAny* aTrg, const TAny* aSrc, TInt aLength)
    33 /**
    34 Copies data from a source location to a target location and returns a pointer 
    35 to the end of the copied data.
    36 	
    37 The source and target areas can overlap.
    38 	
    39 The copy operation is optimised so that if both source and target locations 
    40 are aligned on a word boundary, the operation performs the copy on a word 
    41 by word basis.
    42 	
    43 @param aTrg    A pointer to the target location for the copy operation. 
    44 @param aSrc    A pointer to the source location for the copy operation. 
    45 @param aLength The number of bytes to be copied. This value must not
    46                be negative. 
    47 
    48 @return A pointer to a location aLength bytes beyond aTrg (i.e. the location 
    49         aTrg+aLength).
    50 
    51 @panic USER 90 In debug builds only, if aLength is negative. 
    52 */
    53 	{ return (TUint8*)memmove(aTrg, aSrc, aLength) + aLength; }
    54 
    55 
    56 
    57 
    58 inline TUint8* Mem::Move(TAny* aTrg, const TAny* aSrc, TInt aLength)
    59 /**
    60 Moves a block of data from a source location to a target location and returns 
    61 a pointer to the end of the moved data.
    62 	
    63 The source and target areas can overlap.
    64 	
    65 Both source and target locations must be aligned on a word boundary. 
    66 The specified length must also be a multiple of 4.
    67 	
    68 @param aTrg    A pointer to the target location for the move operation. This 
    69                pointer must be word aligned. 
    70 @param aSrc    A pointer to the source location for the move operation. This
    71                pointer must be word aligned.
    72 @param aLength The number of bytes to be copied. This value must be a multiple 
    73                of 4.
    74 			   
    75 @return A pointer to a location aLength bytes beyond aTrg (i.e. the location 
    76         aTrg+aLength).
    77 
    78 @panic USER 93 In debug builds only, if aTrg is not word aligned.
    79 @panic USER 92 In debug builds only, if aSrc is not word aligned.
    80 @panic USER 91 In debug builds only, if aLength is not a multiple of 4.
    81 */
    82 	{ return (TUint8*)wordmove(aTrg, aSrc, aLength) + aLength; }
    83 
    84 
    85 
    86 
    87 inline void Mem::Fill(TAny* aTrg, TInt aLength, TChar aChar)
    88 /**
    89 Fills a specified block of data with a specified character, replacing
    90 any existing content.
    91 	
    92 The function assumes that the fill character is a non-Unicode character.
    93 	
    94 @param aTrg    A pointer to the location where filling is to start. 
    95 @param aLength The number of bytes to be filled. This value must not
    96                be negative. 
    97 @param aChar   The fill character.
    98 
    99 @panic USER 95 In debug builds only, if aLength is negative.  
   100 */
   101 	{ memset(aTrg, (TInt)(aChar.operator TUint()), aLength); }
   102 
   103 
   104 
   105 
   106 inline void Mem::FillZ(TAny* aTrg,TInt aLength)
   107 /**
   108 Fills a specified block of data with binary zeroes (i.e. 0x00), replacing any 
   109 existing content.
   110 	
   111 @param aTrg    A pointer to the location where filling is to start. 
   112 @param aLength The number of bytes to be filled. This value must not
   113                be negative. 
   114 	
   115 @panic USER 95 In debug builds only, if aLength is negative.  
   116 */
   117 	{ memclr(aTrg, aLength); }
   118 
   119 
   120 
   121 
   122 #ifndef __GCC32__
   123 inline TInt Mem::Compare(const TUint8* aLeft, TInt aLeftL, const TUint8* aRight, TInt aRightL)
   124 /**
   125 Compares a block of data at one specified location with a block of data at 
   126 another specified location.
   127 
   128 The comparison proceeds on a byte for byte basis, the result of the comparison 
   129 is based on the difference of the first bytes to disagree.
   130 
   131 The data at the two locations are equal if they have the same length and content. 
   132 Where the lengths are different and the shorter section of data is the same 
   133 as the first part of the longer section of data, the shorter is considered 
   134 to be less than the longer.
   135 
   136 @param aLeft   A pointer to the first (or left) block of 8 bit data
   137                to be compared.
   138 @param aLeftL  The length of the first (or left) block of data to be compared,  
   139                i.e. the number of bytes.
   140 @param aRight  A pointer to the second (or right) block of 8 bit data to be 
   141                compared.
   142 @param aRightL The length of the second (or right) block of data to be compared 
   143                i.e. the number of bytes.
   144                
   145 @return Positive, if the first (or left) block of data is greater than the 
   146         second (or right) block of data.
   147         Negative, if the first (or left) block of data is less than the
   148         second (or right) block of data.
   149         Zero, if both the first (or left) and second (or right) blocks of data
   150         have the same length and the same content.
   151 */
   152 	{ return memcompare(aLeft, aLeftL, aRight, aRightL); }
   153 #endif
   154 
   155 
   156 
   157 
   158 // class RHeap
   159 inline TInt RHeap::SetBrk(TInt aBrk)
   160 	{ return ((RChunk*)&iChunkHandle)->Adjust(aBrk); }
   161 
   162 
   163 
   164 
   165 // class TChar
   166 #ifndef __KERNEL_MODE__
   167 inline void TChar::SetChar(TUint aChar)
   168 	{iChar=aChar;}
   169 
   170 
   171 
   172 
   173 inline void TChar::Fold()
   174 /**
   175 Converts the character to a form which can be used in tolerant comparisons 
   176 without control over the operations performed. 
   177 
   178 Tolerant comparisons are those which ignore character differences like case 
   179 and accents.
   180 
   181 This function can be used when searching for a string in a text file or a 
   182 file in a directory. Folding performs the following conversions: converts 
   183 to lowercase, strips accents, converts all digits representing the values 
   184 0..9 to the ordinary digit characters '0'..'9', converts all spaces (standard, 
   185 non-break, fixed-width, ideographic, etc.) to the ordinary space character 
   186 (0x0020), converts Japanese characters in the hiragana syllabary to katakana, 
   187 and converts East Asian halfwidth and fullwidth variants to their ordinary 
   188 forms. You can choose to perform any subset of these operations by using the 
   189 other function overload.
   190 
   191 @see User::Fold
   192 */
   193 	{iChar=User::Fold(iChar);}
   194 
   195 
   196 
   197 
   198 inline void TChar::LowerCase()
   199 /**
   200 Converts the character to its lowercase form.
   201 
   202 Characters lacking a lowercase form are unchanged.
   203 
   204 @see User::LowerCase
   205 */
   206 	{iChar=User::LowerCase(iChar);}
   207 
   208 
   209 
   210 
   211 inline void TChar::UpperCase()
   212 /**
   213 Converts the character to its uppercase form.
   214 
   215 Characters lacking an uppercase form are unchanged.
   216 
   217 @see User::UpperCase
   218 */
   219 	{iChar=User::UpperCase(iChar);}
   220 
   221 
   222 
   223 
   224 #ifdef _UNICODE
   225 inline void TChar::Fold(TInt aFlags)
   226 /**
   227 Converts the character to a form which can be used in tolerant comparisons 
   228 allowing selection of the specific fold operations to be performed.
   229 
   230 @param aFlags Flags which define the operations to be performed. The values 
   231               are defined in the enum beginning with EFoldCase.
   232 
   233 @see TChar::EFoldCase
   234 @see User::Fold
   235 */
   236 	{iChar=User::Fold(iChar,aFlags);}
   237 
   238 
   239 
   240 
   241 inline void TChar::TitleCase()
   242 /**
   243 Converts the character to its titlecase form.
   244 
   245 The titlecase form of a character is identical to its uppercase form unless 
   246 a specific titlecase form exists. Characters lacking a titlecase form are 
   247 unchanged.
   248 */
   249 	{iChar=User::TitleCase(iChar);}
   250 #endif
   251 
   252 
   253 
   254 
   255 inline TBool TChar::Eos() const
   256 /**
   257 Tests whether the character is the C/C++ end-of-string character - 0.
   258 
   259 @return True, if the character is 0; false, otherwise.
   260 */
   261 	{return(iChar==0);}
   262 #endif // _UNICODE
   263 
   264 
   265 
   266 
   267 // Class TCallBack
   268 inline TCallBack::TCallBack()
   269 /**
   270 Default constructor.
   271 	
   272 Sets the function pointer to Null.
   273 */
   274 	{iFunction=NULL;}
   275 
   276 
   277 
   278 
   279 inline TCallBack::TCallBack(TInt (*aFunction)(TAny *aPtr))
   280 	: iFunction(aFunction),iPtr(NULL)
   281 /**
   282 Constructs the callback object with the specified callback function.
   283 
   284 @param aFunction A pointer to the callback function. It takes an argument of
   285                  type TAny* and returns a TInt.
   286 				 It must be either a static member of a class or a function
   287 				 which is not a member of any class. 
   288 */
   289 	{}
   290 
   291 
   292 
   293 
   294 inline TCallBack::TCallBack(TInt (*aFunction)(TAny *aPtr),TAny *aPtr)
   295 	: iFunction(aFunction),iPtr(aPtr)
   296 /**
   297 Constructs the callback object with the specified callback function and
   298 a pointer to any object.
   299 
   300 @param aFunction A pointer to the callback function. It takes an argument of
   301                  type TAny* and returns a TInt.
   302 				 It must be either a static member of a class or a function
   303 				 which is not a member of any class. 
   304 @param aPtr      A pointer which is always passed to the callback function.
   305 */
   306 	{}
   307 
   308 
   309 
   310 
   311 /**
   312 Calls the callback function.
   313 	
   314 @return The value returned by the callback function. The meaning of this value
   315         depends entirely on the context in which the callback function
   316         is called.
   317         For example, when used with the CIdle class, a false (zero) value
   318         indicates that the callback function should not be 	called again.
   319         As another example, when used with the CPeriodic class, the return
   320         value is ignored and is irrelevant in that context.
   321 
   322 @see CIdle
   323 @see CPeriodic        
   324 */
   325 inline TInt TCallBack::CallBack() const
   326 	{ return (iFunction ? (*iFunction)(iPtr) : 0); }
   327 
   328 
   329 
   330 
   331 // Class TSglQue
   332 template <class T>
   333 inline TSglQue<T>::TSglQue()
   334 /**
   335 Constructs an empty list header and sets the offset value of the link object 
   336 to zero.
   337 
   338 In practice, never assume that the offset of the link object from the start 
   339 of a list element is zero, even if the link object is declared as the first 
   340 data member in the list element class.
   341 
   342 If this default constructor is used, then call the SetOffset() function of 
   343 the base class to ensure that the offset value is set correctly.
   344 
   345 @see TSglQueBase::SetOffset
   346 */
   347 	{}
   348 
   349 
   350 
   351 
   352 template <class T>
   353 inline TSglQue<T>::TSglQue(TInt aOffset)
   354 	: TSglQueBase(aOffset)
   355 /**
   356 Constructs an empty list header and sets the offset of the link object to the 
   357 specified value.
   358 
   359 @param aOffset The offset of the link object from the start of a list element. 
   360                 The macro _FOFF can be used to calculate this value.
   361 				
   362 @panic USER 75, if aOffset is not divisible by four.
   363 
   364 @see _FOFF
   365 */
   366 	{}
   367 
   368 
   369 
   370 
   371 template <class T>
   372 inline void TSglQue<T>::AddFirst(T &aRef)
   373 /**
   374 Inserts the specified list element at the front of the singly linked list.
   375 
   376 If the list is not empty, the specified element becomes the first in the list. 
   377 What was previously the first element becomes the second in the list.
   378 
   379 @param aRef The list element to be inserted at the front of the singly linked 
   380             list.
   381 */
   382 	{DoAddFirst(&aRef);}
   383 
   384 
   385 
   386 
   387 template <class T>
   388 inline void TSglQue<T>::AddLast(T &aRef)
   389 /**
   390 Inserts the specified list element at the back of the singly linked list.
   391 
   392 If the list is not empty, the specified element becomes the last in the list. 
   393 What was previously the last element becomes the next to last element in the 
   394 list.
   395 
   396 @param aRef The list element to be inserted at the back of the singly linked 
   397             list.
   398 */
   399 	{DoAddLast(&aRef);}
   400 
   401 
   402 
   403 
   404 template <class T>
   405 inline TBool TSglQue<T>::IsFirst(const T *aPtr) const
   406 /**
   407 Tests whether the specified element is the first in the singly linked list.
   408 
   409 @param aPtr A pointer to the element whose position in the list is to be
   410             checked.
   411 
   412 @return True, if the element is the first in the list; false, otherwise.
   413 */
   414 	{return(PtrAdd(aPtr,iOffset)==(T *)iHead);}
   415 
   416 
   417 
   418 
   419 template <class T>
   420 inline TBool TSglQue<T>::IsLast(const T *aPtr) const
   421 /**
   422 Tests whether the specified element is the last in the singly linked list.
   423 
   424 @param aPtr A pointer to the element whose position in the list is 
   425             to be checked.
   426 
   427 @return True, if the element is the last in the list; false, otherwise.
   428 */
   429 	{return(PtrAdd(aPtr,iOffset)==(T *)iLast);}
   430 
   431 
   432 
   433 
   434 template <class T>
   435 inline T *TSglQue<T>::First() const
   436 /**
   437 Gets a pointer to the first list element in the singly linked list.
   438 
   439 @return A pointer to the first list element in the singly linked list. If 
   440         the list is empty, this pointer is not necessarily NULL and must not
   441 		be assumed to point to a valid object.
   442 */
   443 	{return(PtrSub((T *)iHead,iOffset));}
   444 
   445 
   446 
   447 
   448 template <class T>
   449 inline T *TSglQue<T>::Last() const
   450 /**
   451 Gets a pointer to the last list element in the singly linked list.
   452 
   453 @return A pointer to the last list element in the singly linked list. If the 
   454         list is empty, this pointer is not necessarily NULL and must not be
   455 		assumed to point to a valid object.
   456 */
   457 	{return(PtrSub((T *)iLast,iOffset));}
   458 
   459 
   460 
   461 
   462 template <class T>
   463 inline void TSglQue<T>::Remove(T &aRef)
   464 /**
   465 Removes the specified element from the singly linked list.
   466 
   467 The singly linked list must not be empty.
   468 
   469 @param aRef A list element to be removed from the singly linked list.
   470 
   471 @panic USER 76, if the element to be removed is not in the list
   472 */
   473 	{DoRemove(&aRef);}
   474 
   475 
   476 
   477 
   478 // Class TDblQue
   479 template <class T>
   480 inline TDblQue<T>::TDblQue()
   481 /**
   482 Constructs an empty list header and sets the offset value of the link object 
   483 to zero.
   484 
   485 In practice, never assume that the offset of the link object from the start 
   486 of a list element is zero, even if the link object is declared as the first 
   487 data member in the list element class.
   488 
   489 If this default constructor is used, then call the SetOffset() function of 
   490 the base class to ensure that the offset value is set correctly.
   491 
   492 @see TDblQueBase::SetOffset()
   493 */
   494 	{}
   495 
   496 
   497 
   498 
   499 template <class T>
   500 inline TDblQue<T>::TDblQue(TInt aOffset)
   501 	: TDblQueBase(aOffset)
   502 /**
   503 Constructs an empty list header and sets the offset of the link object to the 
   504 specified value.
   505 
   506 @param aOffset The offset of the link object from the start of a list element. 
   507                 The macro _FOFF can be used to calculate this value.
   508 				
   509 @panic USER 78. if aOffset is not divisble by 4.
   510 				  
   511 @see _FOFF
   512 */
   513 	{}
   514 
   515 
   516 
   517 
   518 template <class T>
   519 inline void TDblQue<T>::AddFirst(T &aRef)
   520 /**
   521 Inserts the specified list element at the front of the doubly linked list.
   522 
   523 If the list is not empty, the specified element becomes the first in the list. 
   524 What was previously the first element becomes the second in the list.
   525 
   526 @param aRef The list element to be inserted at the front of the doubly linked 
   527             list.
   528 */
   529 	{DoAddFirst(&aRef);}
   530 
   531 
   532 
   533 
   534 template <class T>
   535 inline void TDblQue<T>::AddLast(T &aRef)
   536 /**
   537 Inserts the specified list element at the back of the doubly linked list.
   538 
   539 If the list is not empty, the specified element becomes the last in the list. 
   540 What was previously the last element becomes the next to last element in the 
   541 list.
   542 
   543 @param aRef The list element to be inserted at the back of the doubly linked 
   544             list.
   545 */
   546 	{DoAddLast(&aRef);}
   547 
   548 
   549 
   550 
   551 template <class T>
   552 inline TBool TDblQue<T>::IsHead(const T *aPtr) const
   553 /**
   554 Tests whether the end of a list has been reached.
   555 
   556 A doubly linked list is circular; in following the chain of elements in a 
   557 list (e.g. using the iterator operator++ or operator--), the chain eventually 
   558 reaches the end of the list and aPtr corresponds to the header (although it 
   559 will not point to a valid T object).
   560 
   561 @param aPtr The pointer value to be checked. 
   562 
   563 @return True, if the end of the list has been reached. False, if the end of 
   564         the list has not been reached; aPtr points to an element in the list.
   565 */
   566 	{return(PtrAdd(aPtr,iOffset)==(T *)&iHead);}
   567 
   568 
   569 
   570 
   571 template <class T>
   572 inline TBool TDblQue<T>::IsFirst(const T *aPtr) const
   573 /**
   574 Tests whether the specified element is the first in the doubly linked list.
   575 
   576 @param aPtr A pointer to the element whose position in the list is to be checked.
   577 
   578 @return True, if the element is the first in the list; false, otherwise.
   579 */
   580 	{return(PtrAdd(aPtr,iOffset)==(T *)iHead.iNext);}
   581 
   582 
   583 
   584 
   585 template <class T>
   586 inline TBool TDblQue<T>::IsLast(const T *aPtr) const
   587 /**
   588 Tests whether the specified element is the last in the doubly linked list.
   589 
   590 @param aPtr A pointer to the element whose position in the list is to be checked.
   591 
   592 @return True, if the element is the last in the list; false, otherwise.
   593 */
   594 	{return(PtrAdd(aPtr,iOffset)==(T *)iHead.iPrev);}
   595 
   596 
   597 
   598 
   599 template <class T>
   600 inline T *TDblQue<T>::First() const
   601 /**
   602 Gets a pointer to the first list element in the doubly linked list.
   603 
   604 @return A pointer to the first list element in the doubly linked list. If 
   605         the list is empty, this pointer is not necessarily NULL and must not
   606 		be assumed to point to a valid object.
   607 */
   608 	{
   609 #if defined (_DEBUG)
   610 	__DbgTestEmpty();
   611 #endif
   612     return(PtrSub((T *)iHead.iNext,iOffset));
   613     }
   614 
   615 
   616 
   617 
   618 template <class T>
   619 inline T *TDblQue<T>::Last() const
   620 /**
   621 Gets a pointer to the last list element in the doubly linked list.
   622 
   623 @return A pointer to the last list element in the doubly linked list. If the 
   624         list is empty, this pointer is not necessarily NULL and must not be assumed 
   625         to point to a valid object.
   626 */
   627 	{
   628 #if defined (_DEBUG)
   629 	__DbgTestEmpty();
   630 #endif
   631 	return(PtrSub((T *)iHead.iPrev,iOffset));
   632 	}
   633 
   634 
   635 
   636 
   637 // Class TPriQue
   638 template <class T>
   639 inline TPriQue<T>::TPriQue()
   640 /**
   641 Default constructor.
   642 
   643 Constructs an empty list header and sets the offset value of the link
   644 object to zero.
   645 
   646 In practice, never assume that the offset of the link object from the start
   647 of a list element is zero, even if the link object is declared as the first
   648 data member in the list element class.
   649 
   650 If this default constructor is used, then call the SetOffset() function of
   651 the base class to ensure that the offset value is set correctly.
   652 
   653 @see TDblQueBase::SetOffset
   654 */
   655 	{}
   656 
   657 
   658 
   659 
   660 template <class T>
   661 inline TPriQue<T>::TPriQue(TInt aOffset)
   662 	: TDblQueBase(aOffset)
   663 /**
   664 Constructs an empty list header and sets the offset of the link object
   665 to the specified value.
   666 
   667 @param aOffset The offset of the link object from the start of a list element.
   668                 The macro _FOFF can be used to calculate this value.
   669 				
   670 @panic USER 78 if aOffset is not divisible by four.		  
   671 */
   672 	{}
   673 
   674 
   675 
   676 
   677 template <class T>
   678 inline void TPriQue<T>::Add(T &aRef)
   679 /**
   680 Inserts the specified list element in descending priority order.
   681 
   682 If there is an existing list element with the same priority, then the new
   683 element is added after the existing element.
   684 
   685 @param aRef The list element to be inserted.
   686 */
   687 	{DoAddPriority(&aRef);}
   688 
   689 
   690 
   691 
   692 template <class T>
   693 inline TBool TPriQue<T>::IsHead(const T *aPtr) const
   694 /**
   695 Tests whether the end of a list has been reached.
   696 
   697 A doubly linked list is circular; in following the chain of elements in a list
   698 (e.g. using the iterator operator++ or operator--), the chain eventually
   699 reaches the end of the list and aPtr corresponds to the header (although it
   700 will not point to a valid T object).
   701 
   702 @param aPtr The pointer value to be checked.
   703 
   704 @return True, if the end of the list has been reached. False, if the end of the
   705         list has not been reached; aPtr points to an element in the list.
   706 */
   707 	{return(PtrAdd(aPtr,iOffset)==(T *)&iHead);}
   708 
   709 
   710 
   711 
   712 template <class T>
   713 inline TBool TPriQue<T>::IsFirst(const T *aPtr) const
   714 /**
   715 Tests whether the specified element is the first in the linked list.
   716 
   717 @param aPtr A pointer to the element whose position in the list is to
   718             be checked.
   719 
   720 @return True, if the element is the first in the list; false, otherwise.
   721 */
   722 	{return(PtrAdd(aPtr,iOffset)==(T *)iHead.iNext);}
   723 
   724 
   725 
   726 
   727 template <class T>
   728 inline TBool TPriQue<T>::IsLast(const T *aPtr) const
   729 /**
   730 Tests whether the specified element is the last in the linked list.
   731 
   732 @param aPtr A pointer to the element whose position in the list is to
   733             be checked.
   734 
   735 @return True, if the element is the last in the list; false, otherwise.
   736 */
   737 	{return(PtrAdd(aPtr,iOffset)==(T *)iHead.iPrev);}
   738 
   739 
   740 
   741 
   742 template <class T>
   743 inline T *TPriQue<T>::First() const
   744 /**
   745 Gets a pointer to the first list element in the linked list.
   746 
   747 @return A pointer to the first list element in the linked list.
   748         If the list is empty, this pointer is not necessarily NULL and must
   749 		not be assumed to point to a valid object.
   750 */
   751 	{return(PtrSub((T *)iHead.iNext,iOffset));}
   752 
   753 
   754 
   755 
   756 template <class T>
   757 inline T *TPriQue<T>::Last() const
   758 /**
   759 Gets a pointer to the last list element in the linked list.
   760 
   761 @return A pointer to the last list element in the linked list.
   762         If the list is empty, this pointer is not necessarily NULL and must
   763 		not be assumed to point to a valid object.
   764 */
   765 	{return(PtrSub((T *)iHead.iPrev,iOffset));}
   766 
   767 
   768 
   769 
   770 // Class TDeltaQue
   771 template <class T>
   772 inline TDeltaQue<T>::TDeltaQue()
   773 /**
   774 Constructs an empty list header and sets the offset value of the link object 
   775 to zero.
   776 
   777 In practice, never assume that the offset of the link object from the start 
   778 of a list element is zero, even if the link object is declared as the first 
   779 data member in the list element class.
   780 
   781 If this default constructor is used, then call the TDblQueBase::SetOffset() 
   782 function in the base class to ensure that the offset value is set correctly.
   783 
   784 TDeltaQueBase::iFirstDelta is set to NULL.
   785 
   786 @see TDblQueBase::SetOffset
   787 */
   788 	{}
   789 
   790 
   791 
   792 
   793 template <class T>
   794 inline TDeltaQue<T>::TDeltaQue(TInt aOffset)
   795 	: TDeltaQueBase(aOffset)
   796 /**
   797 Constructs an empty list header and sets the offset of the link object to the 
   798 specified value.
   799 
   800 TDeltaQueBase::iFirstDelta is set to NULL.
   801 
   802 @param aOffset The offset of the link object from the start of a list element. 
   803                 The macro _FOFF can be used to calculate this value. 
   804 
   805 @panic USER 78, if aOffset is not divisible by four.
   806 				  
   807 @see _FOFF
   808 */
   809 	{}
   810 
   811 
   812 
   813 
   814 template <class T>
   815 inline void TDeltaQue<T>::Add(T &aRef,TInt aDelta)
   816 /**
   817 Adds the specified list element, having the specified 'distance' from the
   818 nominal zero point, into the list.
   819 
   820 The element is added into the list, the adjacent delta values adjusted, and 
   821 a suitable delta value assigned to the new element, so that the new element 
   822 is at the specified 'distance' from the nominal zero point.
   823 
   824 @param aRef   The list element to be inserted.
   825 @param aDelta The 'distance' from the nominal zero point.
   826 */
   827 	{DoAddDelta(&aRef,aDelta);}
   828 
   829 
   830 
   831 
   832 template <class T>
   833 inline void TDeltaQue<T>::Remove(T &aRef)
   834 /**
   835 Removes the specified list element from the linked list.
   836 
   837 The delta value of the element following the removed element is adjusted
   838 so that its 'distance' from the nominal zero point remains the same.
   839 
   840 @param aRef The list element to be removed.
   841 */
   842 	{DoRemove(&aRef);}
   843 
   844 
   845 
   846 
   847 template <class T>
   848 inline T *TDeltaQue<T>::RemoveFirst()
   849 /**
   850 Removes the first list element from the linked list if its delta value is zero 
   851 or negative.
   852 
   853 @return A pointer to the element removed from the linked list. This is NULL, 
   854         if the first element has a positive delta value.
   855 */
   856 	{return((T *) DoRemoveFirst());}
   857 
   858 
   859 
   860 
   861 // Class TSglQueIter
   862 template <class T>
   863 inline TSglQueIter<T>::TSglQueIter(TSglQueBase &aQue)
   864 	: TSglQueIterBase(aQue)
   865 /**
   866 Constructs the iterator for the specified singly linked list.
   867 
   868 The iterator can be constructed whether or not the list contains any elements.
   869 
   870 If the list does contain elements, the iterator pointer is set to the first one.
   871 
   872 If the list has no elements, the iterator pointer is not set and the conversion 
   873 operator T*() and the post increment operator ++ subsequently return NULL. 
   874 Once elements have been added to the list, use either the
   875 TSglQueIter::Set() function or the TSglQueIterBase::SetToFirst() function to set the 
   876 iterator pointer.
   877 
   878 @param aQue A reference to a singly linked list header.
   879 
   880 @see TSglQueIter::Set
   881 @see TSglQueIterBase::SetToFirst
   882 */
   883 	{}
   884 
   885 
   886 
   887 
   888 template <class T>
   889 inline void TSglQueIter<T>::Set(T &aLink)
   890 /**
   891 Sets the iterator to point to a specific element in the list.
   892 
   893 This function can be used to alter the pointer at any time during the iterator's 
   894 existence. The referenced element must be in the list, otherwise the result 
   895 is undefined.
   896 
   897 @param aLink A reference to the element from where iteration is to continue.
   898 */
   899 	{DoSet(&aLink);}
   900 
   901 
   902 
   903 
   904 template <class T>
   905 inline TSglQueIter<T>::operator T *()
   906 /**
   907 Gets a pointer to the iterator’s current element.
   908 
   909 The operator is normally used implicitly; e.g. some member functions of the
   910 list header class TSglQue require a pointer to an element (of type class T)
   911 as a parameter, but in practice an iterator is often passed instead.
   912 This operator performs the necessary conversion.
   913 */
   914 	{return((T *)DoCurrent());}
   915 
   916 
   917 
   918 
   919 template <class T>
   920 inline T *TSglQueIter<T>::operator++(TInt)
   921 /**
   922 Gets a pointer to the iterator's current element and then sets the iterator 
   923 to point to the next element.
   924 
   925 Repeated use of this operator allows successive elements to be accessed.
   926 
   927 @return A pointer to the current list element, if the iterator points to an 
   928         element. NULL, if the iterator does not point to an element; i.e. the
   929 		iterator pointer has reached the end of the list.
   930 */
   931 	{return((T *)DoPostInc());}
   932 
   933 
   934 
   935 
   936 // Class TDblQueIter
   937 template <class T>
   938 inline TDblQueIter<T>::TDblQueIter(TDblQueBase &aQue)
   939 	: TDblQueIterBase(aQue)
   940 /**
   941 Constructs the iterator for the specified doubly linked list
   942 
   943 The iterator can be constructed whether or not the list contains any elements.
   944 
   945 If the list does contain elements, the iterator pointer is set to the first one.
   946 
   947 If the list has no elements, the iterator pointer is not set and the conversion 
   948 operator T*(), the post increment operator++() and the post decrement operator 
   949 --() subsequently return NULL. Once elements have been added to the list, use 
   950 either the TDblQueIter::Set() function, the TDblQueIterBase::SetToFirst() 
   951 function or the TDblQueIterBase::SetToLast() function to set the iterator 
   952 pointer.
   953 
   954 @param aQue A reference to a doubly linked list header.
   955 
   956 @see TDblQueIter::Set
   957 @see TDblQueIterBase::SetToFirst
   958 @see TDblQueIterBase::SetToLast
   959 */
   960 	{}
   961 
   962 
   963 
   964 
   965 template <class T>
   966 inline void TDblQueIter<T>::Set(T &aLink)
   967 /**
   968 Sets the iterator to point to a specific element in the list.
   969 
   970 This function can be used to alter the pointer at any time during
   971 the iterator's existence. The referenced element must be in the list,
   972 otherwise the result is undefined.
   973 
   974 @param aLink A reference to the element from where iteration is to continue.
   975 */
   976 	{DoSet(&aLink);}
   977 
   978 
   979 
   980 
   981 template <class T>
   982 inline TDblQueIter<T>::operator T *()
   983 /**
   984 Gets a pointer to the iterator’s current element.
   985 
   986 The operator is normally used implicitly; e.g. some member functions of the
   987 list header class TDblQue require a pointer to an element (of type class T)
   988 as a parameter but in practice, an iterator is often passed instead.
   989 This operator performs the necessary conversion.
   990 
   991 @return A pointer to the current element, if the iterator points to an element
   992         in the list. NULL, if the iterator does not point to an element;
   993 		i.e. the iterator pointer has previously reached the end of the list
   994 		(see operator++) or the start of the list (see operator--) or
   995 		the list is empty. 
   996 */
   997 	{return((T *) DoCurrent());}
   998 
   999 
  1000 
  1001 
  1002 template <class T>
  1003 inline T *TDblQueIter<T>::operator++(TInt)
  1004 /**
  1005 Gets a pointer to the iterator's current element and then sets the iterator 
  1006 to point to the next element.
  1007 
  1008 Repeated use of this operator allows successive 
  1009 elements to be accessed in the forwards direction.
  1010 
  1011 @return A pointer to the current list element, if the iterator points to an 
  1012         element. NULL, if the iterator does not point to an element;
  1013 		i.e. the iterator pointer has reached the end of the list.
  1014 */
  1015 	{return((T *) DoPostInc());}
  1016 
  1017 
  1018 
  1019 
  1020 template <class T>
  1021 inline T *TDblQueIter<T>::operator--(TInt)
  1022 /**
  1023 Gets a pointer to the iterator's current element and then sets the iterator 
  1024 to point to the previous element.
  1025 
  1026 Repeated use of this operator allows successive 
  1027 elements to be accessed in the backwards direction.
  1028 
  1029 @return A pointer to the current element, if the iterator points to an element. 
  1030         NULL, if the iterator does not point to an element; i.e. the iterator
  1031 		pointer has reached the beginning of the list.
  1032 */
  1033 	{return((T *) DoPostDec());}
  1034 
  1035 
  1036 
  1037 
  1038 // Class TKey
  1039 inline void TKey::SetPtr(const TAny *aPtr)
  1040 /**
  1041 Sets the pointer to a sample element whose key is to be used for comparison.
  1042 	
  1043 The element can be in an existing array or it can be located anywhere in
  1044 addressable memory.
  1045 	
  1046 The At() member function supplied by a derived class must return a pointer 
  1047 to this sample element's key when passed an index value of KIndexPtr.
  1048 	
  1049 SetPtr() must be called before calling User::BinarySearch() because this algorithm 
  1050 uses the key of this sample element as the basis for searching the array.
  1051 	
  1052 @param aPtr A pointer to a sample element.
  1053 */
  1054 	{iPtr=aPtr;}
  1055 
  1056 
  1057 
  1058 
  1059 // Class TCharF
  1060 inline TCharF::TCharF(TUint aChar)
  1061 	: TChar(User::Fold(aChar))
  1062 /**
  1063 Constructs this 'fold character' object and initialises it with the specified 
  1064 value.
  1065 
  1066 @param aChar The initialisation value.
  1067 */
  1068 	{}
  1069 
  1070 
  1071 
  1072 
  1073 inline TCharF::TCharF(const TChar& aChar)
  1074 	: TChar(User::Fold(aChar))
  1075 /**
  1076 Constructs this 'fold character' object and initialises it with the value of 
  1077 the TChar object aChar.
  1078 
  1079 @param aChar The character object to use as the initialisation value.
  1080 */
  1081 	{}
  1082 
  1083 
  1084 
  1085 
  1086 inline TCharF& TCharF::operator=(TUint aChar)
  1087 /**
  1088 Assigns an unsigned integer value to the 'fold character' object.
  1089 
  1090 @param aChar The value to assign.
  1091 
  1092 @return A reference to this 'fold character' object.
  1093 */
  1094 	{SetChar(User::Fold(aChar));return(*this);}
  1095 
  1096 
  1097 
  1098 
  1099 inline TCharF& TCharF::operator=(const TChar& aChar)
  1100 /**
  1101 Assigns the specified character object to this 'fold character' object.
  1102 
  1103 @param aChar The character object to assign.
  1104 
  1105 @return A reference to this 'fold character' object.
  1106 */
  1107 	{SetChar(User::Fold(aChar));return(*this);}
  1108 
  1109 
  1110 
  1111 
  1112 // Class TCharLC
  1113 inline TCharLC::TCharLC(TUint aChar)
  1114 	: TChar(User::LowerCase(aChar))
  1115 /**
  1116 Constructs this 'character to lower case' object and initialises it with the 
  1117 specified value.
  1118 
  1119 @param aChar The initialisation value.
  1120 
  1121 */
  1122 	{}
  1123 
  1124 
  1125 
  1126 
  1127 inline TCharLC::TCharLC(const TChar& aChar)
  1128 	: TChar(User::LowerCase(aChar))
  1129 /**
  1130 Constructs this 'character to lower case' object and initialises it with the 
  1131 value of the TChar object aChar.
  1132 
  1133 @param aChar The character object to use as the initialisation value.
  1134 */
  1135 	{}
  1136 
  1137 
  1138 
  1139 
  1140 inline TCharLC& TCharLC::operator=(TUint aChar)
  1141 /**
  1142 Assigns an unsigned integer value to the 'character to lower case' object.
  1143 
  1144 @param aChar The value to assign.
  1145 
  1146 @return A reference to this 'character to lower case' object.
  1147 */
  1148 	{SetChar(User::LowerCase(aChar));return(*this);}
  1149 
  1150 
  1151 
  1152 
  1153 inline TCharLC& TCharLC::operator=(const TChar& aChar)
  1154 /**
  1155 Assigns the specified character object to this 'character to lower case'
  1156 object.
  1157 
  1158 @param aChar The character object to assign.
  1159 
  1160 @return A reference to this 'character to lower case' object.
  1161 */
  1162 	{SetChar(User::LowerCase(aChar));return(*this);}
  1163 
  1164 
  1165 
  1166 
  1167 // Class TCharUC
  1168 inline TCharUC::TCharUC(TUint aChar)
  1169 	: TChar(User::UpperCase(aChar))
  1170 /**
  1171 Constructs this 'character to upper case' object and initialises it with the 
  1172 specified value.
  1173 
  1174 @param aChar The initialisation value.
  1175 */
  1176 	{}
  1177 
  1178 
  1179 
  1180 
  1181 inline TCharUC::TCharUC(const TChar& aChar)
  1182 	: TChar(User::UpperCase(aChar))
  1183 /**
  1184 Constructs this 'character to upper case' object and initialises it with the 
  1185 value of the TChar object aChar.
  1186 
  1187 @param aChar The character object to use as the initialisation value.
  1188 */
  1189 	{}
  1190 
  1191 
  1192 
  1193 
  1194 inline TCharUC& TCharUC::operator=(TUint aChar)
  1195 /**
  1196 Assigns an unsigned integer value to the 'character to upper case'  object.
  1197 
  1198 @param aChar The value to assign.
  1199 
  1200 @return A reference to this 'character to upper case'  object.
  1201 */
  1202 	{SetChar(User::UpperCase(aChar));return(*this);}
  1203 
  1204 
  1205 
  1206 
  1207 inline TCharUC& TCharUC::operator=(const TChar& aChar)
  1208 /**
  1209 Assigns the specified character object to this 'character to upper case' 
  1210 object.
  1211 
  1212 @param aChar The character object to assign.
  1213 
  1214 @return A reference to this 'character to upper case'  object.
  1215 */
  1216 	{SetChar(User::UpperCase(aChar));return(*this);}
  1217 
  1218 
  1219 
  1220 
  1221 // Class TDateTime
  1222 inline TDateTime::TDateTime()
  1223 	: iYear(1980),
  1224 	  iMonth(EJanuary), 
  1225 	  iDay(1),
  1226 	  iHour(0),
  1227 	  iMinute(0),
  1228 	  iSecond(0),
  1229 	  iMicroSecond(0)
  1230 /**
  1231 Constructs an uninitialised TDateTime object.
  1232 */
  1233 	{}           
  1234 
  1235 
  1236 
  1237 
  1238 inline TInt TDateTime::Year() const
  1239 /**
  1240 Gets the year component of the date/time.
  1241 
  1242 A negative value indicates a BC date.
  1243 
  1244 @return The year
  1245 */
  1246 	{return(iYear);}
  1247 
  1248 
  1249 
  1250 
  1251 inline TMonth TDateTime::Month() const
  1252 /**
  1253 Gets the month component of the date/time.
  1254 
  1255 @return The month. EJanuary to EDecember. Offset from zero, so add one before 
  1256         displaying the month number.
  1257 */
  1258 	{return(iMonth);}
  1259 
  1260 
  1261 
  1262 
  1263 inline TInt TDateTime::Day() const
  1264 /**
  1265 Gets the day component of the date/time.
  1266 
  1267 @return The day. Offset from zero, so add one before displaying the day number.
  1268 */
  1269 	{return(iDay);}
  1270 
  1271 
  1272 
  1273 
  1274 inline TInt TDateTime::Hour() const
  1275 /**
  1276 Gets the hour component of the date/time.
  1277 
  1278 @return The hour.
  1279 */
  1280 	{return(iHour);}
  1281 
  1282 
  1283 
  1284 
  1285 inline TInt TDateTime::Minute() const
  1286 /**
  1287 Gets the minute component of the date/time.
  1288 
  1289 @return The minute.
  1290 */
  1291 	{return(iMinute);}
  1292 
  1293 
  1294 
  1295 
  1296 inline TInt TDateTime::Second() const
  1297 /**
  1298 Gets the second component of the date/time.
  1299 
  1300 @return The second.
  1301 */
  1302 	{return(iSecond);}
  1303 
  1304 
  1305 
  1306 
  1307 inline TInt TDateTime::MicroSecond() const
  1308 /**
  1309 Gets the microsecond component of the date/time.
  1310 
  1311 @return The microsecond.
  1312 */
  1313 	{return(iMicroSecond);}
  1314 
  1315 // Class TTimeIntervalMicroSeconds
  1316 
  1317 
  1318 
  1319 
  1320 inline TTimeIntervalMicroSeconds::TTimeIntervalMicroSeconds()
  1321 /**
  1322 Default constructor.
  1323 
  1324 Constructs an uninitialised object.
  1325 */
  1326 	{}
  1327 
  1328 
  1329 
  1330 
  1331 inline TTimeIntervalMicroSeconds::TTimeIntervalMicroSeconds(const TInt64& aInterval)
  1332 	: iInterval(aInterval)
  1333 /**
  1334 Constructs the object with the specified 64-bit interval value.
  1335 
  1336 @param aInterval The 64-bit interval value with which the object is to be
  1337                  initialised.
  1338 */
  1339 	{}
  1340 
  1341 
  1342 
  1343 
  1344 inline TTimeIntervalMicroSeconds& TTimeIntervalMicroSeconds::operator=(const TInt64& aInterval)
  1345 /**
  1346 Assigns a 64-bit integer value to this object.
  1347 
  1348 @param aInterval The 64-bit integer interval value to be assigned.
  1349 
  1350 @return A reference to this object.
  1351 */
  1352 	{iInterval=aInterval;return(*this);}
  1353 
  1354 
  1355 
  1356 
  1357 inline TBool TTimeIntervalMicroSeconds::operator==(const TTimeIntervalMicroSeconds& aInterval) const
  1358 /**
  1359 Tests whether this TTimeIntervalMicroSeconds object is equal to the
  1360 specified TTimeIntervalMicroSeconds object.
  1361 
  1362 @param aInterval The time interval to be compared with this time interval.
  1363 
  1364 @return True if the two time intervals are equal. False otherwise.
  1365 */
  1366 	{return(iInterval==aInterval.iInterval);}
  1367 
  1368 
  1369 
  1370 
  1371 inline TBool TTimeIntervalMicroSeconds::operator!=(const TTimeIntervalMicroSeconds& aInterval) const
  1372 /**
  1373 Tests whether this TTimeIntervalMicroSeconds object is not equal to the
  1374 specified TTimeIntervalMicroSeconds object.
  1375 
  1376 @param aInterval The time interval to be compared with this time interval.
  1377 
  1378 @return True if the two time intervals are not equal. False otherwise.
  1379 */
  1380 	{return(iInterval!=aInterval.iInterval);}
  1381 
  1382 
  1383 
  1384 
  1385 inline TBool TTimeIntervalMicroSeconds::operator>=(const TTimeIntervalMicroSeconds& aInterval) const
  1386 /**
  1387 Tests whether this TTimeIntervalMicroSeconds object is greater than or equal to the
  1388 specified TTimeIntervalMicroSeconds object.
  1389 
  1390 @param aInterval The time interval to be compared with this time interval.
  1391 
  1392 @return True if this time interval is greater than or equal to the specified
  1393         time interval. False otherwise.
  1394 */
  1395 	{return(iInterval>=aInterval.iInterval);}
  1396 
  1397 
  1398 
  1399 
  1400 inline TBool TTimeIntervalMicroSeconds::operator<=(const TTimeIntervalMicroSeconds& aInterval) const
  1401 /**
  1402 Tests whether this TTimeIntervalMicroSeconds object is less than or equal to the
  1403 specified TTimeIntervalMicroSeconds object.
  1404 
  1405 @param aInterval The time interval to be compared with this time interval.
  1406 
  1407 @return True if this time interval is less than or equal to the specified
  1408         time interval. False otherwise.
  1409 */
  1410 	{return(iInterval<=aInterval.iInterval);}
  1411 
  1412 
  1413 
  1414 
  1415 inline TBool TTimeIntervalMicroSeconds::operator>(const TTimeIntervalMicroSeconds& aInterval) const
  1416 /**
  1417 Tests whether this TTimeIntervalMicroSeconds object is greater than the
  1418 specified TTimeIntervalMicroSeconds object.
  1419 
  1420 @param aInterval The time interval to be compared with this time interval.
  1421 
  1422 @return True if this time interval is greater than the specified
  1423         time interval. False otherwise.
  1424 */
  1425 	{return(iInterval>aInterval.iInterval);}
  1426 
  1427 
  1428 
  1429 
  1430 inline TBool TTimeIntervalMicroSeconds::operator<(const TTimeIntervalMicroSeconds& aInterval) const
  1431 /**
  1432 Tests whether this TTimeIntervalMicroSeconds object is less than the
  1433 specified TTimeIntervalMicroSeconds object.
  1434 
  1435 @param aInterval The time interval to be compared with this time interval.
  1436 
  1437 @return True if this time interval is less than the specified
  1438         time interval. False otherwise.
  1439 */
  1440 	{return(iInterval<aInterval.iInterval);}
  1441 
  1442 
  1443 
  1444 
  1445 inline const TInt64& TTimeIntervalMicroSeconds::Int64() const
  1446 /**
  1447 Gets the time interval as a 64-bit integer value.
  1448 
  1449 @return This 64-bit integer time interval value.
  1450 */
  1451 	{return(iInterval);}
  1452 
  1453 
  1454 
  1455 
  1456 // Class TTimeIntervalBase
  1457 inline TTimeIntervalBase::TTimeIntervalBase()
  1458 /**
  1459 Default constructor.
  1460 */
  1461 	{}
  1462 
  1463 
  1464 
  1465 
  1466 inline TTimeIntervalBase::TTimeIntervalBase(TInt aInterval)
  1467 	: iInterval(aInterval)
  1468 /**
  1469 Constructor taking an interval value.
  1470 
  1471 @param aInterval The interval value.
  1472 */
  1473 	{}
  1474 
  1475 
  1476 
  1477 
  1478 inline TBool TTimeIntervalBase::operator==(TTimeIntervalBase aInterval) const
  1479 /**
  1480 Tests whether this time interval is the same as the specified time interval.
  1481 
  1482 @param aInterval The time interval to be compared with this time interval.
  1483 
  1484 @return True if the two time intervals are equal. False otherwise.
  1485 */
  1486 	{return(iInterval==aInterval.iInterval);}
  1487 
  1488 
  1489 
  1490 
  1491 inline TBool TTimeIntervalBase::operator!=(TTimeIntervalBase aInterval) const
  1492 /**
  1493 Tests whether this time interval is not the same as the specified
  1494 time interval.
  1495 
  1496 @param aInterval The time interval to be compared with this time interval.
  1497 
  1498 @return True if the two time intervals differ. False otherwise.
  1499 */
  1500 	{return(iInterval!=aInterval.iInterval);}
  1501 
  1502 
  1503 
  1504 
  1505 inline TBool TTimeIntervalBase::operator>=(TTimeIntervalBase aInterval) const
  1506 /**
  1507 Tests whether this time interval is greater than or equal to the
  1508 specified time interval.
  1509 
  1510 @param aInterval The time interval to be compared with this time interval.
  1511 
  1512 @return True if this time interval is greater than or equal to the specified
  1513         time interval. False otherwise.
  1514 */
  1515 	{return(iInterval>=aInterval.iInterval);}
  1516 
  1517 
  1518 
  1519 
  1520 inline TBool TTimeIntervalBase::operator<=(TTimeIntervalBase aInterval) const
  1521 /**
  1522 Tests whether this time interval is less than or equal to the
  1523 specified time interval.
  1524 
  1525 @param aInterval The time interval to be compared with this time interval.
  1526 
  1527 @return True if this time interval is less than or equal to the specified
  1528         time interval. False otherwise.
  1529 */
  1530 	{return(iInterval<=aInterval.iInterval);}
  1531 
  1532 
  1533 
  1534 
  1535 inline TBool TTimeIntervalBase::operator>(TTimeIntervalBase aInterval) const
  1536 /**
  1537 Tests whether this time interval is greater than the specified time interval.
  1538 
  1539 @param aInterval The time interval to be compared with this time interval.
  1540 
  1541 @return True if this time interval is greater than the specified
  1542         time interval. False otherwise.
  1543 */
  1544 	{return(iInterval>aInterval.iInterval);}
  1545 
  1546 
  1547 
  1548 
  1549 inline TBool TTimeIntervalBase::operator<(TTimeIntervalBase aInterval) const
  1550 /**
  1551 Tests whether this time interval is less than the specified time interval.
  1552 
  1553 @param aInterval The time interval to be compared with this time interval.
  1554 
  1555 @return True if this time interval is less than the specified
  1556         time interval. False otherwise.
  1557 */
  1558 	{return(iInterval<aInterval.iInterval);}
  1559 
  1560 
  1561 
  1562 
  1563 inline TInt TTimeIntervalBase::Int() const
  1564 /** 
  1565 Gets the time interval as a 32 bit integer.
  1566 
  1567 @return The time interval as a 32 bit integer.
  1568 */
  1569 	{return(iInterval);}
  1570 
  1571 
  1572 
  1573 
  1574 // Class TTimeIntervalMicroSeconds32
  1575 inline TTimeIntervalMicroSeconds32::TTimeIntervalMicroSeconds32()
  1576 /**
  1577 Default constructor.
  1578 
  1579 Constructs an uninitialised object.
  1580 */
  1581 	{}
  1582 
  1583 
  1584 
  1585 
  1586 inline TTimeIntervalMicroSeconds32::TTimeIntervalMicroSeconds32(TInt aInterval)
  1587     : TTimeIntervalBase(aInterval)
  1588 /**
  1589 Constructs the object with the specified interval value.
  1590 
  1591 @param aInterval The interval value with which the object is to be initialised.
  1592 */
  1593 	{}
  1594 
  1595 
  1596 
  1597 
  1598 inline TTimeIntervalMicroSeconds32& TTimeIntervalMicroSeconds32::operator=(TInt aInterval)
  1599 /**
  1600 Assigns a value to this object.
  1601 
  1602 @param aInterval The interval value to be assigned.
  1603 
  1604 @return A reference to this object.
  1605 */
  1606 	{iInterval=aInterval;return(*this);}
  1607 
  1608 
  1609 
  1610 
  1611 // Class TTimeIntervalSeconds
  1612 inline TTimeIntervalSeconds::TTimeIntervalSeconds()
  1613 /**
  1614 Default constructor.
  1615 
  1616 Constructs an uninitialised object.
  1617 */
  1618 	{}
  1619 
  1620 
  1621 
  1622 
  1623 inline TTimeIntervalSeconds::TTimeIntervalSeconds(TInt aInterval)
  1624 	: TTimeIntervalBase(aInterval)
  1625 /**
  1626 Constructs the object with the specified interval value.
  1627 
  1628 @param aInterval The interval value with which the object is to be initialised.
  1629 */
  1630 	{}
  1631 
  1632 
  1633 
  1634 
  1635 inline TTimeIntervalSeconds& TTimeIntervalSeconds::operator=(TInt aInterval)
  1636 /**
  1637 Assigns a value to this object.
  1638 
  1639 @param aInterval The interval value to be assigned.
  1640 
  1641 @return A reference to this object.
  1642 */
  1643 	{iInterval=aInterval;return(*this);}
  1644 
  1645 
  1646 
  1647 
  1648 // Class TTimeIntervalMinutes
  1649 inline TTimeIntervalMinutes::TTimeIntervalMinutes()
  1650 /**
  1651 Default constructor.
  1652 
  1653 Constructs an uninitialised object.
  1654 */
  1655 	{}
  1656 
  1657 
  1658 
  1659 
  1660 inline TTimeIntervalMinutes::TTimeIntervalMinutes(TInt aInterval)
  1661 	: TTimeIntervalBase(aInterval)
  1662 /**
  1663 Constructs the object with the specified interval value.
  1664 
  1665 @param aInterval The interval value with which the object is to be initialised.
  1666 */
  1667 	{}
  1668 
  1669 
  1670 
  1671 
  1672 inline TTimeIntervalMinutes& TTimeIntervalMinutes::operator=(TInt aInterval)
  1673 /**
  1674 Assigns a value to this object.
  1675 
  1676 @param aInterval The interval value to be assigned.
  1677 
  1678 @return A reference to this object.
  1679 */
  1680 	{iInterval=aInterval;return(*this);}
  1681 
  1682 
  1683 
  1684 
  1685 // Class TTimeIntervalHours
  1686 inline TTimeIntervalHours::TTimeIntervalHours()
  1687 /**
  1688 Default constructor.
  1689 
  1690 Constructs an uninitialised object.
  1691 */
  1692 	{}
  1693 inline TTimeIntervalHours::TTimeIntervalHours(TInt aInterval)
  1694 	: TTimeIntervalBase(aInterval)
  1695 /**
  1696 Constructs the object with the specified interval value.
  1697 
  1698 @param aInterval The interval value with which the object is to be initialised.
  1699 */
  1700 	{}
  1701 
  1702 
  1703 
  1704 
  1705 inline TTimeIntervalHours& TTimeIntervalHours::operator=(TInt aInterval)
  1706 /**
  1707 Assigns a value to this object.
  1708 
  1709 @param aInterval The interval value to be assigned.
  1710 
  1711 @return A reference to this object.
  1712 */
  1713 	{iInterval=aInterval;return(*this);}
  1714 
  1715 
  1716 
  1717 
  1718 // Class TTimeIntervalDays
  1719 inline TTimeIntervalDays::TTimeIntervalDays()
  1720 /**
  1721 Default constructor.
  1722 
  1723 Constructs an uninitialised object.
  1724 */
  1725 	{}
  1726 
  1727 
  1728 
  1729 
  1730 inline TTimeIntervalDays::TTimeIntervalDays(TInt aInterval)
  1731 	: TTimeIntervalBase(aInterval)
  1732 /**
  1733 Constructs the object with the specified interval value.
  1734 
  1735 @param aInterval The interval value with which the object is to be initialised.
  1736 */
  1737 	{}
  1738 
  1739 
  1740 
  1741 
  1742 inline TTimeIntervalDays& TTimeIntervalDays::operator=(TInt aInterval)
  1743 /**
  1744 Assigns a value to this object.
  1745 
  1746 @param aInterval The interval value to be assigned.
  1747 
  1748 @return A reference to this object.
  1749 */
  1750 	{iInterval=aInterval;return(*this);}
  1751 
  1752 
  1753 
  1754 
  1755 // Class TTimeIntervalMonths
  1756 inline TTimeIntervalMonths::TTimeIntervalMonths()
  1757 /**
  1758 Default constructor.
  1759 
  1760 Constructs an uninitialised object.
  1761 */
  1762 	{}
  1763 
  1764 
  1765 
  1766 
  1767 inline TTimeIntervalMonths::TTimeIntervalMonths(TInt aInterval)
  1768 	: TTimeIntervalBase(aInterval)
  1769 /**
  1770 Constructs the object with the specified interval value.
  1771 
  1772 @param aInterval The interval value with which the object is to be initialised.
  1773 */
  1774 	{}
  1775 
  1776 
  1777 
  1778 
  1779 inline TTimeIntervalMonths& TTimeIntervalMonths::operator=(TInt aInterval)
  1780 /**
  1781 Assigns a value to this object.
  1782 
  1783 @param aInterval The interval value to be assigned.
  1784 
  1785 @return A reference to this object.
  1786 */
  1787 	{iInterval=aInterval;return(*this);}
  1788 
  1789 
  1790 
  1791 
  1792 // Class TTimeIntervalYears
  1793 inline TTimeIntervalYears::TTimeIntervalYears()
  1794 /**
  1795 Default constructor.
  1796 
  1797 Constructs an uninitialised object.
  1798 */
  1799 	{}
  1800 
  1801 
  1802 
  1803 
  1804 inline TTimeIntervalYears::TTimeIntervalYears(TInt aInterval)
  1805 	: TTimeIntervalBase(aInterval)
  1806 /**
  1807 Constructs the object with the specified interval value.
  1808 
  1809 @param aInterval The interval value with which the object is to be initialised.
  1810 */
  1811 	{}
  1812 
  1813 
  1814 
  1815 
  1816 inline TTimeIntervalYears& TTimeIntervalYears::operator=(TInt aInterval)
  1817 /**
  1818 Assigns a value to this object.
  1819 
  1820 @param aInterval The interval value to be assigned.
  1821 
  1822 @return A reference to this object.
  1823 */
  1824 	{iInterval=aInterval;return(*this);}
  1825 
  1826 
  1827 
  1828 
  1829 // Class TTime
  1830 inline TTime::TTime()
  1831 /**
  1832 Default constructor.
  1833 
  1834 The object is initialised to an arbitrary value.
  1835 */
  1836 	{}
  1837 
  1838 
  1839 
  1840 
  1841 inline TTime::TTime(const TInt64& aTime)
  1842 	: iTime(aTime)
  1843 /**
  1844 Constructs the object from a 64-bit microsecond value.
  1845 
  1846 @param aTime Microsecond value to which to initialise the TTime object.
  1847 */
  1848 	{}
  1849 
  1850 
  1851 
  1852 
  1853 inline TTime &TTime::operator=(const TInt64& aTime)
  1854 /**
  1855 Assigns a value contained in a 64-bit integer to this TTime object.
  1856 
  1857 @param aTime Microsecond value which to assign to the TTime object.
  1858 
  1859 @return This TTime object.
  1860 */
  1861 	{iTime=aTime;return(*this);}
  1862 
  1863 
  1864 
  1865 
  1866 inline TBool TTime::operator==(TTime aTime) const
  1867 /**
  1868 Tests whether two date/times are equal.
  1869 
  1870 @param aTime The time to be compared with this TTime.
  1871 
  1872 @return True if the two TTimes are equal. False if not.
  1873 */
  1874 	{return(iTime==aTime.iTime);}
  1875 
  1876 
  1877 
  1878 
  1879 inline TBool TTime::operator!=(TTime aTime) const
  1880 /**
  1881 Tests whether two date/times are not equal.
  1882 
  1883 @param aTime The date/time to be compared with this TTime.
  1884 
  1885 @return True if the two TTimes are different. False if the same.
  1886 */
  1887 	{return(iTime!=aTime.iTime);}
  1888 
  1889 
  1890 
  1891 
  1892 inline TBool TTime::operator>=(TTime aTime) const
  1893 /**
  1894 Tests whether this date/time is later than or the same as the
  1895 specified date/time.
  1896 
  1897 @param aTime The date/time to be compared with this date/time.
  1898 
  1899 @return True if this date/time is later than or the same as the
  1900         specified date/time. False otherwise.
  1901 */
  1902 	{return(iTime>=aTime.iTime);}
  1903 
  1904 
  1905 
  1906 
  1907 inline TBool TTime::operator<=(TTime aTime) const
  1908 /**
  1909 Tests whether this date/time is earlier than or the same as the
  1910 specified date/time.
  1911 
  1912 @param aTime The date/time to be compared with this date/time.
  1913 
  1914 @return True if this date/time is earlier than or the same as the
  1915         specified date/time. False otherwise.
  1916 */
  1917 	{return(iTime<=aTime.iTime);}
  1918 
  1919 
  1920 
  1921 
  1922 inline TBool TTime::operator>(TTime aTime) const
  1923 /**
  1924 Tests whether this date/time is later than the specified date/time.
  1925 
  1926 @param aTime The date/time to be compared with this date/time.
  1927 
  1928 @return True if this date/time is later than the specified date/time.
  1929         False otherwise.
  1930 */
  1931 	{return(iTime>aTime.iTime);}
  1932 
  1933 
  1934 
  1935 
  1936 inline TBool TTime::operator<(TTime aTime) const
  1937 /**
  1938 Tests whether this date/time is earlier than the specified date/time.
  1939 
  1940 @param aTime The date/time to be compared with this date/time.
  1941 
  1942 @return True if this date/time is earlier than the specified date/time.
  1943         False otherwise.
  1944 */
  1945 	{return(iTime<aTime.iTime);}
  1946 
  1947 
  1948 
  1949 
  1950 inline const TInt64& TTime::Int64() const
  1951 /**
  1952 Gets the 64 bit integer representation of this TTime obect.
  1953 
  1954 @return The 64 bit integer representation.
  1955 */
  1956 	{return(iTime);}
  1957 
  1958 
  1959 
  1960 
  1961 // Class TLexMark8
  1962 inline TLexMark8::TLexMark8()
  1963 	: iPtr(NULL)
  1964 /**
  1965 Default constructor.
  1966 */
  1967 	{}
  1968 
  1969 
  1970 
  1971 
  1972 inline TLexMark8::TLexMark8(const TUint8 *aString) 
  1973 	: iPtr(aString)
  1974 	{}
  1975 
  1976 
  1977 
  1978 
  1979 // Class TLex8
  1980 inline TLex8::TLex8(const TUint8 *aString)
  1981 /**
  1982 Constructs the object with a pointer to a string.
  1983 
  1984 The extraction mark and next character members are initialised to point
  1985 to the start of the string.
  1986 
  1987 @param aString String to be assigned.
  1988 */
  1989 	{Assign(TPtrC8(aString));}
  1990 
  1991 
  1992 
  1993 
  1994 inline TLex8::TLex8(const TDesC8 &aDes)
  1995 /**
  1996 Constructs the object with a descriptor.
  1997 
  1998 The extraction mark and next character 
  1999 members are initialised to point to the start of the string.
  2000 
  2001 @param aDes Descriptor to be assigned by reference.
  2002 */
  2003 	{Assign(aDes);}
  2004 
  2005 
  2006 
  2007 
  2008 inline TLex8& TLex8::operator=(const TUint8* aString)
  2009 /**
  2010 Allows strings to be assigned to a TLex8.
  2011 
  2012 @param aString String to be assigned to the TLex8. 
  2013 
  2014 @return TLex8 descriptor.
  2015 */
  2016 	{Assign(TPtrC8(aString));return(*this);}
  2017 
  2018 
  2019 
  2020 
  2021 inline TLex8& TLex8::operator=(const TDesC8& aBuf)
  2022 /**
  2023 Allows descriptors to be assigned to a TLex8.
  2024 
  2025 @param aBuf Descriptor to be assigned to the TLex8.
  2026 
  2027 @return TLex8 descriptor.
  2028 */
  2029 	{Assign(aBuf);return(*this);}
  2030 
  2031 
  2032 
  2033 
  2034 inline TBool TLex8::Eos() const
  2035 /**
  2036 Tests whether the next character position is at the end of the string.
  2037 
  2038 @return True if at end of string, false otherwise.
  2039 */
  2040 	{return(iNext==iEnd);}
  2041 
  2042 
  2043 
  2044 
  2045 inline void TLex8::Mark()
  2046 /**
  2047 Sets the TLex8's next character position to its extraction mark.
  2048 */
  2049 	{Mark(iMark);}
  2050 
  2051 
  2052 
  2053 
  2054 inline void TLex8::Mark(TLexMark8& aMark) const
  2055 /**
  2056 Sets the supplied extraction mark to the TLex8's next character position.
  2057 
  2058 @param aMark On return, this is set to the next character position.
  2059 */
  2060 	{aMark.iPtr=iNext;}
  2061 
  2062 
  2063 
  2064 
  2065 inline void TLex8::UnGetToMark()
  2066 /**
  2067 Sets the next character position to the current extraction mark position.
  2068 
  2069 @panic USER 63, if the extraction mark is before the start or beyond the end
  2070        of the string.
  2071 */
  2072     {UnGetToMark(iMark);}
  2073 
  2074 
  2075 
  2076 
  2077 inline void TLex8::SkipAndMark(TInt aNumber)
  2078 /**
  2079 Moves the next character position a specified number of characters. 
  2080   
  2081 @param aNumber Number of characters to skip.
  2082 
  2083 @panic USER 61, if the skip moves the next character position either to before
  2084        the start or beyond the end of the string.
  2085 */
  2086     {SkipAndMark(aNumber,iMark);}
  2087 
  2088 
  2089 
  2090 
  2091 inline void TLex8::SkipSpaceAndMark()
  2092 /**
  2093 Moves the next character position past any white space and copies it to the 
  2094 TLex8's extraction mark.
  2095 
  2096 Stops if at the end of the string.
  2097 */
  2098     {SkipSpaceAndMark(iMark);}
  2099 
  2100 
  2101 
  2102 
  2103 inline TInt TLex8::TokenLength() const
  2104 /**
  2105 Gets the length of the token.
  2106 
  2107 This is the difference between the next character 
  2108 position and the extraction mark.
  2109 
  2110 @return Length of the token.
  2111 */
  2112 	{return(iNext-iMark.iPtr);}
  2113 
  2114 
  2115 
  2116 
  2117 inline TInt TLex8::MarkedOffset() const
  2118 /**
  2119 Gets the offset of the extraction mark from the start of the string.
  2120 
  2121 @return The offset of the extraction mark.
  2122 */
  2123     {return(iMark.iPtr-iBuf);}
  2124 
  2125 
  2126 
  2127 
  2128 inline TInt TLex8::Val(TInt &aVal)
  2129 /**
  2130 Parses the string to extract a signed integer.
  2131 
  2132 @param aVal On return, contains the extracted integer.
  2133 
  2134 @return KErrNone if successful.
  2135         KErrGeneral if the next character position is initially at the end of the string
  2136         or no valid characters found initially.
  2137         KErrOverflow if there is sign overflow, i.e. converted value greater than limit.
  2138         If error codes KErrGeneral or KErrOverflow are returned, the object's
  2139         members are left unaltered.
  2140 */
  2141 	{return(Val((TInt32&)aVal));}
  2142 
  2143 
  2144 
  2145 
  2146 inline TInt TLex8::Val(TUint &aVal,TRadix aRadix)
  2147 /**
  2148 Parses the string to extract an unsigned integer, using the specified radix.
  2149 
  2150 @param aVal   On return, contains the extracted integer.
  2151 @param aRadix The radix to use when converting the number. The default radix
  2152               for this function overload is decimal.
  2153 
  2154 @return KErrNone if successful.
  2155         KErrGeneral if the next character position is initially at the end of the string
  2156         or no valid characters found initially.
  2157         KErrOverflow if there is sign overflow, i.e. converted value greater than limit.
  2158         If error codes KErrGeneral or KErrOverflow are returned, the object's
  2159         members are left unaltered.
  2160 */
  2161 	{return(Val((TUint32&)aVal,aRadix));}
  2162 
  2163 
  2164 
  2165 
  2166 inline void TLex8::Assign(const TLex8& aLex)
  2167 /**
  2168 Assigns a string to this object from another TLex8 object.
  2169 
  2170 @param aLex The object to be assigned.
  2171 */
  2172 	{new(this) TLex8(aLex);}
  2173 
  2174 
  2175 
  2176 
  2177 // Class TLexMark16
  2178 inline TLexMark16::TLexMark16()
  2179 	: iPtr(NULL)
  2180 /**
  2181 Default constructor.
  2182 */
  2183 	{}
  2184 
  2185 
  2186 
  2187 
  2188 inline TLexMark16::TLexMark16(const TUint16 *aString) 
  2189 	: iPtr(aString)
  2190 	{}
  2191 
  2192 
  2193 
  2194 
  2195 // Class TLex16
  2196 inline TLex16::TLex16(const TUint16 *aString)
  2197 /**
  2198 Constructs the object with a pointer to a string.
  2199 
  2200 The extraction mark and next character members are initialised to point
  2201 to the start of the string.
  2202 
  2203 @param aString String to be assigned.
  2204 */
  2205 	{Assign(TPtrC16(aString));}
  2206 
  2207 
  2208 
  2209 
  2210 inline TLex16::TLex16(const TDesC16 &aDes)
  2211 /**
  2212 Constructs the object with a descriptor.
  2213 
  2214 The extraction mark and next character 
  2215 members are initialised to point to the start of the string.
  2216 
  2217 @param aDes Descriptor to be assigned by reference.
  2218 */
  2219 	{Assign(aDes);}
  2220 
  2221 
  2222 
  2223 inline TLex16& TLex16::operator=(const TUint16* aString)
  2224 /** 
  2225 Allows strings to be assigned to a TLex16.
  2226 
  2227 @param aString String to be assigned to the TLex16. 
  2228 
  2229 @return TLex16 descriptor.
  2230 */
  2231 	{Assign(TPtrC16(aString));return(*this);}
  2232 
  2233 
  2234 
  2235 
  2236 inline TLex16& TLex16::operator=(const TDesC16& aBuf)
  2237 /**
  2238 Allows descriptors to be assigned to a TLex16.
  2239 
  2240 @param aBuf Descriptor to be assigned to the TLex16.
  2241 
  2242 @return TLex8 descriptor.
  2243 */
  2244 	{Assign(aBuf);return(*this);}
  2245 
  2246 
  2247 
  2248 
  2249 inline TBool TLex16::Eos() const
  2250 /**
  2251 Tests whether the next character position is at the end of the string.
  2252 
  2253 @return True if at end of string, false otherwise.
  2254 */
  2255 	{return(iNext==iEnd);}
  2256 
  2257 
  2258 
  2259 
  2260 inline void TLex16::Mark(TLexMark16& aMark) const
  2261 /**
  2262 Sets the supplied extraction mark to the TLex16's next character position.
  2263 
  2264 @param aMark On return, set to the next character position.
  2265 */
  2266 	{aMark.iPtr=iNext;}
  2267 
  2268 
  2269 
  2270 
  2271 inline void TLex16::Mark()
  2272 /**
  2273 Sets the TLex16's next character position to its extraction mark.
  2274 */
  2275 	{iMark.iPtr=iNext;}
  2276 
  2277 
  2278 
  2279 
  2280 inline void TLex16::UnGetToMark()
  2281 /**
  2282 Sets the next character position to the current extraction mark position.
  2283 
  2284 @panic USER 68, if the specified mark is before the start or beyond the end
  2285        of the string.
  2286 */
  2287     {UnGetToMark(iMark);}
  2288 
  2289 
  2290 
  2291 
  2292 inline void TLex16::SkipAndMark(TInt aNumber)
  2293 /**
  2294 Moves the next character position a specified number of characters.
  2295 
  2296 @param aNumber Number of characters to skip. 
  2297 
  2298 @panic USER 68, if the skip moves the next character position either to before
  2299        the start or beyond the end of the string.
  2300 */
  2301     {SkipAndMark(aNumber,iMark);}
  2302 
  2303 
  2304 
  2305 
  2306 inline void TLex16::SkipSpaceAndMark()
  2307 /**
  2308 Moves the next character position past any white space and copies it to the 
  2309 TLex16's extraction mark.
  2310 
  2311 Stops if at the end of the string.
  2312 */
  2313     {SkipSpaceAndMark(iMark);}
  2314 
  2315 
  2316 
  2317 
  2318 inline TInt TLex16::TokenLength() const
  2319 /**
  2320 Gets the length of the token.
  2321 
  2322 This is the difference between the next character 
  2323 position and the extraction mark.
  2324 
  2325 @return Length of the token.
  2326 */
  2327 	{return(iNext-iMark.iPtr);}
  2328 
  2329 
  2330 
  2331 
  2332 inline TInt TLex16::MarkedOffset() const
  2333 /**
  2334 Gets the offset of the extraction mark from the start of the string.
  2335 
  2336 @return The offset of the extraction mark.
  2337 */
  2338     {return(iMark.iPtr-iBuf);}
  2339 
  2340 
  2341 
  2342 
  2343 inline TInt TLex16::Val(TInt &aVal)
  2344 /**
  2345 Parses the string to extract a signed integer.
  2346 
  2347 @param aVal On return, contains the extracted integer.
  2348 
  2349 @return KErrNone if successful.
  2350         KErrGeneral if the next character position is initially at the end of the string
  2351         or no valid characters found initially.
  2352         KErrOverflow if there is sign overflow, i.e. converted value greater than limit.
  2353         If error codes KErrGeneral or KErrOverflow are returned, the object's
  2354         members are left unaltered.
  2355 */
  2356 	{return(Val((TInt32&)aVal));}
  2357 
  2358 
  2359 
  2360 
  2361 inline TInt TLex16::Val(TUint &aVal,TRadix aRadix)
  2362 /**
  2363 Parses the string to extract an unsigned integer, using the specified radix.
  2364 
  2365 @param aVal   On return, contains the extracted integer.
  2366 @param aRadix The radix to use when converting the number. The default radix
  2367               for this function overload is decimal.
  2368 
  2369 @return KErrNone if successful.
  2370         KErrGeneral if the next character position is initially at the end of the string
  2371         or no valid characters found initially.
  2372         KErrOverflow if there is sign overflow, i.e. converted value greater than limit.
  2373         If error codes KErrGeneral or KErrOverflow are returned, the object's
  2374         members are left unaltered.
  2375 */
  2376 	{return(Val((TUint32&)aVal,aRadix));}
  2377 
  2378 
  2379 
  2380 
  2381 inline void TLex16::Assign(const TLex16& aLex)
  2382 /**
  2383 Assigns a string to this object from another TLex16 object.
  2384 
  2385 @param aLex The object to be assigned.
  2386 */
  2387 	{new(this) TLex16(aLex);}
  2388 
  2389 
  2390 
  2391 
  2392 // Class TLocale
  2393 inline TLocale::TLocale(TInt)
  2394 	{}
  2395 
  2396 inline TInt TLocale::CountryCode() const
  2397 /**
  2398 Gets the code which is used to select country-specific locale data.
  2399 
  2400 The country code is the code used as the international dialling prefix.
  2401 This code is also used to identify a country by the dialling software.
  2402 	
  2403 @return The country code.
  2404 */
  2405 	{return(iCountryCode);}
  2406 
  2407 
  2408 
  2409 
  2410 inline void TLocale::SetCountryCode(TInt aCode)
  2411 /**
  2412 Sets the value which is used to select country-specific locale data.
  2413 
  2414 This value can be retrieved by using TLocale::CountryCode(). The country code
  2415 is the code used as the international dialling prefix. This code is also used
  2416 to identify a country by the dialling software.
  2417 	
  2418 @param aCode The country code.
  2419 
  2420 @see TLocale::CountryCode
  2421 */
  2422 	{iCountryCode=aCode;}
  2423 
  2424 
  2425 
  2426 
  2427 inline TTimeIntervalSeconds TLocale::UniversalTimeOffset() const
  2428 /**
  2429 Gets the locale's universal time offset.
  2430 	
  2431 @return Offset in seconds from universal time. Time zones east of universal 
  2432 	    time have positive offsets. Time zones west of universal time have negative 
  2433 	    offsets.
  2434 
  2435 @deprecated Use User::UTCOffset to get the current offset inclusive of daylight
  2436 			savings time. This function returns the same value, for compatibility.
  2437 */
  2438 	{return(iUniversalTimeOffset);}
  2439 
  2440 
  2441 
  2442 
  2443 inline TDateFormat TLocale::DateFormat() const
  2444 /**
  2445 Gets the date format.
  2446 	
  2447 @return The date format.
  2448 */
  2449 	{return(iDateFormat);}
  2450 
  2451 
  2452 
  2453 
  2454 inline void TLocale::SetDateFormat(TDateFormat aFormat)
  2455 /**
  2456 Sets the date format.
  2457 	
  2458 @param aFormat The date format to be used.
  2459 */
  2460 	{iDateFormat=aFormat;}
  2461 
  2462 
  2463 
  2464 
  2465 inline TTimeFormat TLocale::TimeFormat() const
  2466 /**
  2467 Gets the time format (12 or 24 hour).
  2468 	
  2469 @return The time format.
  2470 */
  2471 	{return(iTimeFormat);}
  2472 
  2473 
  2474 
  2475 
  2476 inline void TLocale::SetTimeFormat(TTimeFormat aFormat)
  2477 /**
  2478 Sets the time format (12 or 24 hour).
  2479 	
  2480 @param aFormat The time format.
  2481 */
  2482 	{iTimeFormat=aFormat;}
  2483 
  2484 
  2485 
  2486 
  2487 inline TLocalePos TLocale::CurrencySymbolPosition() const
  2488 /**
  2489 Gets the currency symbol position.
  2490 	
  2491 For negative currency values, this position may be
  2492 reversed using SetNegativeCurrencySymbolOpposite().
  2493 	
  2494 @return The currency symbol position.
  2495 
  2496 @see TLocale::SetNegativeCurrencySymbolOpposite
  2497 */
  2498 	{return(iCurrencySymbolPosition);}
  2499 
  2500 
  2501 
  2502 
  2503 inline void TLocale::SetCurrencySymbolPosition(TLocalePos aPos)
  2504 /**
  2505 Sets the currency symbol position.
  2506 	
  2507 @param aPos The currency symbol position.
  2508 */
  2509 	{iCurrencySymbolPosition=aPos;}
  2510 
  2511 
  2512 
  2513 
  2514 inline TBool TLocale::CurrencySpaceBetween() const
  2515 /**
  2516 Gets whether or not a space is inserted between the currency symbol and the 
  2517 currency value.
  2518 	
  2519 For negative currency values, the space can be removed using SetNegativeLoseSpace().
  2520 	
  2521 @return True if a space is inserted; false if not.
  2522 
  2523 @see TLocale::SetNegativeLoseSpace
  2524 */
  2525 	{return(iCurrencySpaceBetween);}
  2526 
  2527 
  2528 
  2529 
  2530 inline void TLocale::SetCurrencySpaceBetween(TBool aSpace)
  2531 /**
  2532 Sets whether a space is inserted between the currency symbol and the currency 
  2533 amount.
  2534 	
  2535 @param aSpace ETrue if a space is inserted; EFalse if not.
  2536 */
  2537 	{iCurrencySpaceBetween=aSpace;}
  2538 
  2539 
  2540 
  2541 
  2542 inline TInt TLocale::CurrencyDecimalPlaces() const
  2543 /**
  2544 Gets the number of decimal places to which currency values are set.
  2545 	
  2546 @return The number of decimal places.
  2547 */
  2548 	{return(iCurrencyDecimalPlaces);}
  2549 
  2550 
  2551 
  2552 
  2553 inline void TLocale::SetCurrencyDecimalPlaces(TInt aPlaces)
  2554 /**
  2555 Sets the number of decimal places to which currency values should be set.
  2556 	
  2557 @param aPlaces The number of decimal places.
  2558 */
  2559 	{iCurrencyDecimalPlaces=aPlaces;}
  2560 
  2561 
  2562 
  2563 
  2564 inline TBool TLocale::CurrencyNegativeInBrackets() const
  2565 /**
  2566 @deprecated
  2567 
  2568 Gets whether negative currency values are enclosed in brackets rather than 
  2569 being preceded by a minus sign. 
  2570 	
  2571 This is deprecated, use NegativeCurrencyFormat() instead.
  2572 	
  2573 @return True if negative currency is enclosed in brackets and has no minus 
  2574         sign; false if negative currency has a minus sign and is not enclosed
  2575 		in brackets.
  2576 
  2577 @see TLocale::NegativeCurrencyFormat
  2578 */
  2579 	{return((TBool)iNegativeCurrencyFormat);}			
  2580 
  2581 
  2582 
  2583 
  2584 inline void TLocale::SetCurrencyNegativeInBrackets(TBool aBool)
  2585 /** 
  2586 @deprecated
  2587 
  2588 Sets whether negative currency values are enclosed in brackets rather than
  2589 being preceded by a minus sign.
  2590 	
  2591 This is deprecated, use SetNegativeCurrencyFormat() instead.
  2592 	
  2593 @param aBool ETrue, if a negative currency value must be enclosed in brackets 
  2594 	         without a minus sign; EFalse, if a negative currency value is
  2595 			 preceded by a minus sign without any enclosing brackets.
  2596 
  2597 @see TLocale::SetNegativeCurrencyFormat
  2598 */
  2599 	{iNegativeCurrencyFormat=(aBool)?EInBrackets:ELeadingMinusSign;}
  2600 
  2601 
  2602 
  2603 
  2604 inline TBool TLocale::CurrencyTriadsAllowed() const
  2605 /**
  2606 Gets whether triads are allowed in currency values. Triads are groups of 
  2607 three digits separated by the thousands separator.
  2608 	
  2609 @return True if triads are allowed; false if not.
  2610 */
  2611 	{return(iCurrencyTriadsAllowed);}
  2612 
  2613 
  2614 
  2615 
  2616 inline void TLocale::SetCurrencyTriadsAllowed(TBool aBool)
  2617 /**
  2618 Sets whether triads are allowed in currency values.
  2619 	
  2620 @param aBool ETrue if triads are allowed; EFalse if triads not allowed.
  2621 */
  2622 	{iCurrencyTriadsAllowed=aBool;}
  2623 
  2624 
  2625 
  2626 
  2627 inline TChar TLocale::ThousandsSeparator() const
  2628 /**
  2629 Gets the character used to separate groups of three digits to the left of 
  2630 the decimal separator.
  2631 	
  2632 A thousands separator character is only displayed in currency values if currency 
  2633 triads are allowed.
  2634 	
  2635 @return The character used as the thousands separator.
  2636 */
  2637 	{return(iThousandsSeparator);}
  2638 
  2639 
  2640 
  2641 
  2642 inline void TLocale::SetThousandsSeparator(const TChar& aChar)
  2643 /**
  2644 Sets the character to be used to separate groups of three digits to the left 
  2645 of the decimal separator.
  2646 	
  2647 A thousands separator character is only displayed in currency values if currency 
  2648 triads are allowed.
  2649 	
  2650 @param aChar The character to be used as the thousands separator.
  2651 */
  2652 	{iThousandsSeparator=aChar;}
  2653 
  2654 
  2655 
  2656 
  2657 inline TChar TLocale::DecimalSeparator() const
  2658 /**
  2659 Gets the character used to separate a whole number from its fractional part.
  2660 	
  2661 @return The character used as the decimal separator.
  2662 */
  2663 	{return(iDecimalSeparator);}
  2664 
  2665 
  2666 
  2667 
  2668 inline void TLocale::SetDecimalSeparator(const TChar& aChar)
  2669 /**
  2670 Sets the character to be used to separate a whole number from its fractional 
  2671 part.
  2672 	
  2673 @param aChar The character to be used as the decimal separator.
  2674 */
  2675 	{iDecimalSeparator=aChar;}
  2676 
  2677 
  2678 
  2679 
  2680 inline TChar TLocale::DateSeparator(TInt aIndex) const
  2681 /**
  2682 Gets one of the four characters used to separate the day, month and year 
  2683 components of the date.
  2684 	
  2685 If the four separators are represented by S0, S1, S2 and S3 and the three 
  2686 date components are represented by XX, YY and ZZ, then the separators are 
  2687 located: S0 XX S1 YY S2 ZZ S3.
  2688 	
  2689 @param aIndex An index indicating which of the four separators is being accessed. 
  2690               This must be a value between zero and three inclusive.
  2691 
  2692 @return A date separator character as determined by the value of aIndex.
  2693 */
  2694 	{return(iDateSeparator[aIndex]);}
  2695 
  2696 
  2697 
  2698 
  2699 inline void TLocale::SetDateSeparator(const TChar& aChar,TInt aIndex)
  2700 /**
  2701 Sets one of the four characters used to separate the day, month and year
  2702 components of the date.
  2703 	
  2704 If the four separators are represented by S0, S1, S2 and S3 and the three 
  2705 date components are represented by XX, YY and ZZ, then the separators are 
  2706 located: S0 XX S1 YY S2 ZZ S3.
  2707 	
  2708 @param aChar  A date separator character to be used.
  2709 @param aIndex An index indicating which of the four separators is being accessed. 
  2710 	          This must be a value between zero and three inclusive.
  2711 */
  2712 	{__ASSERT_DEBUG(aIndex>=0 && aIndex<KMaxDateSeparators,User::Invariant());
  2713 	iDateSeparator[aIndex]=aChar;}
  2714 
  2715 
  2716 
  2717 
  2718 inline TChar TLocale::TimeSeparator(TInt aIndex) const
  2719 /**
  2720 Gets one of the four characters used to separate the hour, second and minute 
  2721 components of the time.
  2722 	
  2723 If the four separators are represented by S0, S1, S2 and S3 and the three 
  2724 time components are represented by XX, YY and ZZ, then the separators are 
  2725 located: S0 XX S1 YY S2 ZZ S3.
  2726 	
  2727 @param aIndex An index indicating which of the four separators is being
  2728               accessed. This must be a value between zero and three inclusive.
  2729 
  2730 @return A time separator character as determined by the value of aIndex.
  2731 */
  2732 
  2733 	{return(iTimeSeparator[aIndex]);}
  2734 
  2735 
  2736 
  2737 
  2738 inline void TLocale::SetTimeSeparator(const TChar& aChar,TInt aIndex)
  2739 /**
  2740 Sets one of the four characters used to separate the hour, minute and second 
  2741 components of the date.
  2742 	
  2743 If the four separators are represented by S0, S1, S2 and S3 and the three 
  2744 time components are represented by XX, YY and ZZ, then the separators are 
  2745 located: S0 XX S1 YY S2 ZZ S3.
  2746 	
  2747 @param aChar  A time separator character to be used.
  2748 @param aIndex An index indicating which of the four separators is being accessed. 
  2749 	          This must be a value between zero and three inclusive.
  2750 */
  2751 	{__ASSERT_DEBUG(aIndex>=0 && aIndex<KMaxTimeSeparators,User::Invariant());
  2752 	iTimeSeparator[aIndex]=aChar;}
  2753 
  2754 
  2755 
  2756 
  2757 inline TLocalePos TLocale::AmPmSymbolPosition() const
  2758 /**
  2759 Gets the am/pm text position (before or after the time value).
  2760 
  2761 @return The am/pm text position (0 before, 1 after).
  2762 */
  2763 	{return(iAmPmSymbolPosition);}
  2764 
  2765 
  2766 
  2767 
  2768 inline void TLocale::SetAmPmSymbolPosition(TLocalePos aPos)
  2769 /**
  2770 Sets the am/pm text position (before or after the time value).
  2771 	
  2772 @param aSpace The am/pm text position (0 before, 1 after).
  2773 */
  2774 	{iAmPmSymbolPosition=aPos;}
  2775 
  2776 
  2777 
  2778 
  2779 inline TBool TLocale::AmPmSpaceBetween() const
  2780 /**
  2781 Tests whether or not a space is inserted between the time and the preceding 
  2782 or trailing am/pm text.
  2783 	
  2784 @return True if a space is inserted between the time and am/pm text; false 
  2785         if not.
  2786 */
  2787 	{return(iAmPmSpaceBetween);}
  2788 
  2789 
  2790 
  2791 
  2792 inline void TLocale::SetAmPmSpaceBetween(TBool aSpace)
  2793 /**
  2794 Sets whether a space is inserted between the time and the preceding or trailing 
  2795 am/pm text.
  2796 	
  2797 @param aPos ETrue if a space is inserted between the time and am/pm text; 
  2798             EFalse otherwise.
  2799 */
  2800 	{iAmPmSpaceBetween=aSpace;}
  2801 
  2802 
  2803 
  2804 
  2805 inline TUint TLocale::DaylightSaving() const
  2806 /**
  2807 Gets the zones in which daylight saving is in effect.
  2808 	
  2809 If daylight saving is in effect, one hour is added to the time.
  2810 	
  2811 Use TLocale::QueryHomeHasDaylightSavingOn() to find out whether daylight saving 
  2812 is in effect for the home city. This is because the daylight saving setting 
  2813 for the home city may differ from that of the zone in which home is located.
  2814 	
  2815 @return A bit mask in which the three least significant bits are defined, 
  2816         indicating which of the three daylight saving zones are adjusted for
  2817 		daylight saving. These bits represent:
  2818 		Northern (non-European countries in the northern hemisphere),
  2819 		Southern (southern hemisphere),
  2820 		and European.
  2821 
  2822 @see TLocale::QueryHomeHasDaylightSavingOn
  2823 @see TDaylightSavingZone
  2824 
  2825 @deprecated Use the timezone server to retrieve information on timezones and DST.
  2826 			This method will always indicate that DST is inactive, in order to
  2827 			preserve compatibility.
  2828 */
  2829 	{return(iDaylightSaving);} 
  2830 
  2831 
  2832 
  2833 
  2834 inline TBool TLocale::QueryHomeHasDaylightSavingOn() const
  2835 /**
  2836 Tests whether or not daylight saving is set for the home city.
  2837 	
  2838 @return True if home daylight saving is set; false if not.
  2839 
  2840 @deprecated Use the timezone server to retrieve information on timezones and DST.
  2841 			This method will always indicate that DST is inactive, in order to
  2842 			preserve compatibility.
  2843 */
  2844 	{return((iHomeDaylightSavingZone|EDstHome) & iDaylightSaving);}
  2845 
  2846 
  2847 
  2848 
  2849 inline TDaylightSavingZone TLocale::HomeDaylightSavingZone() const
  2850 /**
  2851 Gets the daylight saving zone in which the home city is located.
  2852 	
  2853 @return The daylight saving zone in which the home city is located.
  2854 
  2855 @deprecated Use the timezone server to retrieve information on timezones and DST.
  2856 */
  2857 	{return(iHomeDaylightSavingZone);}
  2858 
  2859 
  2860 
  2861 
  2862 inline TUint TLocale::WorkDays() const
  2863 /**
  2864 Gets a bit mask representing the days of the week which are considered as 
  2865 working days.
  2866 	
  2867 @return A bit mask of seven bits indicating (by being set) which days are 
  2868         workdays. The least significant bit corresponds to Monday, the next bit to 
  2869 	    Tuesday and so on.
  2870 */
  2871 	{return(iWorkDays);}
  2872 
  2873 
  2874 
  2875 
  2876 inline void TLocale::SetWorkDays(TUint aMask)
  2877 /**
  2878 Sets the days of the week which are considered as working days.
  2879 	
  2880 @param aMask A bit mask of seven bits indicating (by being set) which days 
  2881              are workdays. The least significant bit corresponds to Monday, the
  2882 			 next bit is Tuesday and so on.
  2883 */
  2884 	{iWorkDays=aMask;}
  2885 
  2886 
  2887 
  2888 
  2889 inline TDay TLocale::StartOfWeek() const
  2890 /**
  2891 Gets the day which is considered the first day of the week.
  2892 	
  2893 @return The first day of the week.
  2894 */
  2895 	{return(iStartOfWeek);}
  2896 
  2897 
  2898 
  2899 
  2900 inline void TLocale::SetStartOfWeek(TDay aDay)
  2901 /**
  2902 Sets the day which is considered to be the first day of the week.
  2903 	
  2904 @param aDay The first day of the week.
  2905 */
  2906 	{iStartOfWeek=aDay;}
  2907 
  2908 
  2909 
  2910 
  2911 inline TClockFormat TLocale::ClockFormat() const
  2912 /**
  2913 Gets the clock display format.
  2914 	
  2915 @return The clock display format.
  2916 */
  2917 	{return(iClockFormat);}
  2918 
  2919 
  2920 
  2921 
  2922 inline void TLocale::SetClockFormat(TClockFormat aFormat)
  2923 /**
  2924 Sets the clock display format.
  2925 	
  2926 @param aFormat The clock display format.
  2927 */
  2928 	{iClockFormat=aFormat;}
  2929 
  2930 
  2931 
  2932 
  2933 inline TUnitsFormat TLocale::UnitsGeneral() const
  2934 /**
  2935 Gets the general units of measurement.
  2936 
  2937 This function should be used when both short and long distances use the
  2938 same units of measurement.
  2939 	
  2940 @return General units of measurement.
  2941 */
  2942 	{return(iUnitsGeneral);}
  2943 
  2944 
  2945 
  2946 
  2947 inline void TLocale::SetUnitsGeneral(TUnitsFormat aFormat)
  2948 /**
  2949 Sets the general units of measurement.
  2950 This function should be used when both short and long distances use the
  2951 same units of measurement.
  2952 	
  2953 @param aFormat General units of measurement.
  2954 */
  2955 	{iUnitsGeneral=aFormat;}
  2956 
  2957 
  2958 
  2959 
  2960 inline TUnitsFormat TLocale::UnitsDistanceShort() const
  2961 /**
  2962 Gets the units of measurement for short distances.
  2963 
  2964 Short distances are those which would normally be represented by either
  2965 metres and centimetres or feet and inches.
  2966 	
  2967 @return Units of measurement for short distances.
  2968 */
  2969 	{return(iUnitsDistanceShort);}
  2970 
  2971 
  2972 
  2973 
  2974 inline void TLocale::SetUnitsDistanceShort(TUnitsFormat aFormat)
  2975 /**
  2976 Sets the units of measurement for short distances.
  2977 
  2978 Short distances are those which would normally be represented by either
  2979 metres and centimetres or feet and inches.
  2980 	
  2981 @param aFormat Units of measurement for short distances.
  2982 */
  2983 	{iUnitsDistanceShort=aFormat;}
  2984 
  2985 
  2986 
  2987 
  2988 inline TUnitsFormat TLocale::UnitsDistanceLong() const
  2989 /**
  2990 Gets the units of measurement for long distances.
  2991 
  2992 Long distances are those which would normally be represented by either
  2993 miles or kilometres.
  2994 	
  2995 @return Units of measurement for long distances.
  2996 */
  2997 	{return(iUnitsDistanceLong);}
  2998 
  2999 
  3000 
  3001 
  3002 inline void TLocale::SetUnitsDistanceLong(TUnitsFormat aFormat)
  3003 /**
  3004 Sets the units of measurement for long distances.
  3005 
  3006 Long distances are those which would normally be represented by either
  3007 miles or kilometres.
  3008 	
  3009 @param aFormat Units of measurement for long distances.
  3010 */
  3011 	{iUnitsDistanceLong=aFormat;}
  3012 
  3013 
  3014 
  3015 
  3016 inline void TLocale::SetNegativeCurrencyFormat(TLocale::TNegativeCurrencyFormat aNegativeCurrencyFormat)
  3017 /**
  3018 Sets the negative currency format.
  3019 	
  3020 @param aNegativeCurrencyFormat How negative currency values are formatted.
  3021 */
  3022 	{iNegativeCurrencyFormat = aNegativeCurrencyFormat;}
  3023 
  3024 
  3025 
  3026 
  3027 inline TLocale::TNegativeCurrencyFormat TLocale::NegativeCurrencyFormat() const
  3028 /**
  3029 Gets the negative currency format.
  3030 	
  3031 @return How negative currency values are formatted.
  3032 */
  3033 	{return(iNegativeCurrencyFormat);}
  3034 
  3035 
  3036 
  3037 
  3038 inline TBool TLocale::NegativeLoseSpace() const
  3039 /**
  3040 Gets whether negative currency values lose the space between the currency 
  3041 symbol and the value.
  3042 	
  3043 @return True, if negative currency values lose the space between the value 
  3044 	    and the symbol; false, if not.
  3045 */
  3046 	{ 
  3047 	if((iExtraNegativeCurrencyFormatFlags|EFlagNegativeLoseSpace)==iExtraNegativeCurrencyFormatFlags)
  3048 		return ETrue;
  3049 	else
  3050 		return EFalse;
  3051 	}
  3052 
  3053 
  3054 
  3055 
  3056 inline void TLocale::SetNegativeLoseSpace(TBool aBool)
  3057 /**
  3058 Sets whether negative currency values lose the space between the currency symbol 
  3059 and the value.
  3060 	
  3061 @param aBool ETrue to set a flag which indicates that negative currency values 
  3062 	         should lose the space between the value and the symbol. EFalse to unset it.
  3063 */
  3064 	{
  3065 	if(aBool)
  3066 		iExtraNegativeCurrencyFormatFlags |= EFlagNegativeLoseSpace;
  3067 	else
  3068 		iExtraNegativeCurrencyFormatFlags &= ~EFlagNegativeLoseSpace;
  3069 	}
  3070 
  3071 
  3072 
  3073 
  3074 inline TBool TLocale::NegativeCurrencySymbolOpposite() const
  3075 /**
  3076 Gets whether in negative currency values, the position of the currency symbol 
  3077 is set to be the opposite of the position used for non-negative values (before 
  3078 or after the value, as set by SetCurrencySymbolPosition()).
  3079 	
  3080 @return True, if the currency symbol position for negative currency values 
  3081 	    is the opposite of the position set by SetCurrencySymbolPosition();
  3082 		false, otherwise.
  3083 
  3084 @see TLocale::SetCurrencySymbolPosition
  3085 */
  3086 	{
  3087 	if((iExtraNegativeCurrencyFormatFlags|EFlagNegativeCurrencySymbolOpposite)==iExtraNegativeCurrencyFormatFlags)
  3088 		return ETrue;
  3089 	else
  3090 		return EFalse;
  3091 	}
  3092 
  3093 
  3094 
  3095 
  3096 inline void TLocale::SetNegativeCurrencySymbolOpposite(TBool aBool)
  3097 /**
  3098 Sets whether the position of the currency symbol for negative currency values 
  3099 should be the opposite of the position used for non-negative values (before 
  3100 or after the value, as set by SetCurrencySymbolPosition()).
  3101 	
  3102 @param aBool ETrue to set the position of the currency symbol in negative 
  3103              currency values to be the opposite of the position as set
  3104 			 using SetCurrencySymbolPosition(). EFalse to leave the
  3105 			 position unchanged.
  3106 
  3107 @see TLocale::SetCurrencySymbolPosition
  3108 */
  3109 	{
  3110 	if (aBool)
  3111 		iExtraNegativeCurrencyFormatFlags |= EFlagNegativeCurrencySymbolOpposite;
  3112 	else
  3113 		iExtraNegativeCurrencyFormatFlags &= ~EFlagNegativeCurrencySymbolOpposite;
  3114 	}
  3115 
  3116 
  3117 
  3118 
  3119 inline TLanguage TLocale::LanguageDowngrade(TInt aIndex) const
  3120 /**
  3121 Gets the language that is stored at the specified index into the customisable 
  3122 part of the language downgrade path.
  3123 	
  3124 The second, third and fourth languages in the language downgrade path can 
  3125 be customised. These can be enquired using this function. The first language 
  3126 in the path is always the language of the current locale, as returned by User::Language(). 
  3127 	
  3128 The languages in the downgrade path are used in turn by the BaflUtils::NearestLanguageFile() 
  3129 function to find the best matching language-specific version of a language-neutral 
  3130 filename.
  3131 	
  3132 The full language downgrade path can be retrieved using BaflUtils::GetDowngradePath().
  3133 	
  3134 @param aIndex An index into the customisable part of the language downgrade 
  3135               path. Between zero and two inclusive.
  3136 
  3137 @return The language at the specified index.
  3138 
  3139 @see BaflUtils::NearestLanguageFile
  3140 @see BaflUtils::GetDowngradePath
  3141 */
  3142 	{
  3143 	__ASSERT_DEBUG(0 <= aIndex && aIndex < 3, User::Invariant());
  3144 	return static_cast<TLanguage>(iLanguageDowngrade[aIndex]);
  3145 	}
  3146 
  3147 
  3148 
  3149 
  3150 inline void TLocale::SetLanguageDowngrade(TInt aIndex, TLanguage aLanguage)
  3151 /**
  3152 Sets a language in the customisable part of the language downgrade path.
  3153 	
  3154 @param aIndex    An index into the customisable part of the path at which to 
  3155 	             add the language, a value between zero and two.
  3156 @param aLanguage The language to add. ELangNone is considered to be the last 
  3157 	             language in the path, no more will be searched, so can be used
  3158 				 to specify that no language downgrade is required.
  3159 
  3160 @see BaflUtils::NearestLanguageFile
  3161 @see BaflUtils::GetDowngradePath
  3162 */
  3163 	{
  3164 	__ASSERT_DEBUG(0 <= aIndex && aIndex < 3, User::Invariant());
  3165 	iLanguageDowngrade[aIndex] = static_cast<TUint16>(aLanguage);
  3166 	}
  3167 
  3168 
  3169 
  3170 
  3171 /**
  3172 Gets the number mode stored in the locale.
  3173 
  3174 @return The number mode for the locale.
  3175 */
  3176 inline TDigitType TLocale::DigitType() const
  3177 	{ return iDigitType; }
  3178 
  3179 
  3180 
  3181 
  3182 /**
  3183 Sets the number mode for the locale. 
  3184 
  3185 @param aDigitType The number mode to be set.
  3186 */
  3187 inline void TLocale::SetDigitType(TDigitType aDigitType)
  3188 	{ iDigitType=aDigitType; }
  3189 
  3190 
  3191 
  3192 
  3193 /**
  3194 Sets the device time state.
  3195 
  3196 @param aState The device time state. 
  3197 
  3198 @deprecated Use the timezone server to coordinate automatic time adjustment.
  3199 */
  3200 inline void TLocale::SetDeviceTime(TDeviceTimeState aState)
  3201    	{
  3202    	iDeviceTimeState=aState;
  3203    	}
  3204    
  3205 
  3206 inline TLocale*	TExtendedLocale::GetLocale()
  3207 	{ return &iLocale; }
  3208 
  3209 
  3210 /**
  3211 Gets the device time state.
  3212 
  3213 @return The device time state.
  3214 
  3215 @deprecated Use the timezone server to coordinate automatic time adjustment.
  3216 */
  3217 inline TLocale::TDeviceTimeState TLocale::DeviceTime() const
  3218    	{
  3219    	return iDeviceTimeState;
  3220    	}
  3221 
  3222 
  3223 // Class TFindSemaphore
  3224 inline TFindSemaphore::TFindSemaphore()
  3225     : TFindHandleBase()
  3226 /**
  3227 Constructs the object with a default match pattern.
  3228 
  3229 The default match pattern, as implemented by the base class, is the single 
  3230 character "*".
  3231 
  3232 A new match pattern can be set after construction by calling the Find() member 
  3233 function of the TFindHandleBase base class.
  3234 
  3235 @see TFindHandleBase::Find
  3236 */
  3237     {}
  3238 
  3239 
  3240 
  3241 
  3242 inline TFindSemaphore::TFindSemaphore(const TDesC &aMatch)
  3243     : TFindHandleBase(aMatch)
  3244 /**
  3245 Constructs this object with the specified match pattern.
  3246 
  3247 A new match pattern can be set after construction by
  3248 calling TFindHandleBase::Find().
  3249 
  3250 Note that after construction, the object contains a copy of the supplied
  3251 match pattern; the source descriptor can, therefore, be safely discarded.
  3252 
  3253 @param aMatch A reference to the descriptor containing the match pattern. 
  3254 
  3255 @see TFindHandleBase::Find
  3256 */
  3257     {}
  3258 
  3259 
  3260 
  3261 
  3262 // Class TFindMutex
  3263 inline TFindMutex::TFindMutex()
  3264     : TFindHandleBase()
  3265 /**
  3266 Constructs this object with a default match pattern.
  3267 
  3268 The default match pattern, as implemented by the base class, is the single 
  3269 character "*".
  3270 
  3271 A new match pattern can be set after construction by calling the Find() member 
  3272 function of the TFindHandleBase base class.
  3273 
  3274 @see TFindHandleBase::Find
  3275 */
  3276     {}
  3277 
  3278 
  3279 
  3280 
  3281 inline TFindMutex::TFindMutex(const TDesC &aMatch)
  3282     : TFindHandleBase(aMatch)
  3283 /**
  3284 Constructs this object with the specified match pattern.
  3285 
  3286 A new match pattern can be set after construction by calling the Find() member 
  3287 function of the TFindHandleBase base class.
  3288 
  3289 After construction, the object contains a copy of the supplied match pattern; 
  3290 the source descriptor can, therefore, be safely discarded.
  3291 
  3292 @param aMatch The match pattern.
  3293 
  3294 @see TFindHandleBase::Find
  3295 */
  3296     {}
  3297 
  3298 
  3299 
  3300 
  3301 // Class TFindChunk
  3302 inline TFindChunk::TFindChunk()
  3303     : TFindHandleBase()
  3304 /**
  3305 Constructs this object with a default match pattern.
  3306 
  3307 The default match pattern, as implemented by the base class, is
  3308 the single character "*".
  3309 
  3310 A new match pattern can be set after construction by
  3311 calling TFindHandleBase::Find().
  3312 
  3313 @see TFindHandleBase
  3314 */
  3315     {}
  3316 
  3317 
  3318 
  3319 
  3320 inline TFindChunk::TFindChunk(const TDesC &aMatch)
  3321     : TFindHandleBase(aMatch)
  3322 /**
  3323 Constructs the object with the specified match pattern.
  3324 
  3325 A new match pattern can be set after construction by
  3326 calling TFindHandleBase::Find().
  3327 
  3328 @param aMatch The match pattern.
  3329 
  3330 @see TFindHandleBase
  3331 */
  3332     {}
  3333 
  3334 
  3335 
  3336 
  3337 // Class TFindThread
  3338 inline TFindThread::TFindThread()
  3339     : TFindHandleBase()
  3340 /**
  3341 Constructs this object with a default match pattern.
  3342 
  3343 The default match pattern, as implemented by the base class,
  3344 is the single character *.
  3345 
  3346 A new match pattern can be set after construction
  3347 by calling TFindHandleBase::Find().
  3348 
  3349 @see TFindHandleBase::Find
  3350 */
  3351     {}
  3352 
  3353 
  3354 
  3355 
  3356 inline TFindThread::TFindThread(const TDesC &aMatch)
  3357     : TFindHandleBase(aMatch)
  3358 /**
  3359 Constructs this object with the specified match pattern.
  3360 
  3361 A new match pattern can be set after construction
  3362 by calling the TFindHandleBase::Find().
  3363 
  3364 @see TFindHandleBase::Find
  3365 */
  3366     {}
  3367 
  3368 
  3369 
  3370 
  3371 // Class TFindProcess
  3372 inline TFindProcess::TFindProcess()
  3373     : TFindHandleBase()
  3374 /**
  3375 Constructs this object with a default match pattern.
  3376 
  3377 The default match pattern, as implemented by the base class,
  3378 is the single character *.
  3379 
  3380 A new match pattern can be set after construction
  3381 by calling TFindHandleBase::Find().
  3382 
  3383 @see TFindHandleBase::Find
  3384 */
  3385     {}
  3386 
  3387 
  3388 
  3389 
  3390 inline TFindProcess::TFindProcess(const TDesC &aMatch)
  3391     : TFindHandleBase(aMatch)
  3392 /**
  3393 Constructs this object with the specified match pattern.
  3394 
  3395 A new match pattern can be set after construction
  3396 by calling the TFindHandleBase::Find().
  3397 
  3398 @see TFindHandleBase::Find
  3399 */
  3400     {}
  3401 
  3402 
  3403 
  3404 
  3405 // Class TFindLogicalDevice
  3406 /**
  3407 Constructs the LDD factory object with a default match pattern.
  3408 
  3409 The default match pattern, as implemented by the base class, is the single 
  3410 character "*".
  3411 
  3412 A new match pattern can be set after construction by calling the Find() member 
  3413 function of the TFindHandleBase base class.
  3414 
  3415 @see TFindHandleBase::Find
  3416 */
  3417 inline TFindLogicalDevice::TFindLogicalDevice()
  3418     : TFindHandleBase()
  3419     {}
  3420 
  3421 /**
  3422 Constructs the LDD factory object with a specified match pattern.
  3423 
  3424 A new match pattern can be set after construction by calling
  3425 TFindHandleBase::Find().
  3426 
  3427 @param aMatch The match pattern.
  3428 
  3429 @see TFindHandleBase::Find
  3430 */
  3431 inline TFindLogicalDevice::TFindLogicalDevice(const TDesC &aMatch)
  3432     : TFindHandleBase(aMatch)
  3433     {}
  3434 
  3435 // Class TFindPhysicalDevice
  3436 /**
  3437 Constructs the PDD factory object with a default match pattern.
  3438 
  3439 The default match pattern, as implemented by the base class, is the single 
  3440 character "*".
  3441 
  3442 A new match pattern can be set after construction by calling the Find() member 
  3443 function of the TFindHandleBase base class.
  3444 
  3445 @see TFindHandleBase::Find
  3446 */
  3447 inline TFindPhysicalDevice::TFindPhysicalDevice()
  3448     : TFindHandleBase()
  3449     {}
  3450 
  3451 /**
  3452 Constructs the PDD factory object with a specified match pattern.
  3453 
  3454 A new match pattern can be set after construction by calling
  3455 TFindHandleBase::Find().
  3456 
  3457 @param aMatch The match pattern.
  3458 
  3459 @see TFindHandleBase::Find
  3460 */
  3461 inline TFindPhysicalDevice::TFindPhysicalDevice(const TDesC &aMatch)
  3462     : TFindHandleBase(aMatch)
  3463     {}
  3464 
  3465 
  3466 
  3467 
  3468 
  3469 // Class TFindServer
  3470 inline TFindServer::TFindServer()
  3471     : TFindHandleBase()
  3472 /**
  3473 Constructs the object with a default match pattern.
  3474 
  3475 The default match pattern, as implemented by the base class, is the single 
  3476 character "*".
  3477 
  3478 A new match pattern can be set after construction by calling the Find() member 
  3479 function of the TFindHandleBase base class.
  3480 
  3481 @see TFindHandleBase::Find
  3482 */
  3483     {}
  3484 
  3485 
  3486 
  3487 
  3488 inline TFindServer::TFindServer(const TDesC &aMatch)
  3489     : TFindHandleBase(aMatch)
  3490 /**
  3491 Constructs the object with a specified match pattern.
  3492 
  3493 A new match pattern can be set after construction by calling
  3494 TFindHandleBase::Find().
  3495 
  3496 @param aMatch The match pattern.
  3497 
  3498 @see TFindHandleBase::Find
  3499 */
  3500     {}
  3501 
  3502 
  3503 
  3504 
  3505 // Class TFindLibrary
  3506 inline TFindLibrary::TFindLibrary()
  3507     : TFindHandleBase()
  3508 /**
  3509 Constructs this object with a default match pattern.
  3510 
  3511 The default match pattern is the single character ‘*’ and is implemented by
  3512 the base class TFindHandleBase.
  3513 */
  3514     {}
  3515 
  3516 
  3517 
  3518 
  3519 inline TFindLibrary::TFindLibrary(const TDesC &aMatch)
  3520     : TFindHandleBase(aMatch)
  3521 /**
  3522 Constructs this object with the specified match pattern.
  3523 
  3524 @param aMatch The descriptor containing the match pattern. 
  3525 */
  3526     {}
  3527 
  3528 
  3529 
  3530 
  3531 // Class RDevice
  3532 /**
  3533 Opens a handle to an LDD factory object found using a TFindLogicalDevice object.
  3534 
  3535 A TFindLogicalDevice object is used to find all LDD factory objects whose full names match 
  3536 a specified pattern.
  3537 
  3538 @param aFind A reference to the object which is used to find the LDD factory object.
  3539 @param aType An enumeration whose enumerators define the ownership of this 
  3540              LDD factory object handle. If not explicitly specified, EOwnerProcess is
  3541 			 taken as default.
  3542 
  3543 @return KErrNone if successful, otherwise one of the other system wide error 
  3544         codes.
  3545 */
  3546 inline TInt RDevice::Open(const TFindLogicalDevice& aFind,TOwnerType aType)
  3547 	{return(RHandleBase::Open(aFind,aType));}
  3548 
  3549 
  3550 
  3551 
  3552 // Class RCriticalSection
  3553 inline TBool RCriticalSection::IsBlocked() const
  3554 /**
  3555 Tests whether the critical section is occupied by another thread.
  3556 
  3557 @return True, if the critical section is occupied by another thread. False, 
  3558         otherwise.
  3559 */
  3560 	{return(iBlocked!=1);}
  3561 
  3562 
  3563 
  3564 
  3565 // Class RMutex
  3566 inline TInt RMutex::Open(const TFindMutex& aFind,TOwnerType aType)
  3567 /**
  3568 Opens a handle to the global mutex found using a TFindMutex object.
  3569 
  3570 A TFindMutex object is used to find all global mutexes whose full names match 
  3571 a specified pattern.
  3572 
  3573 By default, any thread in the process can use this instance of RMutex to access 
  3574 the mutex. However, specifying EOwnerThread as the second parameter to this 
  3575 function, means that only the opening thread can use this instance of RMutex 
  3576 to access the mutex; any other thread in this process that wants to access 
  3577 the mutex must either duplicate the handle or use OpenGlobal() again.
  3578 
  3579 @param aFind A reference to the object which is used to find the mutex.
  3580 @param aType An enumeration whose enumerators define the ownership of this 
  3581              mutex handle. If not explicitly specified, EOwnerProcess is
  3582 			 taken as default. 
  3583 
  3584 @return KErrNone if successful, otherwise one of the other system wide error 
  3585         codes.
  3586 */
  3587 	{return(RHandleBase::Open(aFind,aType));}
  3588 
  3589 
  3590 
  3591 
  3592 // Class RChunk
  3593 inline TInt RChunk::Open(const TFindChunk& aFind,TOwnerType aType)
  3594 /**
  3595 Opens a handle to the global chunk found using a TFindChunk object.
  3596 
  3597 A TFindChunk object is used to find all chunks whose full names match
  3598 a specified pattern. 
  3599 
  3600 By default, ownership of this chunk handle is vested in the current process, 
  3601 but can be vested in the current thread by passing EOwnerThread as the second 
  3602 parameter to this function.
  3603 
  3604 @param aFind A reference to the TFindChunk object used to find the chunk.
  3605 @param aType An enumeration whose enumerators define the ownership of this 
  3606              chunk handle. If not explicitly specified, EOwnerProcess is
  3607 			 taken as default.
  3608 
  3609 @return KErrNone if successful, otherwise another of the system error codes.
  3610 */
  3611 	{return(RHandleBase::Open(aFind,aType));}
  3612 
  3613 
  3614 
  3615 
  3616 inline TBool RChunk::IsReadable() const
  3617 /**
  3618 Tests whether the chunk is mapped into its process address space.
  3619 
  3620 @return True, if the chunk is readable; false, otherwise.
  3621 */
  3622 	{return (Attributes()&RHandleBase::EDirectReadAccess); }
  3623 
  3624 
  3625 
  3626 
  3627 inline TBool RChunk::IsWritable() const
  3628 /**
  3629 Tests whether the chunk mapped into its process address space and is writable.
  3630 
  3631 @return True, if the chunk is writable; false, otherwise.
  3632 */
  3633 	{return (Attributes()&RHandleBase::EDirectWriteAccess); }
  3634 
  3635 
  3636 
  3637 
  3638 // Class TObjectId
  3639 inline TObjectId::TObjectId()
  3640 /**
  3641 Default constructor.
  3642 */
  3643 	{}
  3644 
  3645 
  3646 
  3647 
  3648 inline TObjectId::TObjectId(TUint64 aId)
  3649 	: iId(aId)
  3650 /**
  3651 Constructor taking an unsigned integer value.
  3652 
  3653 @param aId The value of the object id.
  3654 */
  3655 	{}
  3656 
  3657 
  3658 
  3659 
  3660 inline TUint64 TObjectId::Id() const
  3661 /**
  3662 Return the ID as a 64 bit integer
  3663 */
  3664 	{ return iId; }
  3665 
  3666 
  3667 
  3668 
  3669 inline TObjectId::operator TUint() const
  3670 /**
  3671 Conversion operator invoked by the compiler when a TObjectId type is passed
  3672 to a function that is prototyped to take a TUint type.
  3673 
  3674 @see TUint
  3675 */
  3676 	{ return TUint(iId); }
  3677 
  3678 
  3679 
  3680 
  3681 inline TBool TObjectId::operator==(TObjectId aId) const
  3682 /**
  3683 Tests whether this thread Id is equal to the specified Id.
  3684 
  3685 @param aId The thread Id to be compared with this thread Id.
  3686 
  3687 @return True, if the thread Ids are equal; false otherwise.
  3688 */
  3689 	{return iId==aId.iId;}
  3690 
  3691 
  3692 
  3693 
  3694 inline TBool TObjectId::operator!=(TObjectId aId) const
  3695 /**
  3696 Tests whether this thread Id is unequal to the specified thread Id.
  3697 
  3698 @param aId The thread Id to be compared with this thread Id.
  3699 
  3700 @return True, if the thread Ids are unequal; false otherwise.
  3701 */
  3702 	{return iId!=aId.iId;}
  3703 
  3704 
  3705 
  3706 
  3707 // Class TThreadId
  3708 inline TThreadId::TThreadId()
  3709 	: TObjectId()
  3710 /**
  3711 Default constructor.
  3712 */
  3713 	{}
  3714 
  3715 
  3716 
  3717 
  3718 inline TThreadId::TThreadId(TUint64 aId)
  3719 	: TObjectId(aId)
  3720 /**
  3721 Constructor taking an unsigned integer value.
  3722 
  3723 @param aId The value of the thread id.
  3724 */
  3725 	{}
  3726 
  3727 
  3728 
  3729 
  3730 // Class RThread
  3731 inline RThread::RThread()
  3732 	: RHandleBase(KCurrentThreadHandle)
  3733 /**
  3734 Default constructor.
  3735 
  3736 The constructor exists to initialise private data within this handle; it does 
  3737 not create the thread object.
  3738 
  3739 Specifically, it sets the handle-number to the value KCurrentThreadHandle.
  3740 In effect, the constructor creates a default thread handle.
  3741 */
  3742 	{}
  3743 
  3744 
  3745 
  3746 
  3747 inline TInt RThread::Open(const TFindThread& aFind,TOwnerType aType)
  3748 /**
  3749 Opens a handle to the thread found by pattern matching a name.
  3750 
  3751 A TFindThread object is used to find all threads whose full names match a 
  3752 specified pattern. 
  3753 
  3754 By default, ownership of this thread handle is vested in the current process, 
  3755 but can be vested in the current thread by passing EOwnerThread as the second 
  3756 parameter to this function.
  3757 
  3758 @param aFind A reference to the TFindThread object used to find the thread.
  3759 @param aType An enumeration whose enumerators define the ownership of this 
  3760              thread handle. If not explicitly specified, EOwnerProcess is
  3761 			 taken as default.
  3762 
  3763 @return KErrNone if successful, otherwise one of the other system-wide error codes.
  3764 */
  3765 	{return(RHandleBase::Open(aFind,aType));}
  3766 
  3767 
  3768 
  3769 
  3770 #ifndef __REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__
  3771 
  3772 inline TBool RThread::HasCapability(TCapability aCapability, const char* aDiagnostic) const
  3773 	{
  3774 	return DoHasCapability(aCapability, aDiagnostic);
  3775 	}
  3776 
  3777 inline TBool RThread::HasCapability(TCapability aCapability1, TCapability aCapability2, const char* aDiagnostic) const
  3778 	{
  3779 	return DoHasCapability(aCapability1, aCapability2, aDiagnostic);
  3780 	}
  3781 
  3782 #else //__REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__
  3783 
  3784 // Only available to NULL arguments
  3785 inline TBool RThread::HasCapability(TCapability aCapability, OnlyCreateWithNull /*aDiagnostic*/) const
  3786 	{
  3787 	return DoHasCapability(aCapability);
  3788 	}
  3789 
  3790 inline TBool RThread::HasCapability(TCapability aCapability1, TCapability aCapability2, OnlyCreateWithNull /*aDiagnostic*/) const
  3791 	{
  3792 	return DoHasCapability(aCapability1, aCapability2);
  3793 	}
  3794 
  3795 #ifndef __REMOVE_PLATSEC_DIAGNOSTICS__
  3796 // For things using KSuppressPlatSecDiagnostic
  3797 inline TBool RThread::HasCapability(TCapability aCapability, OnlyCreateWithNull /*aDiagnostic*/, OnlyCreateWithNull /*aSuppress*/) const
  3798 	{
  3799 	return DoHasCapability(aCapability, KSuppressPlatSecDiagnosticMagicValue);
  3800 	}
  3801 
  3802 inline TBool RThread::HasCapability(TCapability aCapability1, TCapability aCapability2, OnlyCreateWithNull /*aDiagnostic*/, OnlyCreateWithNull /*aSuppress*/) const
  3803 	{
  3804 	return DoHasCapability(aCapability1, aCapability2, KSuppressPlatSecDiagnosticMagicValue);
  3805 	}
  3806 
  3807 #endif // !__REMOVE_PLATSEC_DIAGNOSTICS__
  3808 
  3809 #endif // !__REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__
  3810 
  3811 // Class TProcessId
  3812 inline TProcessId::TProcessId()
  3813 	: TObjectId()
  3814 /**
  3815 Default constructor.
  3816 */
  3817 	{}
  3818 
  3819 
  3820 
  3821 
  3822 inline TProcessId::TProcessId(TUint64 aId)
  3823 	: TObjectId(aId)
  3824 /**
  3825 Constructor taking an unsigned integer value.
  3826 
  3827 @param aId The value of the process id.
  3828 */
  3829 	{}
  3830 
  3831 
  3832 
  3833 
  3834 // Class RProcess
  3835 inline RProcess::RProcess()
  3836 	: RHandleBase(KCurrentProcessHandle)
  3837 /** 
  3838 Default constructor.
  3839 
  3840 The constructor exists to initialise private data within this handle; it does 
  3841 not create the process object.
  3842 
  3843 Specifically, it sets the handle-number to the value KCurrentProcessHandle.
  3844 In effect, the constructor creates a default process handle.
  3845 */
  3846 	{}
  3847 
  3848 
  3849 
  3850 
  3851 inline RProcess::RProcess(TInt aHandle)
  3852 	: RHandleBase(aHandle)
  3853 /**
  3854 Constructor taking a handle number.
  3855 
  3856 @param aHandle The handle number to be used to construct this RProcess handle.
  3857 */
  3858 	{}
  3859 
  3860 
  3861 
  3862 
  3863 inline TInt RProcess::Open(const TFindProcess& aFind,TOwnerType aType)
  3864 /**
  3865 Opens a handle to the process found by pattern matching a name.
  3866 
  3867 A TFindProcess object is used to find all processes whose full names match 
  3868 a specified pattern. 
  3869 
  3870 By default, ownership of this process handle is vested in the current process, 
  3871 but can be vested in the current thread by passing EOwnerThread as the second 
  3872 parameter to this function.
  3873 
  3874 @param aFind A reference to the TFindProcess object used to find the process.
  3875 @param aType An enumeration whose enumerators define the ownership of this 
  3876              process handle. If not explicitly specified, EOwnerProcess is taken
  3877 			 as default.
  3878 
  3879 @return KErrNone if successful, otherwise one of the other system-wide error codes.
  3880 */
  3881 	{return(RHandleBase::Open(aFind,aType));}
  3882 
  3883 
  3884 
  3885 
  3886 #ifndef __REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__
  3887 
  3888 inline TBool RProcess::HasCapability(TCapability aCapability, const char* aDiagnostic) const
  3889 	{
  3890 	return DoHasCapability(aCapability, aDiagnostic);
  3891 	}
  3892 
  3893 inline TBool RProcess::HasCapability(TCapability aCapability1, TCapability aCapability2, const char* aDiagnostic) const
  3894 	{
  3895 	return DoHasCapability(aCapability1, aCapability2, aDiagnostic);
  3896 	}
  3897 
  3898 #else //__REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__
  3899 
  3900 // Only available to NULL arguments
  3901 inline TBool RProcess::HasCapability(TCapability aCapability, OnlyCreateWithNull /*aDiagnostic*/) const
  3902 	{
  3903 	return DoHasCapability(aCapability);
  3904 	}
  3905 
  3906 inline TBool RProcess::HasCapability(TCapability aCapability1, TCapability aCapability2, OnlyCreateWithNull /*aDiagnostic*/) const
  3907 	{
  3908 	return DoHasCapability(aCapability1, aCapability2);
  3909 	}
  3910 
  3911 #ifndef __REMOVE_PLATSEC_DIAGNOSTICS__
  3912 // For things using KSuppressPlatSecDiagnostic
  3913 inline TBool RProcess::HasCapability(TCapability aCapability, OnlyCreateWithNull /*aDiagnostic*/, OnlyCreateWithNull /*aSuppress*/) const
  3914 	{
  3915 	return DoHasCapability(aCapability, KSuppressPlatSecDiagnosticMagicValue);
  3916 	}
  3917 
  3918 inline TBool RProcess::HasCapability(TCapability aCapability1, TCapability aCapability2, OnlyCreateWithNull /*aDiagnostic*/, OnlyCreateWithNull /*aSuppress*/) const
  3919 	{
  3920 	return DoHasCapability(aCapability1, aCapability2, KSuppressPlatSecDiagnosticMagicValue);
  3921 	}
  3922 
  3923 #endif // !__REMOVE_PLATSEC_DIAGNOSTICS__
  3924 
  3925 #endif // !__REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__
  3926 
  3927 
  3928 
  3929 
  3930 
  3931 // Class RSessionBase
  3932 
  3933 
  3934 /**
  3935 Creates a session with a server, specifying no message slots.
  3936 
  3937 It should be called as part of session initialisation in the derived class.
  3938 
  3939 Message slots are not pre-allocated for the session but are taken from
  3940 a system-wide pool allowing up to 255 asynchronous messages to be outstanding.
  3941 This raises a risk of failure due to lack of memory and, therefore, this mode
  3942 of operation is not viable for sessions that make guarantees about the failure
  3943 modes of asynchonous services.
  3944 
  3945 @param aServer  The name of the server with which a session is to
  3946                 be established.
  3947 @param aVersion The lowest version of the server with which this client
  3948                 is compatible
  3949 
  3950 @return KErrNone if successful, otherwise one of the other system-wide error
  3951         codes.
  3952 */
  3953 inline TInt RSessionBase::CreateSession(const TDesC& aServer,const TVersion& aVersion)
  3954 	{return CreateSession(aServer,aVersion,-1,EIpcSession_Unsharable,NULL,0);}
  3955 
  3956 
  3957 
  3958 
  3959 /**
  3960 Creates a session with a server, specifying no message slots.
  3961 
  3962 It should be called as part of session initialisation in the derived class.
  3963 
  3964 Message slots are not pre-allocated for the session but are taken from
  3965 a system-wide pool allowing up to 255 asynchronous messages to be outstanding.
  3966 This raises a risk of failure due to lack of memory and, therefore, this mode
  3967 of operation is not viable for sessions that make guarantees about the failure
  3968 modes of asynchonous services.
  3969 
  3970 @param aServer  A handle to a server with which a session is to be established.
  3971 @param aVersion The lowest version of the server with which this client
  3972                 is compatible
  3973 
  3974 @return KErrNone if successful, otherwise one of the other system-wide error
  3975         codes.
  3976 */
  3977 inline TInt RSessionBase::CreateSession(RServer2 aServer,const TVersion& aVersion)
  3978 	{return CreateSession(aServer,aVersion,-1,EIpcSession_Unsharable,NULL,0);}
  3979 
  3980 
  3981 
  3982 
  3983 /**
  3984 Issues a blind request to the server with the specified function number,
  3985 and arguments.
  3986 
  3987 A blind request is one where the server does not issue a response
  3988 to the client.
  3989 
  3990 @param aFunction The function number identifying the request.
  3991 @param aArgs     A set of up to 4 arguments and their types to be passed
  3992                  to the server.
  3993 
  3994 @return KErrNone, if the send operation is successful;
  3995         KErrServerTerminated, if the server no longer present;
  3996         KErrServerBusy, if there are no message slots available;
  3997         KErrNoMemory, if there is insufficient memory available.
  3998 
  3999 @panic  USER 72 if the function number is negative.
  4000 */
  4001 inline TInt RSessionBase::Send(TInt aFunction,const TIpcArgs& aArgs) const
  4002 	{return DoSend(aFunction,&aArgs);}
  4003 
  4004 
  4005 
  4006 
  4007 /**
  4008 Issues an asynchronous request to the server with the specified function
  4009 number and arguments. 
  4010 
  4011 The completion status of the request is returned via the request
  4012 status object, aStatus. 
  4013 
  4014 @param aFunction The function number identifying the request.
  4015 @param aArgs     A set of up to 4 arguments and their types to be passed
  4016                  to the server.
  4017 @param aStatus   The request status object used to contain the completion status
  4018                  of the request.
  4019                  
  4020 @panic  USER 72  if the function number is negative.                 
  4021 */
  4022 inline void RSessionBase::SendReceive(TInt aFunction,const TIpcArgs& aArgs,TRequestStatus& aStatus) const
  4023 	{DoSendReceive(aFunction,&aArgs,aStatus);}
  4024 
  4025 
  4026 
  4027 
  4028 /**
  4029 Issues a synchronous request to the server with the specified function number
  4030 and arguments.
  4031 
  4032 @param aFunction The function number identifying the request.
  4033 @param aArgs     A set of up to 4 arguments and their types to be passed
  4034                  to the server.
  4035 
  4036 @return KErrNone, if the send operation is successful;
  4037         KErrServerTerminated, if the server no longer present;
  4038         KErrServerBusy, if there are no message slots available;
  4039         KErrNoMemory, if there is insufficient memory available.
  4040 
  4041 @panic  USER 72  if the function number is negative.
  4042 */
  4043 inline TInt RSessionBase::SendReceive(TInt aFunction,const TIpcArgs& aArgs) const
  4044 	{return DoSendReceive(aFunction,&aArgs);}
  4045 
  4046 
  4047 
  4048 
  4049 /**
  4050 Issues a blind request to the server with the specified function number,
  4051 but with no arguments.
  4052 
  4053 A blind request is one where the server does not issue a response
  4054 to the client.
  4055 
  4056 @param aFunction The function number identifying the request.
  4057 
  4058 @return KErrNone, if the send operation is successful;
  4059         KErrServerTerminated, if the server no longer present;
  4060         KErrServerBusy, if there are no message slots available;
  4061         KErrNoMemory, if there is insufficient memory available.
  4062 
  4063 @panic  USER 72 if the function number is negative.
  4064 */
  4065 inline TInt RSessionBase::Send(TInt aFunction) const
  4066 	{return DoSend(aFunction,NULL);}
  4067 
  4068 
  4069 
  4070 
  4071 /**
  4072 Issues an asynchronous request to the server with the specified function
  4073 number, but with no arguments.
  4074 
  4075 The completion status of the request is returned via the request
  4076 status object, aStatus. 
  4077 
  4078 @param aFunction The function number identifying the request.
  4079 @param aStatus   The request status object used to contain the completion
  4080                  status of the request.
  4081                  
  4082 @panic  USER 72  if the function number is negative.                 
  4083 */
  4084 inline void RSessionBase::SendReceive(TInt aFunction,TRequestStatus& aStatus) const
  4085 	{ DoSendReceive(aFunction,NULL,aStatus);}
  4086 
  4087 
  4088 
  4089 
  4090 /**
  4091 Sets the handle-number of this handle to the specified 
  4092 value.
  4093 
  4094 The function can take a (zero or positive) handle-number,
  4095 or a (negative) error number.
  4096 
  4097 If aHandleOrError represents a handle-number, then the handle-number of this handle
  4098 is set to that value.
  4099 If aHandleOrError represents an error number, then the handle-number of this handle is set to zero
  4100 and the negative value is returned.
  4101 
  4102 @param aHandleOrError A handle-number, if zero or positive; an error value, if negative.
  4103 
  4104 @return KErrNone, if aHandle is a handle-number; the value of aHandleOrError, otherwise.
  4105 */
  4106 inline TInt RSessionBase::SetReturnedHandle(TInt aHandleOrError)
  4107 	{ return RHandleBase::SetReturnedHandle(aHandleOrError);}
  4108 
  4109 
  4110 
  4111 
  4112 inline TInt RSessionBase::SetReturnedHandle(TInt aHandleOrError,RHandleBase& aHandle)
  4113 	{ return RHandleBase::SetReturnedHandle(aHandleOrError,aHandle);}
  4114 /**
  4115 Issues a synchronous request to the server with the specified function number,
  4116 but with no arguments.
  4117 
  4118 @param aFunction The function number identifying the request.
  4119 
  4120 @return KErrNone, if the send operation is successful;
  4121         KErrServerTerminated, if the server no longer present;
  4122         KErrServerBusy, if there are no message slots available;
  4123         KErrNoMemory, if there is insufficient memory available.
  4124 
  4125 @panic  USER 72  if the function number is negative.
  4126 */
  4127 inline TInt RSessionBase::SendReceive(TInt aFunction) const
  4128 	{return DoSendReceive(aFunction,NULL);}
  4129 
  4130 
  4131 
  4132 
  4133 // Class RSubSessionBase
  4134 inline RSubSessionBase::RSubSessionBase()
  4135 	: iSubSessionHandle(0)
  4136 /**
  4137 Default constructor
  4138 */
  4139 	{}
  4140 
  4141 
  4142 
  4143 
  4144 inline TInt RSubSessionBase::SubSessionHandle() const
  4145 /**
  4146 Gets the sub-session handle number.
  4147 
  4148 This number is automatically passed to the server when making requests and is
  4149 used to identify the appropriate server-side sub-session.
  4150 
  4151 @return The sub-session handle number.
  4152 */
  4153 	{return iSubSessionHandle;}
  4154 
  4155 
  4156 
  4157 
  4158 /**
  4159 Creates a new sub-session within an existing session.
  4160 
  4161 @param aSession    The session to which this sub-session will belong.
  4162 @param aFunction   The opcode specifying the requested service; the server should interpret this as a request to create a sub-session.
  4163 @param aArgs       The message arguments.   
  4164 
  4165 @return            KErrNone if successful, otherwise one of the system-wide error codes.
  4166 */
  4167 inline TInt RSubSessionBase::CreateSubSession(const RSessionBase& aSession,TInt aFunction,const TIpcArgs& aArgs)
  4168 	{ return DoCreateSubSession(aSession,aFunction,&aArgs); }
  4169 
  4170 
  4171 
  4172 	
  4173 /**
  4174 Creates a new sub-session within an existing session.
  4175 
  4176 This variant sends no message arguments to the server.
  4177 
  4178 @param aSession    The session to which this sub-session will belong.
  4179 @param aFunction   The opcode specifying the requested service; the server should interpret this as a request to create a sub-session.
  4180 
  4181 @return            KErrNone if successful, otherwise one of the system-wide error codes.
  4182 */
  4183 inline TInt RSubSessionBase::CreateSubSession(const RSessionBase& aSession,TInt aFunction)
  4184 	{ return DoCreateSubSession(aSession,aFunction,NULL); }
  4185 
  4186 
  4187 
  4188 	
  4189 /**
  4190 Sends a blind message to the server - no reply is expected.
  4191 
  4192 A set of message arguments is passed that can be used to specify client
  4193 addresses, which the server can use to read from and write to the client
  4194 address space.
  4195 
  4196 Note that this function can fail if there are no available message-slots, either
  4197 in the system wide pool (if this is being used), or in the session reserved pool
  4198 (if this is being used). If the client request is synchronous, then always use
  4199 the synchronous variant of SendReceive(); this is guaranteed to reach the server.
  4200 
  4201 @param aFunction	The opcode specifying the requested service.
  4202 @param aArgs		The message arguments.
  4203                     
  4204 @return				KErrNone if successful, otherwise one of the system-wide error codes.                    
  4205 */
  4206 inline TInt RSubSessionBase::Send(TInt aFunction,const TIpcArgs& aArgs) const
  4207 	{return DoSend(aFunction,&aArgs);}
  4208 
  4209 
  4210 
  4211 	
  4212 /**
  4213 Sends a message to the server and waits asynchronously for the reply.
  4214 
  4215 An opcode specifies the service required.
  4216 A set of message arguments is passed that can be used to specify client addresses,
  4217 which the server can use to read from and write to the client address space.
  4218 
  4219 Note that this function can fail if there are no available message-slots, 
  4220 either in the system wide pool (if this is being used), or in the session
  4221 reserved pool (if this is being used). If the client request is synchronous,
  4222 then always use the synchronous variant of SendReceive();
  4223 this is guaranteed to reach the server.
  4224 
  4225 @param aFunction	The opcode specifying the requested service.
  4226 @param aArgs		The message arguments.
  4227 @param aStatus	    A request status which indicates the completion status of the asynchronous request.
  4228 */
  4229 inline void RSubSessionBase::SendReceive(TInt aFunction,const TIpcArgs& aArgs,TRequestStatus& aStatus) const
  4230 	{DoSendReceive(aFunction,&aArgs,aStatus);}
  4231 
  4232 
  4233 
  4234 	
  4235 /**
  4236 Sends a message to the server and waits synchronously for a reply.
  4237 
  4238 An opcode specifies the service required.
  4239 A set of message arguments is passed that can be used to specify client addresses,
  4240 which the server can use to read from and write to the client address space.
  4241 
  4242 Note that this function will only fail if the server itself fails or environmental
  4243 errors occur in the server. All requests made using this function are guaranteed to
  4244 reach the server. This means that all synchronous client requests (typically those
  4245 that return void) should be routed through this synchronous variant of SendReceive().
  4246 
  4247 @param aFunction	The opcode specifying the requested service.
  4248 @param aArgs		The message arguments.
  4249 
  4250 @return				KErrNone if successful, otherwise one of the system-wide error codes. 
  4251 */
  4252 inline TInt RSubSessionBase::SendReceive(TInt aFunction,const TIpcArgs& aArgs) const
  4253 	{return DoSendReceive(aFunction,&aArgs);}
  4254 	
  4255 
  4256 
  4257 	
  4258 /**
  4259 Sends a blind message to the server - no reply is expected.
  4260 
  4261 This variant sends no message arguments to the server.
  4262 
  4263 @param aFunction	The opcode specifying the requested service.
  4264                     
  4265 @return				KErrNone if successful, otherwise one of the system-wide error codes. 
  4266 */
  4267 inline TInt RSubSessionBase::Send(TInt aFunction) const
  4268 	{return DoSend(aFunction,NULL);}
  4269 
  4270 
  4271 
  4272 	
  4273 /**
  4274 Sends a message to the server and waits asynchronously for the reply.
  4275 
  4276 An opcode specifies the service required.
  4277 This variant sends no message arguments to the server.
  4278 
  4279 @param aFunction	The opcode specifying the requested service.
  4280 @param aStatus	    A request status which indicates the completion status of the asynchronous request.
  4281 */
  4282 inline void RSubSessionBase::SendReceive(TInt aFunction,TRequestStatus& aStatus) const
  4283 	{ DoSendReceive(aFunction,NULL,aStatus);}
  4284 
  4285 
  4286 
  4287 	
  4288 /**
  4289 Sends a message to the server and waits synchronously for a reply.
  4290 
  4291 An opcode specifies the service required.
  4292 This variant sends no message arguments to the server.
  4293 
  4294 @param aFunction	The opcode specifying the requested service.
  4295 
  4296 @return				KErrNone if successful, otherwise one of the system-wide error codes. 
  4297 */
  4298 inline TInt RSubSessionBase::SendReceive(TInt aFunction) const
  4299 	{return DoSendReceive(aFunction,NULL);}
  4300 
  4301 
  4302 
  4303 
  4304 // Class RRefBase
  4305 
  4306 /**
  4307 Default constructor.
  4308 */
  4309 inline RRefBase::RRefBase()
  4310 	: iPtr(NULL)
  4311 	{}
  4312 
  4313 
  4314 
  4315 /**
  4316 Copy constructor.
  4317 
  4318 @param aRef A reference to the object to be copied.
  4319 */
  4320 inline RRefBase::RRefBase(const RRefBase &aRef)
  4321 	{Copy(aRef);}
  4322 
  4323 
  4324 
  4325 
  4326 // Class RRef
  4327 
  4328 
  4329 /**
  4330 Default constructor.
  4331 */
  4332 template <class T>
  4333 inline RRef<T>::RRef()
  4334 	{}
  4335 
  4336 
  4337 
  4338 /**
  4339 Copy constructor.
  4340 
  4341 The constructor frees any existing contained object, and takes ownership of
  4342 the object owned by anObject. 
  4343 
  4344 @param anObject A reference to another 'reference' object.
  4345                 On return from this constructor, anObject may be safely
  4346                 orphaned if it lives on the program stack.
  4347 */
  4348 template <class T>
  4349 inline RRef<T>::RRef(const RRef<T> &anObject)
  4350 	{Copy(anObject);}
  4351 
  4352 
  4353 
  4354 
  4355 /**
  4356 Assignment operator.
  4357 
  4358 The constructor frees any existing contained object, and takes ownership of
  4359 the object owned by anObject. 
  4360 
  4361 @param anObject A reference to another 'reference' object.
  4362                 On return from this constructor, anObject may be safely
  4363                 orphaned if it lives on the program stack.
  4364 */
  4365 template <class T>
  4366 inline void RRef<T>::operator=(const RRef<T> &anObject)
  4367 	{Copy(anObject);}
  4368 
  4369 
  4370 
  4371 
  4372 /**
  4373 Gets a pointer to the contained object.
  4374 
  4375 @return A pointer to the contained object
  4376 */
  4377 template <class T>
  4378 inline T *RRef<T>::operator->()
  4379 	{return((T *)iPtr);}
  4380 
  4381 
  4382 
  4383 
  4384 /**
  4385 Gets a pointer to the contained object.
  4386 
  4387 @return A pointer to the contained object
  4388 */
  4389 template <class T>
  4390 inline RRef<T>::operator T*()
  4391 	{return((T *)iPtr);}
  4392 
  4393 
  4394 
  4395 
  4396 /**
  4397 Creates a copy of the specified object, which is to be contained by
  4398 this reference object.
  4399 
  4400 The amount of memory set aside to contain the object is defined by the size
  4401 of the object
  4402 
  4403 @param anObject The object to be packaged up by this reference object.
  4404 */
  4405 template <class T>
  4406 void RRef<T>::Alloc(const T &anObject)
  4407 	{DoAlloc(&anObject,sizeof(T));}
  4408 
  4409 
  4410 
  4411 
  4412 /**
  4413 Creates a copy of the specified object, which is to be contained by
  4414 this reference object.
  4415 
  4416 The amount of memory set aside to contain the object is defined by aSize.
  4417 
  4418 @param anObject The object to be packaged up by this reference object.
  4419 @param aSize    The amount of memory to be set aside to contain the object.
  4420                 You must make sure that this is big enough.
  4421 */
  4422 template <class T>
  4423 void RRef<T>::Alloc(const T &anObject,TInt aSize)
  4424 	{DoAlloc(&anObject,aSize);}
  4425 
  4426 
  4427 
  4428 
  4429 /**
  4430 Creates a copy of the specified object, which is to be contained by
  4431 this reference object, and leaves on failure.
  4432 
  4433 The amount of memory set aside to contain the object is defined by the size
  4434 of the object
  4435 
  4436 @param anObject The object to be packaged up by this reference object.
  4437 */
  4438 template <class T>
  4439 void RRef<T>::AllocL(const T &anObject)
  4440 	{DoAllocL(&anObject,sizeof(T));}
  4441 
  4442 
  4443 
  4444 
  4445 /**
  4446 Creates a copy of the specified object, which is to be contained by
  4447 this reference object, and leaves on failure.
  4448 
  4449 The amount of memory set aside to contain the object is defined by aSize.
  4450 
  4451 @param anObject The object to be packaged up by this reference object.
  4452 @param aSize    The amount of memory to be set aside to contain the object.
  4453                 You must make sure that this is big enough.
  4454 */
  4455 template <class T>
  4456 void RRef<T>::AllocL(const T &anObject,TInt aSize)
  4457 	{DoAllocL(&anObject,aSize);}
  4458 
  4459 
  4460 
  4461 
  4462 // Class TRegion
  4463 inline TBool TRegion::CheckError() const
  4464 /** 
  4465 Tests whether the region's error flag is set.
  4466 
  4467 The error flag may be set:
  4468 
  4469 1. when an attempt to allocate more memory for the region fails
  4470 
  4471 2. if an attempt is made to expand a fixed size region beyond its allocated
  4472    size
  4473 
  4474 3. if ForceError() has been called.
  4475 
  4476 Use Clear() to unset the error flag, clear the region and free all allocated 
  4477 memory.
  4478 
  4479 @return True, if the error flag is set; false, otherwise. 
  4480 
  4481 @see TRegion::ForceError
  4482 @see TRegion::Clear
  4483 */
  4484 	{return(iError);}
  4485 
  4486 
  4487 
  4488 
  4489 inline TInt TRegion::Count() const
  4490 /**
  4491 Gets the number of rectangles in this region.
  4492 
  4493 @return The number of rectangles.
  4494 */
  4495 	{return(iCount);}
  4496 
  4497 
  4498 
  4499 
  4500 inline const TRect *TRegion::RectangleList() const
  4501 /**
  4502 Gets a pointer to the array of rectangles defining this region.
  4503 
  4504 @return Pointer to the array of rectangles. Note that array is a standard 
  4505         C++ array, i.e. a concatenated set of TRect objects. Use Count() to
  4506 		get the number of rectangles.
  4507 
  4508 @see TRegion::Count
  4509 */
  4510 	{return(((TRegion *)this)->RectangleListW());}
  4511 
  4512 
  4513 
  4514 
  4515 inline TRegion::TRegion()
  4516 	{}
  4517 
  4518 
  4519 
  4520 
  4521 // Class RRegion
  4522 inline TInt RRegion::CheckSpare() const
  4523 /**
  4524 Gets the number of free memory slots in the region.
  4525 
  4526 This is the number of slots which have been allocated, minus the number in 
  4527 use.
  4528 
  4529 @return The number of free memory slots in the region.
  4530 */
  4531 	{return(iAllocedRects-iCount);}
  4532 
  4533 
  4534 
  4535 
  4536 // Class TRegionFix
  4537 template <TInt S>
  4538 inline TRegionFix<S>::TRegionFix() : TRegion(-S)
  4539 /**
  4540 Constructs a default fixed size region.
  4541 */
  4542 	{}
  4543 
  4544 
  4545 
  4546 
  4547 template <TInt S>
  4548 inline TRegionFix<S>::TRegionFix(const TRect &aRect) : TRegion(-S)
  4549 /**
  4550 Constructs a fixed size region with a TRect.
  4551 
  4552 @param aRect Rectangle to be added to the newly constructed region.
  4553 */
  4554 	{AddRect(aRect);}
  4555 
  4556 
  4557 
  4558 
  4559 template <TInt S>
  4560 inline TRegionFix<S>::TRegionFix(const TRegionFix<S> &aRegion)
  4561 /**
  4562 Copy constructor.
  4563 
  4564 @param aRegion The TRegionFix object to be copied.
  4565 */
  4566 	{*this=aRegion;}
  4567 
  4568 
  4569 
  4570 
  4571 template <TInt S>
  4572 inline RRegionBuf<S>::RRegionBuf() : RRegion(-S&(~ERRegionBuf),S)
  4573 /**
  4574 Constructs a default object.
  4575 
  4576 The granularity is the value of the template parameter.
  4577 */
  4578 	{}
  4579 
  4580 
  4581 
  4582 template <TInt S>
  4583 inline RRegionBuf<S>::RRegionBuf(const RRegion &aRegion) 
  4584 /**
  4585 Constructs this object from the specified RRegion.
  4586 
  4587 @param aRegion The region to assign to this RRegionBuf.
  4588 */
  4589 	{*this=aRegion;}
  4590 
  4591 
  4592 
  4593 
  4594 template <TInt S>
  4595 inline RRegionBuf<S>::RRegionBuf(const TRect &aRect) : RRegion(-S&(~ERRegionBuf),S)
  4596 /**
  4597 Constructs an RRegionBuf with a TRect.
  4598 
  4599 Its granularity is initialised to the value contained in the template argument.
  4600 The resulting region consists of the specified single rectangle.
  4601 
  4602 @param aRect The single rectangle with which to initialise the region.
  4603 */
  4604 	{AddRect(aRect);}
  4605 
  4606 
  4607 
  4608 
  4609 template <TInt S>
  4610 inline RRegionBuf<S>::RRegionBuf(const RRegionBuf<S> &aRegion)
  4611 /**
  4612 Copy constructs from an existing RRegionBuf object.
  4613 
  4614 @param aRegion The RRegionBuf to be copied.
  4615 */
  4616     {*this=aRegion;}
  4617 
  4618 
  4619 
  4620 
  4621 // enum TTimerLockSpec
  4622 inline TTimerLockSpec &operator++(TTimerLockSpec &aLock)
  4623 	{
  4624 	return aLock=((aLock==ETwelveOClock) ? EOneOClock : (TTimerLockSpec)((TInt)aLock+1));
  4625 	}
  4626 inline TTimerLockSpec operator++(TTimerLockSpec &aLock, TInt)
  4627 	{
  4628 	TTimerLockSpec l=aLock;
  4629 	aLock=((aLock==ETwelveOClock) ? EOneOClock : (TTimerLockSpec)((TInt)aLock+1));
  4630 	return l;
  4631 	}
  4632 
  4633 
  4634 
  4635 
  4636 // Class TCheckedUid
  4637 inline const TUidType& TCheckedUid::UidType() const
  4638 /**
  4639 Gets the Uid type contained in this object.
  4640 
  4641 @return The Uid type.
  4642 */
  4643     {return(iType);}
  4644 
  4645 
  4646 
  4647 
  4648 // Array deletion support, uses CBase deletion (virtual d'tor) for all C-classes
  4649 template <class T>
  4650 /**	@internalComponent
  4651 */
  4652 void _DeleteArray(T** aBegin,T** aEnd)
  4653 	{for (;;) if (aBegin<aEnd) delete *aBegin++; else return;}
  4654 
  4655 template <class T>
  4656 /**	@internalComponent
  4657 */
  4658 struct _ArrayUtil
  4659 	{
  4660 	static inline void Delete(T* aBegin,T* aEnd,CBase*)
  4661 		{::_DeleteArray((CBase**)aBegin,(CBase**)aEnd);}
  4662 	static inline void Delete(T* aBegin,T* aEnd,TAny*)
  4663 		{::_DeleteArray(aBegin,aEnd);}
  4664 	static inline void Delete(T* aArray,TInt aCount)
  4665 		{Delete(aArray,aArray+aCount,*aArray);}
  4666 	};
  4667 
  4668 
  4669 
  4670 
  4671 #ifndef __TOOLS__
  4672 // Template class TFixedArray
  4673 IMPORT_C void PanicTFixedArray();
  4674 
  4675 
  4676 
  4677 
  4678 template <class T,TInt S>
  4679 inline TFixedArray<T,S>::TFixedArray()
  4680 /**
  4681 Default constructor.
  4682 
  4683 Constructs an uninitialised C++ array.
  4684 */
  4685 	{}
  4686 
  4687 
  4688 
  4689 
  4690 template <class T,TInt S>
  4691 inline void TFixedArray<T,S>::Copy(const T* aList,TInt aLength)
  4692 /**
  4693 Copies the specified set of contiguous objects into the C++ array.
  4694 
  4695 The copy operation starts at the beginning of the array, replacing
  4696 any existing data.
  4697 
  4698 @param aList   A pointer to a set of contiguous objects. 
  4699 @param aLength The number of contiguous objects to be copied. This value must
  4700                not be negative and must not be greater than the size of the
  4701 			   array as defined by the integer template parameter.
  4702 
  4703 @panic USER 133, in a debug build only, if aLength is negative or is greater
  4704        than the size of the array as defined by the integer template parameter.
  4705 */
  4706 	{__ASSERT_DEBUG(TUint(aLength)<=TUint(S),PanicTFixedArray());Mem::Copy(iRep,aList,aLength*sizeof(T));}
  4707 
  4708 
  4709 
  4710 
  4711 template <class T,TInt S>
  4712 inline TFixedArray<T,S>::TFixedArray(const T* aList,TInt aLength)
  4713 /**
  4714 Constructs a C++ array initialised with the specified objects.
  4715 
  4716 @param aList   A pointer to a set of contiguous objects. 
  4717 @param aLength The number of contiguous objects to be copied. This value must
  4718                not be negative and must not be greater than the size of the
  4719 			   array as defined by the integer template parameter.
  4720 
  4721 @panic USER 133, in a debug build only, if aLength is negative or is greater
  4722        than the size of the array as defined by the integer template parameter.
  4723 */
  4724 	{Copy(aList,aLength);}
  4725 
  4726 
  4727 
  4728 
  4729 template <class T,TInt S>
  4730 inline void TFixedArray<T,S>::Reset()
  4731 /**
  4732 Fills every element of the array with binary zeroes.
  4733 */
  4734 	{Mem::FillZ(iRep,sizeof(iRep));}
  4735 
  4736 
  4737 
  4738 
  4739 template <class T,TInt S>
  4740 inline TInt TFixedArray<T,S>::Count() const
  4741 /**
  4742 Gets the size of the array.
  4743 
  4744 For any instance of this class, the array size 
  4745 is fixed and has the same value as the integer template parameter.
  4746 
  4747 @return The size of the array.
  4748 */
  4749 	{return S;}
  4750 
  4751 
  4752 
  4753 
  4754 template <class T,TInt S>
  4755 inline TInt TFixedArray<T,S>::Length() const
  4756 /**
  4757 Gets the size of an array element, in bytes.
  4758 
  4759 @return The size of an array element, in bytes.
  4760 */
  4761 	{return sizeof(T);}
  4762 
  4763 
  4764 
  4765 
  4766 template <class T,TInt S>
  4767 inline TBool TFixedArray<T,S>::InRange(TInt aIndex)
  4768 	{return TUint(aIndex)<S;}
  4769 
  4770 
  4771 
  4772 
  4773 template <class T,TInt S>
  4774 inline T& TFixedArray<T,S>::operator[](TInt aIndex)
  4775 /**
  4776 Gets a reference to the specified element within the C++ array.
  4777 
  4778 @param aIndex The position of the element within the array. This is an offset value; 
  4779               a zero value refers to the first element in the array. This value must be 
  4780               greater than or equal to zero and less than the size of the array.
  4781 
  4782 @return A reference to an element of the array.
  4783 
  4784 @panic USER 133, in a debug build only, if aIndex is negative or greater than or equal to the size
  4785        of the array as defined by the integer template parameter.
  4786 */
  4787 	{__ASSERT_DEBUG(InRange(aIndex),PanicTFixedArray());return iRep[aIndex];}
  4788 
  4789 
  4790 
  4791 
  4792 template <class T,TInt S>
  4793 inline const T& TFixedArray<T,S>::operator[](TInt aIndex) const
  4794 /**
  4795 Gets a const reference to the specified element within the C++ array.
  4796 
  4797 @param aIndex The position of the element within the array. This is an offset value; 
  4798               a zero value refers to the first element in the array. This value must be 
  4799               greater than or equal to zero and less than the size of the array.
  4800 
  4801 @return A const reference to an element of the array; the element cannot be 
  4802         changed through this reference.
  4803 
  4804 @panic USER 133, in a debug build only, if aIndex is negative or greater than or equal to the size
  4805        of the array as defined by the integer template parameter.
  4806 */
  4807 	{return CONST_CAST(ThisClass&,*this)[aIndex];}
  4808 
  4809 
  4810 
  4811 
  4812 template <class T,TInt S>
  4813 inline T& TFixedArray<T,S>::At(TInt aIndex)
  4814 /**
  4815 Gets a reference to the specified element within the C++ array.
  4816 
  4817 @param aIndex The position of the element within the array. This is an offset value; 
  4818               a zero value refers to the first element in the array. This value must be 
  4819               greater than or equal to zero and less than the size of the array.
  4820 
  4821 @return A reference to an element of the array.
  4822 
  4823 @panic USER 133, if aIndex is negative or greater than or equal to the size
  4824        of the array as defined by the integer template parameter.
  4825 */
  4826 	{__ASSERT_ALWAYS(InRange(aIndex),PanicTFixedArray());return iRep[aIndex];}
  4827 
  4828 
  4829 
  4830 
  4831 template <class T,TInt S>
  4832 inline const T& TFixedArray<T,S>::At(TInt aIndex) const
  4833 /**
  4834 Gets a const reference to the specified element within the C++ array.
  4835 
  4836 @param aIndex The position of the element within the array. This is an offset value; 
  4837               a zero value refers to the first element in the array. This value must be 
  4838               greater than or equal to zero and less than the size of the array.
  4839 
  4840 @return A const reference to an element of the array; the element cannot be 
  4841         changed through this reference.
  4842 
  4843 @panic USER 133, in a debug build only, if aIndex is negative or greater than or equal to the size
  4844        of the array as defined by the integer template parameter.
  4845 */
  4846 	{return CONST_CAST(ThisClass&,*this).At(aIndex);}
  4847 
  4848 
  4849 
  4850 
  4851 template <class T,TInt S>
  4852 inline T* TFixedArray<T,S>::Begin()
  4853 /**
  4854 Gets a pointer to the first element of the array.
  4855 
  4856 @return A pointer to the first element of the array.
  4857 */
  4858 	{return &iRep[0];}
  4859 
  4860 
  4861 
  4862 
  4863 template <class T,TInt S>
  4864 inline T* TFixedArray<T,S>::End()
  4865 /**
  4866 Gets a pointer to the first byte following the end of the array.
  4867 
  4868 @return A pointer to the first byte following the end of the array.
  4869 */
  4870 	{return &iRep[S];}
  4871 
  4872 
  4873 
  4874 
  4875 template <class T,TInt S>
  4876 inline const T* TFixedArray<T,S>::Begin() const
  4877 /**
  4878 Gets a pointer to the first element of the array.
  4879 
  4880 @return A pointer to a const element of the array. 
  4881 */
  4882 	{return &iRep[0];}
  4883 
  4884 
  4885 
  4886 
  4887 template <class T,TInt S>
  4888 inline const T* TFixedArray<T,S>::End() const
  4889 /**
  4890 Gets a pointer to the first byte following the end of the array.
  4891 
  4892 @return A pointer to the const first byte following the end of the array.
  4893 */
  4894 	{return &iRep[S];}
  4895 
  4896 
  4897 
  4898 
  4899 template <class T,TInt S>
  4900 inline TInt TFixedArray<T,S>::CountFunctionR(const CBase*)
  4901 	{return S;}
  4902 
  4903 
  4904 
  4905 
  4906 template <class T,TInt S>
  4907 inline const TAny* TFixedArray<T,S>::AtFunctionR(const CBase* aThis,TInt aIndex)
  4908 	{return &REINTERPRET_CAST(const ThisClass&,*aThis)[aIndex];}
  4909 
  4910 
  4911 
  4912 
  4913 template <class T,TInt S>
  4914 inline TArray<T> TFixedArray<T,S>::Array() const
  4915 /**
  4916 Creates and returns a generic array for this C++ array.
  4917 
  4918 @return A generic array for this C++ array.
  4919 */
  4920 	{return TArray<T>(CountFunctionR,AtFunctionR,REINTERPRET_CAST(const CBase*,this));}
  4921 
  4922 
  4923 
  4924 
  4925 template <class T,TInt S>
  4926 inline void TFixedArray<T,S>::DeleteAll()
  4927 /**
  4928 Invokes the delete operator on every member of the array.
  4929 
  4930 The function can only be used for arrays of pointers to CBase derived objects.
  4931 
  4932 If the array is to be used after a call to this function, it is good practice 
  4933 to call TFixedArray<class T,TInt S>::Reset() to set all array elements to 
  4934 NULL.
  4935 */
  4936 	{_ArrayUtil<T>::Delete(iRep,S);}
  4937 #endif
  4938 
  4939 
  4940 
  4941 
  4942 // class User
  4943 
  4944 inline RHeap* User::SwitchHeap(RAllocator* aHeap)
  4945 /**
  4946 Changes the current thread's heap.
  4947 	
  4948 @param aHeap A pointer to the new heap handle.
  4949 
  4950 @return A pointer to the old heap handle.
  4951 */
  4952 	{ return (RHeap*)SwitchAllocator(aHeap); }
  4953 
  4954 
  4955 
  4956 
  4957 inline RHeap& User::Heap()
  4958 /**
  4959 Gets a reference to the handle to the current thread's heap.
  4960 	
  4961 @return A reference to the handle to the current thread's heap.
  4962 */
  4963 	{ return (RHeap&)Allocator(); }
  4964 
  4965 
  4966 
  4967 
  4968 #ifndef __REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__
  4969 
  4970 inline TBool User::CreatorHasCapability(TCapability aCapability, const char* aDiagnostic)
  4971 	{
  4972 	return DoCreatorHasCapability(aCapability, aDiagnostic);
  4973 	}
  4974 
  4975 inline TBool User::CreatorHasCapability(TCapability aCapability1, TCapability aCapability2, const char* aDiagnostic)
  4976 	{
  4977 	return DoCreatorHasCapability(aCapability1, aCapability2, aDiagnostic);
  4978 	}
  4979 
  4980 #else //__REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__
  4981 
  4982 // Only available to NULL arguments
  4983 inline TBool User::CreatorHasCapability(TCapability aCapability, OnlyCreateWithNull /*aDiagnostic*/)
  4984 	{
  4985 	return DoCreatorHasCapability(aCapability);
  4986 	}
  4987 
  4988 inline TBool User::CreatorHasCapability(TCapability aCapability1, TCapability aCapability2, OnlyCreateWithNull /*aDiagnostic*/)
  4989 	{
  4990 	return DoCreatorHasCapability(aCapability1, aCapability2);
  4991 	}
  4992 
  4993 #ifndef __REMOVE_PLATSEC_DIAGNOSTICS__
  4994 // For things using KSuppressPlatSecDiagnostic
  4995 inline TBool User::CreatorHasCapability(TCapability aCapability, OnlyCreateWithNull /*aDiagnostic*/, OnlyCreateWithNull /*aSuppress*/)
  4996 	{
  4997 	return DoCreatorHasCapability(aCapability, KSuppressPlatSecDiagnosticMagicValue);
  4998 	}
  4999 
  5000 inline TBool User::CreatorHasCapability(TCapability aCapability1, TCapability aCapability2, OnlyCreateWithNull /*aDiagnostic*/, OnlyCreateWithNull /*aSuppress*/)
  5001 	{
  5002 	return DoCreatorHasCapability(aCapability1, aCapability2, KSuppressPlatSecDiagnosticMagicValue);
  5003 	}
  5004 
  5005 #endif // !__REMOVE_PLATSEC_DIAGNOSTICS__
  5006 
  5007 #endif // !__REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__
  5008 
  5009 /** Sets this TSecurityInfo to the security attributes of this process. */
  5010 inline void TSecurityInfo::SetToCurrentInfo()
  5011 	{ new (this) TSecurityInfo(RProcess()); }
  5012 
  5013 /** Constructs a TSecurityInfo using the security attributes of aProcess */
  5014 inline void TSecurityInfo::Set(RProcess aProcess)
  5015 	{ new (this) TSecurityInfo(aProcess); }
  5016 
  5017 /** Constructs a TSecurityInfo using the security attributes of the process
  5018 owning aThread 
  5019 */
  5020 inline void TSecurityInfo::Set(RThread aThread)
  5021 	{ new (this) TSecurityInfo(aThread); }
  5022 
  5023 /** Constructs a TSecurityInfo using the security attributes of the process
  5024 which sent the message aMsgPtr */
  5025 inline void TSecurityInfo::Set(RMessagePtr2 aMsgPtr)
  5026 	{ new (this) TSecurityInfo(aMsgPtr); }
  5027 
  5028 #ifndef __REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__
  5029 
  5030 /** Checks this policy against the platform security attributes of aProcess.
  5031 
  5032 	When a check fails the action taken is determined by the system wide Platform Security
  5033 	configuration. If PlatSecDiagnostics is ON, then a diagnostic message is emitted.
  5034 	If PlatSecEnforcement is OFF, then this function will return ETrue even though the
  5035 	check failed.
  5036 
  5037 @param aProcess The RProcess object to check against this TSecurityPolicy.
  5038 @param aDiagnostic A string that will be emitted along with any diagnostic message
  5039 							that may be issued if the policy check fails.
  5040 							This string must be enclosed in the __PLATSEC_DIAGNOSTIC_STRING macro
  5041 							which enables it to be easily removed from the system.
  5042 @return ETrue if all the requirements of this TSecurityPolicy are met by the
  5043 platform security attributes of aProcess, EFalse otherwise.
  5044 @panic USER 190 if 'this' is an invalid SSecurityInfo object
  5045 */
  5046 inline TBool TSecurityPolicy::CheckPolicy(RProcess aProcess, const char* aDiagnostic) const
  5047 	{
  5048 	return DoCheckPolicy(aProcess, aDiagnostic);
  5049 	}
  5050 
  5051 /** Checks this policy against the platform security attributes of the process
  5052 owning aThread.
  5053 
  5054 	When a check fails the action taken is determined by the system wide Platform Security
  5055 	configuration. If PlatSecDiagnostics is ON, then a diagnostic message is emitted.
  5056 	If PlatSecEnforcement is OFF, then this function will return ETrue even though the
  5057 	check failed.
  5058 
  5059 @param aThread The thread whose owning process' platform security attributes
  5060 are to be checked against this TSecurityPolicy.
  5061 @param aDiagnostic A string that will be emitted along with any diagnostic message
  5062 							that may be issued if the policy check fails.
  5063 							This string must be enclosed in the __PLATSEC_DIAGNOSTIC_STRING macro
  5064 							which enables it to be easily removed from the system.
  5065 @return ETrue if all the requirements of this TSecurityPolicy are met by the
  5066 platform security parameters of the owning process of aThread, EFalse otherwise.
  5067 @panic USER 190 if 'this' is an invalid SSecurityInfo object
  5068 */
  5069 inline TBool TSecurityPolicy::CheckPolicy(RThread aThread, const char* aDiagnostic) const
  5070 	{
  5071 	return DoCheckPolicy(aThread, aDiagnostic);
  5072 	}
  5073 
  5074 /** Checks this policy against the platform security attributes of the process which sent
  5075 the given message.
  5076 
  5077 	When a check fails the action taken is determined by the system wide Platform Security
  5078 	configuration. If PlatSecDiagnostics is ON, then a diagnostic message is emitted.
  5079 	If PlatSecEnforcement is OFF, then this function will return ETrue even though the
  5080 	check failed.
  5081 
  5082 @param aMsgPtr The RMessagePtr2 object to check against this TSecurityPolicy.
  5083 @param aDiagnostic A string that will be emitted along with any diagnostic message
  5084 							that may be issued if the policy check fails.
  5085 							This string must be enclosed in the __PLATSEC_DIAGNOSTIC_STRING macro
  5086 							which enables it to be easily removed from the system.
  5087 @return ETrue if all the requirements of this TSecurityPolicy are met by the
  5088 platform security attributes of aMsg, EFalse otherwise.
  5089 @panic USER 190 if 'this' is an invalid SSecurityInfo object
  5090 */
  5091 inline TBool TSecurityPolicy::CheckPolicy(RMessagePtr2 aMsgPtr, const char* aDiagnostic) const
  5092 	{
  5093 	return DoCheckPolicy(aMsgPtr, aDiagnostic);
  5094 	}
  5095 
  5096 /** Checks this policy against the platform security attributes of the process which sent
  5097 the given message.
  5098 
  5099 	When a check fails the action taken is determined by the system wide Platform Security
  5100 	configuration. If PlatSecDiagnostics is ON, then a diagnostic message is emitted.
  5101 	If PlatSecEnforcement is OFF, then this function will return ETrue even though the
  5102 	check failed.
  5103 
  5104 @param aMsgPtr The RMessagePtr2 object to check against this TSecurityPolicy.
  5105 @param aMissing A TSecurityInfo object which this method fills with any capabilities or IDs
  5106 				it finds to be missing. 
  5107 @param aDiagnostic A string that will be emitted along with any diagnostic message
  5108 							that may be issued if the policy check fails.
  5109 							This string must be enclosed in the __PLATSEC_DIAGNOSTIC_STRING macro
  5110 							which enables it to be easily removed from the system.
  5111 @return ETrue if all the requirements of this TSecurityPolicy are met by the
  5112 platform security attributes of aMsg, EFalse otherwise.
  5113 @panic USER 190 if 'this' is an invalid SSecurityInfo object
  5114 
  5115 @internalComponent
  5116 */
  5117 inline TBool TSecurityPolicy::CheckPolicy(RMessagePtr2 aMsgPtr, TSecurityInfo& aMissing, const char* aDiagnostic) const
  5118 	{
  5119 	return DoCheckPolicy(aMsgPtr, aMissing, aDiagnostic);
  5120 	}
  5121 
  5122 /** Checks this policy against the platform security attributes of this process' creator.
  5123 
  5124 	When a check fails the action taken is determined by the system wide Platform Security
  5125 	configuration. If PlatSecDiagnostics is ON, then a diagnostic message is emitted.
  5126 	If PlatSecEnforcement is OFF, then this function will return ETrue even though the
  5127 	check failed.
  5128 
  5129 @param aDiagnostic A string that will be emitted along with any diagnostic message
  5130 							that may be issued if the policy check fails.
  5131 							This string must be enclosed in the __PLATSEC_DIAGNOSTIC_STRING macro
  5132 							which enables it to be easily removed from the system.
  5133 @return ETrue if all the requirements of this TSecurityPolicy are met by the
  5134 platform security attributes of this process' creator, EFalse otherwise.
  5135 @panic USER 190 if 'this' is an invalid SSecurityInfo object
  5136 */
  5137 inline TBool TSecurityPolicy::CheckPolicyCreator(const char* aDiagnostic) const
  5138 	{
  5139 	return DoCheckPolicyCreator(aDiagnostic);
  5140 	}
  5141 
  5142 /**
  5143 @see TSecurityPolicy::CheckPolicy(RProcess aProcess, const char* aDiagnostic)
  5144 */
  5145 inline TBool TStaticSecurityPolicy::CheckPolicy(RProcess aProcess, const char* aDiagnostic) const
  5146 	{
  5147 	return (&(*this))->CheckPolicy(aProcess, aDiagnostic);
  5148 	}
  5149 
  5150 /**
  5151 @see TSecurityPolicy::CheckPolicy(RThread aThread, const char* aDiagnostic)
  5152 */
  5153 inline TBool TStaticSecurityPolicy::CheckPolicy(RThread aThread, const char* aDiagnostic) const
  5154 	{
  5155 	return (&(*this))->CheckPolicy(aThread, aDiagnostic);
  5156 	}
  5157 
  5158 /**
  5159 @see TSecurityPolicy::CheckPolicy(RMessagePtr2 aMsgPtr, const char* aDiagnostic)
  5160 */
  5161 inline TBool TStaticSecurityPolicy::CheckPolicy(RMessagePtr2 aMsgPtr, const char* aDiagnostic) const
  5162 	{
  5163 	return (&(*this))->CheckPolicy(aMsgPtr, aDiagnostic);
  5164 	}
  5165 
  5166 /**
  5167 @see TSecurityPolicy::CheckPolicy(RMessagePtr2 aMsgPtr, TSecurityInfo& aMissing, const char* aDiagnostic)
  5168 @internalComponent
  5169 */
  5170 inline TBool TStaticSecurityPolicy::CheckPolicy(RMessagePtr2 aMsgPtr, TSecurityInfo& aMissing, const char* aDiagnostic) const
  5171 	{
  5172 	return (&(*this))->CheckPolicy(aMsgPtr, aMissing, aDiagnostic);
  5173 	}
  5174 
  5175 /**
  5176 @see TSecurityPolicy::CheckPolicyCreator(const char* aDiagnostic)
  5177 */
  5178 inline TBool TStaticSecurityPolicy::CheckPolicyCreator(const char* aDiagnostic) const
  5179 	{
  5180 	return (&(*this))->CheckPolicyCreator(aDiagnostic);
  5181 	}
  5182 
  5183 #else //__REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__
  5184 
  5185 /** Checks this policy against the platform security attributes of aProcess.
  5186 
  5187 	When a check fails the action taken is determined by the system wide Platform Security
  5188 	configuration. If PlatSecDiagnostics is ON, then a diagnostic message is emitted.
  5189 	If PlatSecEnforcement is OFF, then this function will return ETrue even though the
  5190 	check failed.
  5191 
  5192 @param aProcess The RProcess object to check against this TSecurityPolicy.
  5193 @param aDiagnostic A string that will be emitted along with any diagnostic message
  5194 							that may be issued if the policy check fails.
  5195 							This string must be enclosed in the __PLATSEC_DIAGNOSTIC_STRING macro
  5196 							which enables it to be easily removed from the system.
  5197 @return ETrue if all the requirements of this TSecurityPolicy are met by the
  5198 platform security attributes of aProcess, EFalse otherwise.
  5199 @panic USER 190 if 'this' is an invalid SSecurityInfo object
  5200 */
  5201 inline TBool TSecurityPolicy::CheckPolicy(RProcess aProcess, OnlyCreateWithNull /*aDiagnostic*/) const
  5202 	{
  5203 	return DoCheckPolicy(aProcess);
  5204 	}
  5205 
  5206 /** Checks this policy against the platform security attributes of the process
  5207 owning aThread.
  5208 
  5209 	When a check fails the action taken is determined by the system wide Platform Security
  5210 	configuration. If PlatSecDiagnostics is ON, then a diagnostic message is emitted.
  5211 	If PlatSecEnforcement is OFF, then this function will return ETrue even though the
  5212 	check failed.
  5213 
  5214 @param aThread The thread whose owning process' platform security attributes
  5215 are to be checked against this TSecurityPolicy.
  5216 @param aDiagnostic A string that will be emitted along with any diagnostic message
  5217 							that may be issued if the policy check fails.
  5218 							This string must be enclosed in the __PLATSEC_DIAGNOSTIC_STRING macro
  5219 							which enables it to be easily removed from the system.
  5220 @return ETrue if all the requirements of this TSecurityPolicy are met by the
  5221 platform security parameters of the owning process of aThread, EFalse otherwise.
  5222 @panic USER 190 if 'this' is an invalid SSecurityInfo object
  5223 */
  5224 inline TBool TSecurityPolicy::CheckPolicy(RThread aThread, OnlyCreateWithNull /*aDiagnostic*/) const
  5225 	{
  5226 	return DoCheckPolicy(aThread);
  5227 	}
  5228 
  5229 /** Checks this policy against the platform security attributes of the process which sent
  5230 the given message.
  5231 
  5232 	When a check fails the action taken is determined by the system wide Platform Security
  5233 	configuration. If PlatSecDiagnostics is ON, then a diagnostic message is emitted.
  5234 	If PlatSecEnforcement is OFF, then this function will return ETrue even though the
  5235 	check failed.
  5236 
  5237 @param aMsgPtr The RMessagePtr2 object to check against this TSecurityPolicy.
  5238 @param aDiagnostic A string that will be emitted along with any diagnostic message
  5239 							that may be issued if the policy check fails.
  5240 							This string must be enclosed in the __PLATSEC_DIAGNOSTIC_STRING macro
  5241 							which enables it to be easily removed from the system.
  5242 @return ETrue if all the requirements of this TSecurityPolicy are met by the
  5243 platform security attributes of aMsg, EFalse otherwise.
  5244 @panic USER 190 if 'this' is an invalid SSecurityInfo object
  5245 */
  5246 inline TBool TSecurityPolicy::CheckPolicy(RMessagePtr2 aMsgPtr, OnlyCreateWithNull /*aDiagnostic*/) const
  5247 	{
  5248 	return DoCheckPolicy(aMsgPtr);
  5249 	}
  5250 
  5251 /** Checks this policy against the platform security attributes of the process which sent
  5252 the given message.
  5253 
  5254 	When a check fails the action taken is determined by the system wide Platform Security
  5255 	configuration. If PlatSecDiagnostics is ON, then a diagnostic message is emitted.
  5256 	If PlatSecEnforcement is OFF, then this function will return ETrue even though the
  5257 	check failed.
  5258 
  5259 @param aMsgPtr The RMessagePtr2 object to check against this TSecurityPolicy.
  5260 @param aMissing A TSecurityInfo object which this method fills with any capabilities or IDs
  5261 				it finds to be missing. 
  5262 @param aDiagnostic A string that will be emitted along with any diagnostic message
  5263 							that may be issued if the policy check fails.
  5264 							This string must be enclosed in the __PLATSEC_DIAGNOSTIC_STRING macro
  5265 							which enables it to be easily removed from the system.
  5266 @return ETrue if all the requirements of this TSecurityPolicy are met by the
  5267 platform security attributes of aMsg, EFalse otherwise.
  5268 @panic USER 190 if 'this' is an invalid SSecurityInfo object
  5269 
  5270 @internalComponent
  5271 */
  5272 inline TBool TSecurityPolicy::CheckPolicy(RMessagePtr2 aMsgPtr, TSecurityInfo& aMissing, OnlyCreateWithNull /*aDiagnostic*/) const
  5273 	{
  5274 	return DoCheckPolicy(aMsgPtr, aMissing);
  5275 	}
  5276 
  5277 /** Checks this policy against the platform security attributes of this process' creator.
  5278 
  5279 	When a check fails the action taken is determined by the system wide Platform Security
  5280 	configuration. If PlatSecDiagnostics is ON, then a diagnostic message is emitted.
  5281 	If PlatSecEnforcement is OFF, then this function will return ETrue even though the
  5282 	check failed.
  5283 
  5284 @param aDiagnostic A string that will be emitted along with any diagnostic message
  5285 							that may be issued if the policy check fails.
  5286 							This string must be enclosed in the __PLATSEC_DIAGNOSTIC_STRING macro
  5287 							which enables it to be easily removed from the system.
  5288 @return ETrue if all the requirements of this TSecurityPolicy are met by the
  5289 platform security attributes of this process' creator, EFalse otherwise.
  5290 @panic USER 190 if 'this' is an invalid SSecurityInfo object
  5291 */
  5292 inline TBool TSecurityPolicy::CheckPolicyCreator(OnlyCreateWithNull /*aDiagnostic*/) const
  5293 	{
  5294 	return DoCheckPolicyCreator();
  5295 	}
  5296 
  5297 #ifndef __REMOVE_PLATSEC_DIAGNOSTICS__
  5298 inline TBool TSecurityPolicy::CheckPolicy(RProcess aProcess, OnlyCreateWithNull /*aDiagnostic*/, OnlyCreateWithNull /*aSuppress*/) const
  5299 	{
  5300 	return DoCheckPolicy(aProcess, KSuppressPlatSecDiagnosticMagicValue);
  5301 	}
  5302 
  5303 inline TBool TSecurityPolicy::CheckPolicy(RThread aThread, OnlyCreateWithNull /*aDiagnostic*/, OnlyCreateWithNull /*aSuppress*/) const
  5304 	{
  5305 	return DoCheckPolicy(aThread, KSuppressPlatSecDiagnosticMagicValue);
  5306 	}
  5307 
  5308 inline TBool TSecurityPolicy::CheckPolicy(RMessagePtr2 aMsgPtr, OnlyCreateWithNull /*aDiagnostic*/, OnlyCreateWithNull /*aSuppress*/) const
  5309 	{
  5310 	return DoCheckPolicy(aMsgPtr, KSuppressPlatSecDiagnosticMagicValue);
  5311 	}
  5312 
  5313 inline TBool TSecurityPolicy::CheckPolicy(RMessagePtr2 aMsgPtr, TSecurityInfo& aMissing, OnlyCreateWithNull /*aDiagnostic*/, OnlyCreateWithNull /*aSuppress*/) const
  5314 	{
  5315 	return DoCheckPolicy(aMsgPtr, aMissing, KSuppressPlatSecDiagnosticMagicValue);
  5316 	}
  5317 
  5318 inline TBool TSecurityPolicy::CheckPolicyCreator(OnlyCreateWithNull /*aDiagnostic*/, OnlyCreateWithNull /*aSuppress*/) const
  5319 	{
  5320 	return DoCheckPolicyCreator(KSuppressPlatSecDiagnosticMagicValue);
  5321 	}
  5322 #endif // !__REMOVE_PLATSEC_DIAGNOSTICS__
  5323 
  5324 /**
  5325 @see TSecurityPolicy::CheckPolicy(RProcess aProcess, const char* aDiagnostic)
  5326 */
  5327 inline TBool TStaticSecurityPolicy::CheckPolicy(RProcess aProcess, OnlyCreateWithNull /*aDiagnostic*/) const
  5328 	{
  5329 	return (&(*this))->CheckPolicy(aProcess);
  5330 	}
  5331 
  5332 /**
  5333 @see TSecurityPolicy::CheckPolicy(RThread aThread, const char* aDiagnostic)
  5334 */
  5335 inline TBool TStaticSecurityPolicy::CheckPolicy(RThread aThread, OnlyCreateWithNull /*aDiagnostic*/) const
  5336 	{
  5337 	return (&(*this))->CheckPolicy(aThread);
  5338 	}
  5339 
  5340 /**
  5341 @see TSecurityPolicy::CheckPolicy(RMessagePtr2 aMsgPtr, const char* aDiagnostic)
  5342 */
  5343 inline TBool TStaticSecurityPolicy::CheckPolicy(RMessagePtr2 aMsgPtr, OnlyCreateWithNull /*aDiagnostic*/) const
  5344 	{
  5345 	return (&(*this))->CheckPolicy(aMsgPtr);
  5346 	}
  5347 
  5348 /**
  5349 @see TSecurityPolicy::CheckPolicy(RMessagePtr2 aMsgPtr, TSecurityInfo& aMissing, const char* aDiagnostic)
  5350 @internalComponent
  5351 */
  5352 inline TBool TStaticSecurityPolicy::CheckPolicy(RMessagePtr2 aMsgPtr, TSecurityInfo& aMissing, OnlyCreateWithNull /*aDiagnostic*/) const
  5353 	{
  5354 	return (&(*this))->CheckPolicy(aMsgPtr, aMissing);
  5355 	}
  5356 
  5357 /**
  5358 @see TSecurityPolicy::CheckPolicyCreator(const char* aDiagnostic)
  5359 */
  5360 inline TBool TStaticSecurityPolicy::CheckPolicyCreator(OnlyCreateWithNull /*aDiagnostic*/) const
  5361 	{
  5362 	return (&(*this))->CheckPolicyCreator();
  5363 	}
  5364 
  5365 #ifndef __REMOVE_PLATSEC_DIAGNOSTICS__
  5366 /**
  5367 @see TSecurityPolicy::CheckPolicy(RProcess aProcess, const char* aDiagnostic)
  5368 */
  5369 inline TBool TStaticSecurityPolicy::CheckPolicy(RProcess aProcess, OnlyCreateWithNull /*aDiagnostic*/, OnlyCreateWithNull /*aSuppress*/) const
  5370 	{
  5371 	return (&(*this))->CheckPolicy(aProcess, KSuppressPlatSecDiagnostic);
  5372 	}
  5373 
  5374 /**
  5375 @see TSecurityPolicy::CheckPolicy(RThread aThread, const char* aDiagnostic)
  5376 */
  5377 inline TBool TStaticSecurityPolicy::CheckPolicy(RThread aThread, OnlyCreateWithNull /*aDiagnostic*/, OnlyCreateWithNull /*aSuppress*/) const
  5378 	{
  5379 	return (&(*this))->CheckPolicy(aThread, KSuppressPlatSecDiagnostic);
  5380 	}
  5381 
  5382 /**
  5383 @see TSecurityPolicy::CheckPolicy(RMessagePtr2 aMsgPtr, const char* aDiagnostic)
  5384 */
  5385 inline TBool TStaticSecurityPolicy::CheckPolicy(RMessagePtr2 aMsgPtr, OnlyCreateWithNull /*aDiagnostic*/, OnlyCreateWithNull /*aSuppress*/) const
  5386 	{
  5387 	return (&(*this))->CheckPolicy(aMsgPtr, KSuppressPlatSecDiagnostic);
  5388 	}
  5389 
  5390 /**
  5391 @see TSecurityPolicy::CheckPolicy(RMessagePtr2 aMsgPtr, TSecurityInfo& aMissing, const char* aDiagnostic)
  5392 @internalComponent
  5393 */
  5394 inline TBool TStaticSecurityPolicy::CheckPolicy(RMessagePtr2 aMsgPtr, TSecurityInfo& aMissing, OnlyCreateWithNull /*aDiagnostic*/, OnlyCreateWithNull /*aSuppress*/) const
  5395 	{
  5396 	return (&(*this))->CheckPolicy(aMsgPtr, aMissing, KSuppressPlatSecDiagnostic);
  5397 	}
  5398 
  5399 /**
  5400 @see TSecurityPolicy::CheckPolicyCreator(const char* aDiagnostic)
  5401 */
  5402 inline TBool TStaticSecurityPolicy::CheckPolicyCreator(OnlyCreateWithNull /*aDiagnostic*/, OnlyCreateWithNull /*aSuppress*/) const
  5403 	{
  5404 	return (&(*this))->CheckPolicyCreator(KSuppressPlatSecDiagnostic);
  5405 	}
  5406 #endif // !__REMOVE_PLATSEC_DIAGNOSTICS__
  5407 
  5408 #endif //__REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__
  5409 
  5410 
  5411 
  5412 #ifndef __KERNEL_MODE__
  5413 
  5414 /**
  5415 Appends an object pointer onto the array.
  5416 
  5417 The function leaves with one of the system wide error codes, if the operation fails.
  5418 
  5419 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  5420 
  5421 @param anEntry The object pointer to be appended.
  5422 */
  5423 template <class T>
  5424 inline void RPointerArray<T>::AppendL(const T* anEntry)
  5425 	{ User::LeaveIfError(Append(anEntry));}
  5426 
  5427 
  5428 /**
  5429 Inserts an object pointer into the array at the specified position.
  5430 
  5431 The function leaves with one of the system wide error codes, if
  5432 the operation fails.
  5433 
  5434 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  5435 
  5436 @param anEntry The object pointer to be inserted.
  5437 @param aPos    The position within the array where the object pointer is to be 
  5438                inserted. The position is relative to zero, i.e. zero implies
  5439 			   that a pointer is inserted at the beginning of the array.
  5440 
  5441 @panic USER 131, if aPos is negative, or is greater than the number of object
  5442        pointers currently in the array.
  5443 */
  5444 template <class T>
  5445 inline void RPointerArray<T>::InsertL(const T* anEntry, TInt aPos)
  5446 	{ User::LeaveIfError(Insert(anEntry,aPos)); }
  5447 
  5448 
  5449 /**
  5450 Finds the first object pointer in the array which matches the specified object 
  5451 pointer, using a sequential search.
  5452 
  5453 Matching is based on the comparison of pointers.
  5454 
  5455 The find operation always starts at the low index end of the array. There 
  5456 is no assumption about the order of objects in the array.
  5457 
  5458 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  5459 
  5460 @param anEntry The object pointer to be found.
  5461 @return The index of the first matching object pointer within the array.
  5462 @leave KErrNotFound, if no matching object pointer can be found.
  5463 */
  5464 template <class T>
  5465 inline TInt RPointerArray<T>::FindL(const T* anEntry) const
  5466 	{ return User::LeaveIfError(Find(anEntry));}
  5467 
  5468 
  5469 /**
  5470 Finds the first object pointer in the array whose object matches the specified 
  5471 object, using a sequential search and a matching algorithm.
  5472 
  5473 The algorithm for determining whether two class T objects match is provided 
  5474 by a function supplied by the caller.
  5475 
  5476 The find operation always starts at the low index end of the array. There 
  5477 is no assumption about the order of objects in the array.
  5478 
  5479 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  5480 
  5481 @param anEntry    The object pointer to be found.
  5482 @param anIdentity A package encapsulating the function which determines whether 
  5483                   two class T objects match.
  5484 
  5485 @return The index of the first matching object pointer within the array.
  5486 @leave  KErrNotFound, if no suitable object pointer can be found.
  5487 */
  5488 template <class T>
  5489 inline TInt RPointerArray<T>::FindL(const T* anEntry, TIdentityRelation<T> anIdentity) const
  5490 	{ return User::LeaveIfError(Find(anEntry, anIdentity));}
  5491 
  5492 
  5493 /**
  5494 Finds the last object pointer in the array which matches the specified object 
  5495 pointer, using a sequential search.
  5496 
  5497 Matching is based on the comparison of pointers.
  5498 
  5499 The find operation always starts at the high index end of the array. There 
  5500 is no assumption about the order of objects in the array.
  5501 
  5502 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  5503 
  5504 @param anEntry The object pointer to be found.
  5505 @return The index of the last matching object pointer within the array.
  5506 @leave KErrNotFound, if no matching object pointer can be found.
  5507 */
  5508 template <class T>
  5509 inline TInt RPointerArray<T>::FindReverseL(const T* anEntry) const
  5510 	{ return User::LeaveIfError(FindReverse(anEntry));}
  5511 
  5512 
  5513 /**
  5514 Finds the last object pointer in the array whose object matches the specified 
  5515 object, using a sequential search and a matching algorithm.
  5516 
  5517 The algorithm for determining whether two class T objects match is provided 
  5518 by a function supplied by the caller.
  5519 
  5520 The find operation always starts at the high index end of the array. There 
  5521 is no assumption about the order of objects in the array.
  5522 
  5523 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  5524 
  5525 @param anEntry    The object pointer to be found.
  5526 @param anIdentity A package encapsulating the function which determines whether 
  5527                   two class T objects match.
  5528 
  5529 @return The index of the last matching object pointer within the array.
  5530 @leave  KErrNotFound, if no suitable object pointer can be found.
  5531 */
  5532 template <class T>
  5533 inline TInt RPointerArray<T>::FindReverseL(const T* anEntry, TIdentityRelation<T> anIdentity) const
  5534 	{ return User::LeaveIfError(FindReverse(anEntry, anIdentity));}
  5535 
  5536 
  5537 /**
  5538 Finds the object pointer in the array that matches the specified object
  5539 pointer, using a binary search technique.
  5540 
  5541 The function assumes that object pointers in the array are in address order.
  5542 
  5543 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  5544 
  5545 @param anEntry The object pointer to be found.
  5546 
  5547 @return The index of the matching object pointer within the array
  5548 @leave KErrNotFound, if no suitable object pointer can be found.
  5549 */
  5550 template <class T>
  5551 inline TInt RPointerArray<T>::FindInAddressOrderL(const T* anEntry) const
  5552 	{ return User::LeaveIfError(FindInAddressOrder(anEntry));}
  5553 
  5554 
  5555 /**
  5556 Finds the object pointer in the array whose object matches the specified
  5557 object, using a binary search technique and an ordering algorithm.
  5558 
  5559 The function assumes that existing object pointers in the array are ordered 
  5560 so that the objects themselves are in object order as determined by an algorithm 
  5561 supplied by the caller and packaged as a TLinearOrder<T>.
  5562 
  5563 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  5564 
  5565 @param anEntry The object pointer to be found.
  5566 @param anOrder A package encapsulating the function which determines the order 
  5567                of two class T objects.
  5568 
  5569 @return The index of the matching object pointer within the array.
  5570 
  5571 @leave KErrNotFound, if no suitable object pointer can be found.
  5572 */
  5573 template <class T>
  5574 inline TInt RPointerArray<T>::FindInOrderL(const T* anEntry, TLinearOrder<T> anOrder) const
  5575 	{ return User::LeaveIfError(FindInOrder(anEntry, anOrder));}
  5576 
  5577 
  5578 /**
  5579 Finds the object pointer in the array that matches the specified object
  5580 pointer, using a binary search technique.
  5581 
  5582 The function assumes that object pointers in the array are in address order.
  5583 
  5584 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  5585 
  5586 @param anEntry The object pointer to be found.
  5587 @param anIndex A reference to a TInt into which the
  5588                function puts an index value: If the function does not leave,
  5589                this is the index of the matching object pointer within the
  5590                array. If the function leaves with KErrNotFound, this is the
  5591                index of the first object pointer within the array which
  5592                logically follows after anEntry.
  5593 
  5594 @leave KErrNotFound, if no suitable object pointer can be found.
  5595 */
  5596 template <class T>
  5597 inline void RPointerArray<T>::FindInAddressOrderL(const T* anEntry, TInt& anIndex) const
  5598 	{ User::LeaveIfError(FindInAddressOrder(anEntry, anIndex)); }
  5599 
  5600 
  5601 /**
  5602 Finds the object pointer in the array whose object matches the specified
  5603 object, using a binary search technique and an ordering algorithm.
  5604 
  5605 The function assumes that existing object pointers in the array are ordered 
  5606 so that the objects themselves are in object order as determined by an
  5607 algorithm supplied by the caller and packaged as a TLinearOrder<T>.
  5608 
  5609 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  5610 
  5611 @param anEntry The object pointer to be found.
  5612 @param anIndex A TInt supplied by the caller. On return, contains an
  5613                index value:
  5614                If the function does not leave, this is the index of the
  5615                matching object pointer within the array. 
  5616                If the function leaves with KErrNotFound, this is the index of
  5617                the first object pointer in the array whose object is bigger
  5618                than the entry being searched for - if no objects pointed to in
  5619                the array are bigger, then the index value is the same as the
  5620                total number of object pointers in the array.
  5621 
  5622 @param anOrder A package encapsulating the function which determines the order 
  5623                of two class T objects.
  5624 
  5625 @leave         KErrNotFound, if no suitable object pointer can be found.
  5626 */
  5627 template <class T>
  5628 inline void RPointerArray<T>::FindInOrderL(const T* anEntry, TInt& anIndex, TLinearOrder<T> anOrder) const
  5629 	{ User::LeaveIfError(FindInOrder(anEntry, anIndex, anOrder)); }
  5630 
  5631 
  5632 /**
  5633 Finds the object pointer in the array that matches the specified object
  5634 pointer, using a binary search technique.
  5635 
  5636 Where there is more than one matching element, it finds the first, the last
  5637 or any matching element as specified by the value of aMode.
  5638 
  5639 The function assumes that object pointers in the array are in address order.
  5640 
  5641 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  5642 
  5643 @param	anEntry The object pointer to be found.
  5644 @param	aMode   Specifies whether to find the first match, the last match or
  5645                 any match, as defined by one of the TArrayFindMode enum values.
  5646 
  5647 @return If there is a matching element, the array index of a matching element -  what
  5648         the index refers to depends on the value of aMode:
  5649         if this is EArrayFindMode_First, then the index refers to the first matching element;
  5650         if this is EArrayFindMode_Any, then the index can refer to any of the matching elements;
  5651         if this is EArrayFindMode_Last, then the index refers to first element that follows the
  5652         last matching element - if the last matching element is also the last element of the array,
  5653         then the index value is the same as the total number of elements in the array.
  5654         
  5655 @leave  KErrNotFound if no matching entry exists.
  5656 
  5657 @see TArrayFindMode
  5658 */
  5659 template <class T>
  5660 inline TInt RPointerArray<T>::SpecificFindInAddressOrderL(const T* anEntry, TInt aMode) const
  5661 	{ return User::LeaveIfError(SpecificFindInAddressOrder(anEntry, aMode));}
  5662 
  5663 
  5664 /**
  5665 Finds the object pointer in the array whose object matches the specified
  5666 object, using a binary search technique and an ordering algorithm.
  5667 
  5668 In the case that there is more than one matching element finds the first, last
  5669 or any match as specified by the value of aMode.
  5670 
  5671 The function assumes that existing object pointers in the array are ordered 
  5672 so that the objects themselves are in object order as determined by an algorithm 
  5673 supplied by the caller and packaged as a TLinearOrder<T> type.
  5674 
  5675 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  5676 
  5677 @param anEntry The object pointer to be found.
  5678 @param anOrder A package encapsulating the function which determines the order 
  5679                of two class T objects.
  5680 @param	aMode  Specifies whether to find the first match, the last match or any match,
  5681                as defined by one of the TArrayFindMode enum values.
  5682 
  5683 @return If there is a matching element, the array index of a matching
  5684         element -  what the index refers to depends on the value of aMode:
  5685         if this is EArrayFindMode_First, then the index refers to the first matching element;
  5686         if this is EArrayFindMode_Any, then the index can refer to any of the matching elements;
  5687         if this is EArrayFindMode_Last, then the index refers to first element that follows
  5688         the last matching element - if the last matching element is also the last element of the array, then
  5689         the index value is the same as the total number of elements in the array.
  5690 
  5691 @leave  KErrNotFound if no matching entry exists.
  5692 
  5693 @see TArrayFindMode
  5694 */
  5695 template <class T>
  5696 inline TInt RPointerArray<T>::SpecificFindInOrderL(const T* anEntry, TLinearOrder<T> anOrder, TInt aMode) const
  5697 	{ return User::LeaveIfError(SpecificFindInOrder(anEntry, anOrder, aMode));}
  5698 
  5699 
  5700 /**
  5701 Finds the object pointer in the array that matches the specified object
  5702 pointer, using a binary search technique.
  5703 
  5704 Where there is more than one matching element, it finds the first, the last or
  5705 any matching element as specified by the value of aMode.
  5706 
  5707 The function assumes that object pointers in the array are in address order.
  5708 
  5709 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  5710 
  5711 @param anEntry The object pointer to be found.
  5712 @param anIndex A TInt type supplied by the caller. On return, it contains an index
  5713                value depending on whether a match is found and on the value of aMode.
  5714                If there is no matching element in the array, then this is the  index
  5715                of the first element in the array that is bigger than the element being
  5716                searched for - if no elements in the array are bigger, then the index
  5717                value is the same as the total number of elements in the array.
  5718                If there is a matching element, then what the index refers to depends
  5719                on the value of aMode:
  5720                if this is EArrayFindMode_First, then the index refers to the first matching element;
  5721                if this is EArrayFindMode_Any, then the index can refer to any of the matching elements;
  5722                if this is EArrayFindMode_Last, then the index refers to first element that follows
  5723                the last matching element - if the last matching element is also the last element
  5724                of the array, then the index value is the same as the total number of elements in the array.
  5725                
  5726 @param	aMode  Specifies whether to find the first match, the last match or any match, as defined by
  5727                one of the TArrayFindMode enum values.
  5728 
  5729 @leave  KErrNotFound, if no suitable object pointer can be found.
  5730 
  5731 @see TArrayFindMode
  5732 */
  5733 template <class T>
  5734 inline void RPointerArray<T>::SpecificFindInAddressOrderL(const T* anEntry, TInt& anIndex, TInt aMode) const
  5735 	{ User::LeaveIfError(SpecificFindInAddressOrder(anEntry, anIndex, aMode)); }
  5736 
  5737 
  5738 /**
  5739 Finds the object pointer in the array whose object matches the specified
  5740 object, using a binary search technique and an ordering algorithm.
  5741 
  5742 Where there is more than one matching element, it finds the first, the last or any
  5743 matching element as specified by the value of aMode.
  5744 
  5745 The function assumes that existing object pointers in the array are ordered 
  5746 so that the objects themselves are in object order as determined by an
  5747 algorithm supplied by the caller and packaged as a TLinearOrder<T>.
  5748 
  5749 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  5750 
  5751 @param anEntry The object pointer to be found.
  5752 @param anIndex A TInt type supplied by the caller. On return, it contains an index
  5753                value depending on whether a match is found and on the value of aMode.
  5754                If there is no matching element in the array, then this is
  5755                the index of the first element in the array that is bigger than
  5756                the element being searched for - if no elements in the array are bigger,
  5757                then the index value is the same as the total number of elements in the array.
  5758                If there is a matching element, then what the index refers to depends
  5759                on the value of aMode:
  5760                if this is EArrayFindMode_First, then the index refers to the first matching element;
  5761                if this is EArrayFindMode_Any, then the index can refer to any of the matching elements;
  5762                if this is EArrayFindMode_Last, then the index refers to first element that follows
  5763                the last matching element - if the last matching element is also the last element of
  5764                the array, then the index value is the same as the total number of elements in the array.
  5765 
  5766 @param anOrder A package encapsulating the function which determines the order 
  5767                of two class T objects.
  5768 @param	aMode  Specifies whether to find the first match, the last match or any match, as defined by
  5769                one of the TArrayFindModeenum values.
  5770 
  5771 @leave  KErrNotFound, if no suitable object pointer can be found.
  5772 
  5773 @see TArrayFindMode
  5774 */
  5775 template <class T>
  5776 inline void RPointerArray<T>::SpecificFindInOrderL(const T* anEntry, TInt& anIndex, TLinearOrder<T> anOrder, TInt aMode) const
  5777 	{ User::LeaveIfError(SpecificFindInOrder(anEntry, anIndex, anOrder, aMode)); }
  5778 
  5779 
  5780 /**
  5781 Inserts an object pointer into the array in address order.
  5782 
  5783 No duplicate entries are permitted.
  5784 The function assumes that existing object pointers within the array are in 
  5785 address order.
  5786 
  5787 The function leaves with one of the system wide error codes, if the operation fails.
  5788 
  5789 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  5790 
  5791 @param anEntry The object pointer to be inserted.
  5792 */
  5793 template <class T>
  5794 inline void RPointerArray<T>::InsertInAddressOrderL(const T* anEntry)
  5795 	{ User::LeaveIfError(InsertInAddressOrder(anEntry)); }
  5796 
  5797 
  5798 /**
  5799 Inserts an object pointer into the array so that the object itself is in object 
  5800 order.
  5801 
  5802 The algorithm for determining the order of two class T objects is provided 
  5803 by a function supplied by the caller.
  5804 
  5805 No duplicate entries are permitted.
  5806 
  5807 The function assumes that the array is ordered so that the referenced objects 
  5808 are in object order.
  5809 
  5810 The function leaves with one of the system wide error codes, if the operation fails.
  5811 
  5812 Note that the array remains unchanged following an attempt to insert a duplicate
  5813 entry.
  5814 
  5815 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  5816 
  5817 @param anEntry The object pointer to be inserted.
  5818 @param anOrder A package encapsulating the function which determines the order 
  5819                of two class T objects.
  5820 */
  5821 template <class T>
  5822 inline void RPointerArray<T>::InsertInOrderL(const T* anEntry, TLinearOrder<T> anOrder)
  5823 	{ User::LeaveIfError(InsertInOrder(anEntry, anOrder)); }
  5824 
  5825 
  5826 /**
  5827 Inserts an object pointer into the array in address order, allowing duplicates.
  5828 
  5829 If the new object pointer is a duplicate of an existing object pointer in 
  5830 the array, then the new pointer is inserted after the existing one. If more 
  5831 than one duplicate object pointer already exists in the array, then any new 
  5832 duplicate pointer is inserted after the last one.
  5833 
  5834 The function assumes that existing object pointers within the array are in 
  5835 address order.
  5836 
  5837 The function leaves with one of the system wide error codes, if the operation fails.
  5838 
  5839 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  5840 
  5841 @param anEntry The object pointer to be inserted.
  5842 */
  5843 template <class T>
  5844 inline void RPointerArray<T>::InsertInAddressOrderAllowRepeatsL(const T* anEntry)
  5845 	{ User::LeaveIfError(InsertInAddressOrderAllowRepeats(anEntry)); }
  5846 
  5847 
  5848 /**
  5849 Inserts an object pointer into the array so that the object itself is in object 
  5850 order, allowing duplicates
  5851 
  5852 The algorithm for determining the order of two class T objects is provided 
  5853 by a function supplied by the caller.
  5854 
  5855 If the specified object is a duplicate of an existing object, then the new 
  5856 pointer is inserted after the pointer to the existing object. If more than 
  5857 one duplicate object already exists, then the new pointer is inserted after 
  5858 the pointer to the last one.
  5859 
  5860 The function leaves with one of the system wide error codes, if the operation fails.
  5861 
  5862 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  5863 
  5864 @param anEntry The object pointer to be inserted. 
  5865 @param anOrder A package encapsulating the function which determines the order 
  5866                of two class T objects.
  5867 */
  5868 template <class T>
  5869 inline void RPointerArray<T>::InsertInOrderAllowRepeatsL(const T* anEntry, TLinearOrder<T> anOrder)
  5870 	{ User::LeaveIfError(InsertInOrderAllowRepeats(anEntry, anOrder)); }
  5871 
  5872 
  5873 
  5874 /**
  5875 Reserves space for the specified number of elements.
  5876 
  5877 After a call to this function, the memory allocated to the array is sufficient 
  5878 to hold the number of object pointers specified. Adding new object pointers to the array 
  5879 does not result in a re-allocation of memory until the the total number of 
  5880 pointers exceeds the specified count.
  5881 
  5882 @param	aCount	The number of object pointers for which space should be reserved
  5883 @leave KErrNoMemory	If the requested amount of memory could not be allocated
  5884 */
  5885 template <class T>
  5886 inline void RPointerArray<T>::ReserveL(TInt aCount)
  5887 	{ User::LeaveIfError(RPointerArrayBase::DoReserve(aCount)); }
  5888 
  5889 
  5890 
  5891 // Specialization for RPointerArray<TAny>
  5892 
  5893 /**
  5894 Appends an pointer onto the array.
  5895 
  5896 The function leaves with one of the system wide error codes, if the operation fails.
  5897 
  5898 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  5899 
  5900 @param anEntry The pointer to be appended.
  5901 */
  5902 inline void RPointerArray<TAny>::AppendL(const TAny* anEntry)
  5903 	{ User::LeaveIfError(Append(anEntry));}
  5904 
  5905 
  5906 /**
  5907 Inserts an pointer into the array at the specified position.
  5908 
  5909 The function leaves with one of the system wide error codes, if
  5910 the operation fails.
  5911 
  5912 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  5913 
  5914 @param anEntry The pointer to be inserted.
  5915 @param aPos    The position within the array where the pointer is to be 
  5916                inserted. The position is relative to zero, i.e. zero implies
  5917 			   that a pointer is inserted at the beginning of the array.
  5918 
  5919 @panic USER 131, if aPos is negative, or is greater than the number of object
  5920        pointers currently in the array.
  5921 */
  5922 inline void RPointerArray<TAny>::InsertL(const TAny* anEntry, TInt aPos)
  5923 	{ User::LeaveIfError(Insert(anEntry,aPos)); }
  5924 
  5925 
  5926 /**
  5927 Finds the first pointer in the array which matches the specified pointer, using
  5928 a sequential search.
  5929 
  5930 Matching is based on the comparison of pointers.
  5931 
  5932 The find operation always starts at the low index end of the array. There 
  5933 is no assumption about the order of objects in the array.
  5934 
  5935 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  5936 
  5937 @param anEntry The pointer to be found.
  5938 @return The index of the first matching pointer within the array.
  5939 @leave KErrNotFound, if no matching pointer can be found.
  5940 */
  5941 inline TInt RPointerArray<TAny>::FindL(const TAny* anEntry) const
  5942 	{ return User::LeaveIfError(Find(anEntry));}
  5943 
  5944 
  5945 /**
  5946 Finds the last pointer in the array which matches the specified pointer, using
  5947 a sequential search.
  5948 
  5949 Matching is based on the comparison of pointers.
  5950 
  5951 The find operation always starts at the high index end of the array. There 
  5952 is no assumption about the order of objects in the array.
  5953 
  5954 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  5955 
  5956 @param anEntry The pointer to be found.
  5957 @return The index of the last matching pointer within the array.
  5958 @leave KErrNotFound, if no matching pointer can be found.
  5959 */
  5960 inline TInt RPointerArray<TAny>::FindReverseL(const TAny* anEntry) const
  5961 	{ return User::LeaveIfError(FindReverse(anEntry));}
  5962 
  5963 
  5964 /**
  5965 Finds the pointer in the array that matches the specified pointer, using a
  5966 binary search technique.
  5967 
  5968 The function assumes that pointers in the array are in address order.
  5969 
  5970 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  5971 
  5972 @param anEntry The pointer to be found.
  5973 
  5974 @return The index of the matching pointer within the array
  5975 @leave KErrNotFound, if no suitable pointer can be found.
  5976 */
  5977 inline TInt RPointerArray<TAny>::FindInAddressOrderL(const TAny* anEntry) const
  5978 	{ return User::LeaveIfError(FindInAddressOrder(anEntry));}
  5979 
  5980 
  5981 /**
  5982 Finds the pointer in the array that matches the specified pointer, using a
  5983 binary search technique.
  5984 
  5985 The function assumes that pointers in the array are in address order.
  5986 
  5987 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  5988 
  5989 @param anEntry The pointer to be found.
  5990 @param anIndex A reference to a TInt into which the
  5991                function puts an index value: If the function does not leave,
  5992 			   this is the index of the matching pointer within the array. If the
  5993 			   function leaves with KErrNotFound, this is the index of the last
  5994 			   pointer within the array which logically precedes
  5995 			   anEntry.
  5996 
  5997 @leave KErrNotFound, if no suitable pointer can be found.
  5998 */
  5999 inline void RPointerArray<TAny>::FindInAddressOrderL(const TAny* anEntry, TInt& anIndex) const
  6000 	{ User::LeaveIfError(FindInAddressOrder(anEntry, anIndex)); }
  6001 
  6002 
  6003 /**
  6004 Finds the pointer in the array that matches the specified pointer, using a
  6005 binary search technique.
  6006 
  6007 Where there is more than one matching element, it finds the first, the last
  6008 or any matching element as specified by the value of aMode.
  6009 
  6010 The function assumes that pointers in the array are in address order.
  6011 
  6012 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  6013 
  6014 @param	anEntry The pointer to be found.
  6015 @param	aMode   Specifies whether to find the first match, the last match or
  6016                 any match, as defined by one of the TArrayFindMode enum values.
  6017 
  6018 @return If there is a matching element, the array index of a matching element -  what
  6019         the index refers to depends on the value of aMode:
  6020         if this is EArrayFindMode_First, then the index refers to the first matching element;
  6021         if this is EArrayFindMode_Any, then the index can refer to any of the matching elements;
  6022         if this is EArrayFindMode_Last, then the index refers to first element that follows the
  6023         last matching element - if the last matching element is also the last element of the array,
  6024         then the index value is the same as the total number of elements in the array.
  6025         
  6026 @leave  KErrNotFound if no matching entry exists.
  6027 
  6028 @see TArrayFindMode
  6029 */
  6030 inline TInt RPointerArray<TAny>::SpecificFindInAddressOrderL(const TAny* anEntry, TInt aMode) const
  6031 	{ return User::LeaveIfError(SpecificFindInAddressOrder(anEntry, aMode));}
  6032 
  6033 
  6034 /**
  6035 Finds the pointer in the array that matches the specified pointer, using a
  6036 binary search technique.
  6037 
  6038 Where there is more than one matching element, it finds the first, the last or
  6039 any matching element as specified by the value of aMode.
  6040 
  6041 The function assumes that pointers in the array are in address order.
  6042 
  6043 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  6044 
  6045 @param anEntry The pointer to be found.
  6046 @param anIndex A TInt type supplied by the caller. On return, it contains an index
  6047                value depending on whether a match is found and on the value of aMode.
  6048                If there is no matching element in the array, then this is the  index
  6049                of the first element in the array that is bigger than the element being
  6050                searched for - if no elements in the array are bigger, then the index
  6051                value is the same as the total number of elements in the array.
  6052                If there is a matching element, then what the index refers to depends
  6053                on the value of aMode:
  6054                if this is EArrayFindMode_First, then the index refers to the first matching element;
  6055                if this is EArrayFindMode_Any, then the index can refer to any of the matching elements;
  6056                if this is EArrayFindMode_Last, then the index refers to first element that follows
  6057                the last matching element - if the last matching element is also the last element
  6058                of the array, then the index value is the same as the total number of elements in the array.
  6059                
  6060 @param	aMode  Specifies whether to find the first match, the last match or any match, as defined by
  6061                one of the TArrayFindMode enum values.
  6062 
  6063 @leave  KErrNotFound, if no suitable pointer can be found.
  6064 
  6065 @see TArrayFindMode
  6066 */
  6067 inline void RPointerArray<TAny>::SpecificFindInAddressOrderL(const TAny* anEntry, TInt& anIndex, TInt aMode) const
  6068 	{ User::LeaveIfError(SpecificFindInAddressOrder(anEntry, anIndex, aMode)); }
  6069 
  6070 
  6071 /**
  6072 Inserts an pointer into the array in address order.
  6073 
  6074 No duplicate entries are permitted.  The function assumes that existing pointers
  6075 within the array are in address order.
  6076 
  6077 The function leaves with one of the system wide error codes, if the operation fails.
  6078 
  6079 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  6080 
  6081 @param anEntry The pointer to be inserted.
  6082 */
  6083 inline void RPointerArray<TAny>::InsertInAddressOrderL(const TAny* anEntry)
  6084 	{ User::LeaveIfError(InsertInAddressOrder(anEntry)); }
  6085 
  6086 
  6087 /**
  6088 Inserts an pointer into the array in address order, allowing duplicates.
  6089 
  6090 If the new pointer is a duplicate of an existing pointer in the array, then the
  6091 new pointer is inserted after the existing one. If more than one duplicate
  6092 pointer already exists in the array, then any new duplicate pointer is inserted
  6093 after the last one.
  6094 
  6095 The function assumes that existing pointers within the array are in address
  6096 order.
  6097 
  6098 The function leaves with one of the system wide error codes, if the operation fails.
  6099 
  6100 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  6101 
  6102 @param anEntry The pointer to be inserted.
  6103 */
  6104 inline void RPointerArray<TAny>::InsertInAddressOrderAllowRepeatsL(const TAny* anEntry)
  6105 	{ User::LeaveIfError(InsertInAddressOrderAllowRepeats(anEntry)); }
  6106 
  6107 
  6108 /**
  6109 Apends an object onto the array.
  6110 
  6111 The function leaves with one of the system wide error codes, if the operation fails.
  6112 
  6113 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  6114 
  6115 @param anEntry    A reference to the object of type class T to be appended.
  6116 */
  6117 template <class T>
  6118 inline void RArray<T>::AppendL(const T& anEntry)
  6119 	{ User::LeaveIfError(Append(anEntry));}
  6120 
  6121 
  6122 /**
  6123 Inserts an object into the array at a specified position.
  6124 
  6125 The function leaves with one of the system wide error codes, if the operation fails.
  6126 
  6127 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  6128 
  6129 @param anEntry The class T object to be inserted.
  6130 @param aPos    The position within the array where the object is to
  6131                be inserted. The position is relative to zero, i.e. zero
  6132 			   implies that an object is inserted at the beginning of
  6133 			   the array.
  6134 			   
  6135 @panic USER 131, if aPos is negative or is greater than the number of objects
  6136        currently in the array.
  6137 */
  6138 template <class T>
  6139 inline void RArray<T>::InsertL(const T& anEntry, TInt aPos)
  6140 	{ User::LeaveIfError(Insert(anEntry, aPos));}
  6141 
  6142 
  6143 /**
  6144 Finds the first object in the array which matches the specified object using 
  6145 a sequential search.
  6146 
  6147 Matching is based on the comparison of a TInt value at the key offset position 
  6148 within the objects.
  6149 
  6150 The find operation always starts at the low index end of the array. There 
  6151 is no assumption about the order of objects in the array.
  6152 
  6153 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  6154 
  6155 @param anEntry A reference to an object of type class T to be used for matching.
  6156 
  6157 @return The index of the first matching object within the array. 
  6158 @leave  KErrNotFound, if no matching object can be found.
  6159 */
  6160 template <class T>
  6161 inline TInt RArray<T>::FindL(const T& anEntry) const
  6162 	{ return User::LeaveIfError(Find(anEntry));}
  6163 
  6164 
  6165 /**
  6166 Finds the first object in the array which matches the specified object using 
  6167 a sequential search and a matching algorithm.
  6168 
  6169 The algorithm for determining whether two class T type objects match is provided 
  6170 by a function supplied by the caller.
  6171 
  6172 The find operation always starts at the low index end of the array. There 
  6173 is no assumption about the order of objects in the array.
  6174 
  6175 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  6176 
  6177 @param anEntry    A reference to an object of type class T to be used
  6178                   for matching.
  6179 @param anIdentity A package encapsulating the function which determines whether 
  6180                   two class T type objects match.
  6181 
  6182 @return The index of the first matching object within the array.
  6183 @leave  KErrNotFound, if no matching object can be found.
  6184 */
  6185 template <class T>
  6186 inline TInt RArray<T>::FindL(const T& anEntry, TIdentityRelation<T> anIdentity) const
  6187 	{ return User::LeaveIfError(Find(anEntry, anIdentity));}
  6188 
  6189 
  6190 /**
  6191 Finds the last object in the array which matches the specified object using 
  6192 a sequential search.
  6193 
  6194 Matching is based on the comparison of a TInt value at the key offset position 
  6195 within the objects.
  6196 
  6197 The find operation always starts at the high index end of the array. There 
  6198 is no assumption about the order of objects in the array.
  6199 
  6200 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  6201 
  6202 @param anEntry A reference to an object of type class T to be used for matching.
  6203 
  6204 @return The index of the last matching object within the array. 
  6205 @leave  KErrNotFound, if no matching object can be found.
  6206 */
  6207 template <class T>
  6208 inline TInt RArray<T>::FindReverseL(const T& anEntry) const
  6209 	{ return User::LeaveIfError(FindReverse(anEntry));}
  6210 
  6211 
  6212 /**
  6213 Finds the last object in the array which matches the specified object using 
  6214 a sequential search and a matching algorithm.
  6215 
  6216 The algorithm for determining whether two class T type objects match is provided 
  6217 by a function supplied by the caller.
  6218 
  6219 The find operation always starts at the high index end of the array. There 
  6220 is no assumption about the order of objects in the array.
  6221 
  6222 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  6223 
  6224 @param anEntry    A reference to an object of type class T to be used
  6225                   for matching.
  6226 @param anIdentity A package encapsulating the function which determines whether 
  6227                   two class T type objects match.
  6228 
  6229 @return The index of the last matching object within the array.
  6230 @leave  KErrNotFound, if no matching object can be found.
  6231 */
  6232 template <class T>
  6233 inline TInt RArray<T>::FindReverseL(const T& anEntry, TIdentityRelation<T> anIdentity) const
  6234 	{ return User::LeaveIfError(FindReverse(anEntry, anIdentity));}
  6235 
  6236 
  6237 /**
  6238 Finds the object in the array which matches the specified object using a binary 
  6239 search technique.
  6240 
  6241 The function assumes that existing objects within the array are in signed 
  6242 key order.
  6243 
  6244 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  6245 
  6246 @param anEntry A reference to an object of type class T to be used for matching.
  6247 
  6248 @return The index of the matching object within the array.
  6249 @leave  KErrNotFound, if no matching object can be found.
  6250 */
  6251 template <class T>
  6252 inline TInt RArray<T>::FindInSignedKeyOrderL(const T& anEntry) const
  6253 	{ return User::LeaveIfError(FindInSignedKeyOrder(anEntry));}
  6254 
  6255 
  6256 /**
  6257 Finds the object in the array which matches the specified object using a binary 
  6258 search technique.
  6259 
  6260 The function assumes that existing objects within the array are in unsigned 
  6261 key order.
  6262 
  6263 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  6264 
  6265 @param anEntry A reference to an object of type class T to be used for matching.
  6266 
  6267 @return The index of the matching object within the array.
  6268 @leave  KErrNotFound, if no matching object can be found.
  6269 */
  6270 template <class T>
  6271 inline TInt RArray<T>::FindInUnsignedKeyOrderL(const T& anEntry) const
  6272 	{ return User::LeaveIfError(FindInUnsignedKeyOrder(anEntry));}
  6273 
  6274 
  6275 /**
  6276 Finds the object in the array which matches the specified object using a binary 
  6277 search technique and an ordering algorithm.
  6278 
  6279 The function assumes that existing objects within the array are in object 
  6280 order as determined by an algorithm supplied by the caller and packaged as 
  6281 a TLinearOrder<T>.
  6282 
  6283 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  6284 
  6285 @param anEntry A reference to an object of type class T to be used for matching.
  6286 @param anOrder A package encapsulating the function which determines the order 
  6287                of two class T objects.
  6288 
  6289 @return The index of the matching object within the array.
  6290 @leave  KErrNotFound if no matching object can be found.
  6291 */
  6292 template <class T>
  6293 inline TInt RArray<T>::FindInOrderL(const T& anEntry, TLinearOrder<T> anOrder) const
  6294 { return User::LeaveIfError(FindInOrder(anEntry, anOrder));}
  6295 
  6296 
  6297 /**
  6298 Finds the object in the array which matches the specified object using a binary 
  6299 search technique.
  6300 
  6301 The function assumes that existing objects within the array are in signed 
  6302 key order.
  6303 
  6304 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  6305 
  6306 @param anEntry A reference to an object of type class T to be used for matching.
  6307 @param anIndex On return contains an index value of the matching object within the array.
  6308                If the function leaves with KErrNotFound,this is the index of the
  6309                first element in the array whose key is bigger than the key of the
  6310                element being sought. If there are no elements in the array with
  6311                a bigger key, then the index value is the same as the total 
  6312                number of elements in the array.
  6313 @leave KErrNotFound, if no matching object can be found.
  6314 */
  6315 template <class T>
  6316 inline void RArray<T>::FindInSignedKeyOrderL(const T& anEntry, TInt& anIndex) const
  6317 	{ User::LeaveIfError(FindInSignedKeyOrder(anEntry, anIndex));}
  6318 
  6319 
  6320 /**
  6321 Finds the object in the array which matches the specified object using a binary 
  6322 search technique.
  6323 
  6324 The function assumes that existing objects within the array are in unsigned 
  6325 key order.
  6326 
  6327 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  6328 
  6329 @param anEntry A reference to an object of type class T to be used for matching.
  6330 @param anIndex On return contains an index value of the matching object within the array. 
  6331                If the function leaves with KErrNotFound,  this is the index of the
  6332                first element in the array whose key is bigger than the key of the
  6333                element being sought. If there are no elements in the array with
  6334                a bigger key, then the index value is the same as the total 
  6335                number of elements in the array.
  6336 @leave  KErrNotFound, if no matching object can be found.
  6337 */
  6338 template <class T>
  6339 inline void RArray<T>::FindInUnsignedKeyOrderL(const T& anEntry, TInt& anIndex) const
  6340 	{ User::LeaveIfError(FindInUnsignedKeyOrder(anEntry, anIndex));}
  6341 
  6342 
  6343 /**
  6344 Finds the object in the array which matches the specified object using a binary 
  6345 search technique and an ordering algorithm.
  6346 
  6347 The function assumes that existing objects within the array are in object 
  6348 order as determined by an algorithm supplied by the caller and packaged as 
  6349 a TLinearOrder<T>.
  6350 
  6351 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  6352 
  6353 @param anEntry A reference to an object of type class T to be used for matching.
  6354 @param anIndex On return contains the index value of the matching object within the array
  6355                If the function leaves with KErrNotFound, this is the index of
  6356                the first element in the array that is bigger than the element
  6357                being searched for - if no elements in the array are bigger,
  6358                then the index value is the same as the total number of elements
  6359                in the array.
  6360 @param anOrder A package encapsulating the function which determines the order 
  6361                of two class T objects.
  6362 
  6363 @leave  KErrNotFound if no matching object can be found.
  6364 */
  6365 template <class T>
  6366 inline void RArray<T>::FindInOrderL(const T& anEntry, TInt& anIndex, TLinearOrder<T> anOrder) const
  6367 	{ User::LeaveIfError(FindInOrder(anEntry, anIndex, anOrder));}
  6368 
  6369 
  6370 /**
  6371 Finds the object in the array which matches the specified object using a binary 
  6372 search technique.
  6373 
  6374 The element ordering is determined by a signed 32-bit word
  6375 (the key) embedded in each array element. In the case that there is more than
  6376 one matching element, finds the first, last or any match as specified.
  6377 
  6378 The function assumes that existing objects within the array are in signed 
  6379 key order.
  6380 
  6381 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  6382 
  6383 @param anEntry A reference to an object of type class T to be used for matching.
  6384 @param	aMode  Specifies whether to find the first match, the last match or
  6385                any match, as defined by one of the TArrayFindMode enum values.
  6386 
  6387 @return The array index of a matching element - what the index refers to
  6388         depends on the value of aMode:
  6389         if this is EArrayFindMode_First, then the index refers to the first matching element;
  6390         if this is EArrayFindMode_Any, then the index can refer to any of the matching elements;
  6391         if this is EArrayFindMode_Last, then the index refers to first element that follows
  6392         the last matching element - if the last matching element is also the last element of
  6393         the array, then the index value is the same as the total number of elements in the array.
  6394 @leave  KErrNotFound if no matching entry exists.
  6395 
  6396 @see TArrayFindMode
  6397 */
  6398 template <class T>
  6399 inline TInt RArray<T>::SpecificFindInSignedKeyOrderL(const T& anEntry, TInt aMode) const
  6400 { return User::LeaveIfError(SpecificFindInSignedKeyOrder(anEntry, aMode));}
  6401 
  6402 
  6403 /**
  6404 Finds the object in the array which matches the specified object using a binary 
  6405 search technique.
  6406 
  6407 The element ordering is determined by an unsigned 32-bit word
  6408 (the key) embedded in each array element. In the case that there is more than
  6409 one matching element, finds the first, last or any match as specified.
  6410 
  6411 The function assumes that existing objects within the array are in unsigned 
  6412 key order.
  6413 
  6414 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  6415 
  6416 @param anEntry A reference to an object of type class T to be used for matching.
  6417 @param	aMode  Specifies whether to find the first match, the last match or any
  6418         match, as defined by one of the TArrayFindMode enum values.
  6419 
  6420 @return The array index of a matching element -  what the index refers to
  6421         depends on the value of aMode:
  6422         if this is EArrayFindMode_First, then the index refers to the first matching element;
  6423         if this is EArrayFindMode_Any, then the index can refer to any of the matching elements;
  6424         if this is EArrayFindMode_Last, then the index refers to first element that follows
  6425         the last matching element - if the last matching element is also the last element
  6426         of the array, then the index value is the same as the total number of elements in the array.
  6427         
  6428 @leave  KErrNotFound if no matching entry exists.
  6429 
  6430 @see TArrayFindMode
  6431 */
  6432 template <class T>
  6433 inline TInt RArray<T>::SpecificFindInUnsignedKeyOrderL(const T& anEntry, TInt aMode) const
  6434 	{ return User::LeaveIfError(SpecificFindInUnsignedKeyOrder(anEntry, aMode));}
  6435 
  6436 
  6437 /**
  6438 Finds the object in the array which matches the specified object using a binary 
  6439 search technique and an ordering algorithm.
  6440 
  6441 Where there is more than one matching element, it finds the first, the last or
  6442 any matching element as specified by the value of aMode.
  6443 
  6444 The function assumes that existing objects within the array are in object 
  6445 order as determined by an algorithm supplied by the caller and packaged as 
  6446 a TLinearOrder<T> type.
  6447 
  6448 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  6449 
  6450 @param anEntry A reference to an object of type class T to be used for matching.
  6451 @param anOrder A package encapsulating the function which determines the order 
  6452                of two class T objects.
  6453 @param	aMode  Specifies whether to find the first match, the last match or any match,
  6454                as defined by one of the TArrayFindMode enum values.
  6455 
  6456 @return The array index of a matching element -  what the index refers to
  6457         depends on the value of aMode:
  6458         if this is EArrayFindMode_First, then the index refers to the first matching element;
  6459         if this is EArrayFindMode_Any, then the index can refer to any of the matching elements;
  6460         if this is EArrayFindMode_Last, then the index refers to first element that follows
  6461         the last matching element - if the last matching element is also the last element
  6462         of the array, then the index value is the same as the total number of elements in the array.
  6463         
  6464 @leave KErrNotFound if no matching entry exists.
  6465 
  6466 @see TArrayFindMode
  6467 */
  6468 template <class T>
  6469 inline TInt RArray<T>::SpecificFindInOrderL(const T& anEntry, TLinearOrder<T> anOrder, TInt aMode) const
  6470 { return User::LeaveIfError(SpecificFindInOrder(anEntry, anOrder, aMode));}
  6471 
  6472 
  6473 /**
  6474 Finds the object in the array which matches the specified object using a binary 
  6475 search technique.
  6476 
  6477 The element ordering is determined by a signed 32-bit word
  6478 (the key) embedded in each array element. In the case that there is more than
  6479 one matching element, finds the first, last or any match as specified.
  6480 
  6481 The function assumes that existing objects within the array are in signed 
  6482 key order.
  6483 
  6484 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  6485 
  6486 @param anEntry A reference to an object of type class T to be used for matching.
  6487 @param anIndex A TInt type supplied by the caller. On return, it contains an
  6488                index value depending on whether a match is found and on the
  6489                value of aMode. If there is no matching element in the array,
  6490                then this is the index of the first element in the array that
  6491                is bigger than the element being searched for - if no elements
  6492                in the array are bigger, then the index value is the same as
  6493                the total number of elements in the array.
  6494                If there is a matching element, then what the index refers to
  6495                depends on the value of aMode:
  6496                if this is EArrayFindMode_First, then the index refers to the first matching element;
  6497                if this is EArrayFindMode_Any, then the index can refer to any of the matching elements;
  6498                if this is EArrayFindMode_Last, then the index refers to first element that follows
  6499                the last matching element - if the last matching element is also the last element
  6500                of the array, then the index value is the same as the total number of elements
  6501                in the array.
  6502 @param aMode   Specifies whether to find the first match, the last match or any match,
  6503                as defined by one of the TArrayFindMode enum values.
  6504                
  6505 @leave KErrNotFound if no matching entry exists.
  6506 
  6507 @see TArrayFindMode
  6508 */
  6509 template <class T>
  6510 inline void RArray<T>::SpecificFindInSignedKeyOrderL(const T& anEntry, TInt& anIndex, TInt aMode) const
  6511 	{ User::LeaveIfError(SpecificFindInSignedKeyOrder(anEntry, anIndex, aMode));}
  6512 
  6513 
  6514 /**
  6515 Finds the object in the array which matches the specified object using a binary 
  6516 search technique.
  6517 
  6518 The element ordering is determined by an unsigned 32-bit word
  6519 (the key) embedded in each array element. In the case that there is more than
  6520 one matching element, finds the first, last or any match as specified.
  6521 
  6522 The function assumes that existing objects within the array are in unsigned 
  6523 key order.
  6524 
  6525 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  6526 
  6527 @param anEntry A reference to an object of type class T to be used for matching.
  6528 @param anIndex A TInt type supplied by the caller. On return, it contains an
  6529                index value depending on whether a match is found and on the
  6530                value of aMode. If there is no matching element in the array,
  6531                then this is the index of the first element in the array that
  6532                is bigger than the element being searched for - if no elements
  6533                in the array are bigger, then the index value is the same as
  6534                the total number of elements in the array. If there is a matching
  6535                element, then what the index refers to depends on the value of aMode:
  6536                if this is EArrayFindMode_First, then the index refers to the first matching element;
  6537                if this is EArrayFindMode_Any, then the index can refer to any of the matching elements;
  6538                if this is EArrayFindMode_Last, then the index refers to first element that follows
  6539                the last matching element - if the last matching element is also the last element
  6540                of the array, then the index value is the same as the total number of elements in the array.
  6541 @param aMode   Specifies whether to find the first match, the last match or any match,
  6542                as defined by one of the  TArrayFindMode enum values.
  6543                
  6544 @leave KErrNotFound if no matching entry exists.
  6545 
  6546 @see TArrayFindMode
  6547 */
  6548 template <class T>
  6549 inline void RArray<T>::SpecificFindInUnsignedKeyOrderL(const T& anEntry, TInt& anIndex, TInt aMode) const
  6550 	{ User::LeaveIfError(SpecificFindInUnsignedKeyOrder(anEntry, anIndex, aMode));}
  6551 
  6552 
  6553 /**
  6554 Finds the object in the array which matches the specified object using a binary 
  6555 search technique and a specified ordering algorithm.
  6556 
  6557 Where there is more than one matching element, it finds the first, the last or
  6558 any matching element as specified by the value of aMode.
  6559 
  6560 The function assumes that existing objects within the array are in object 
  6561 order as determined by an algorithm supplied by the caller and packaged as 
  6562 a TLinearOrder<T> type.
  6563 
  6564 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  6565 
  6566 @param anEntry A reference to an object of type class T to be used for matching.
  6567 @param anIndex A TInt type supplied by the caller. On return, it contains an
  6568                index value depending on whether a match is found and on the value
  6569                of aMode. If there is no matching element in the array, then this is
  6570                the  index of the first element in the array that is bigger than the
  6571                element being searched for - if no elements in the array are bigger,
  6572                then the index value is the same as the total number of elements
  6573                in the array. If there is a matching element, then what the index
  6574                refers to depends on the value of aMode:
  6575                if this is EArrayFindMode_First, then the index refers to the first matching element;
  6576                if this is EArrayFindMode_Any, then the index can refer to any of the matching elements;
  6577                if this is EArrayFindMode_Last, then the index refers to first element that follows
  6578                the last matching element - if the last matching element is also the last element
  6579                of the array, then the index value is the same as the total number of elements in the array.
  6580                
  6581 @param anOrder A package encapsulating the function which determines the order 
  6582                of two class T objects.
  6583 @param aMode   Specifies whether to find the first match, the last match or any match,
  6584                as defined by one of the TArrayFindMode enum values.
  6585                
  6586 @leave KErrNotFound if no matching entry exists.
  6587 
  6588 @see TArrayFindMode
  6589 */
  6590 template <class T>
  6591 inline void RArray<T>::SpecificFindInOrderL(const T& anEntry, TInt& anIndex, TLinearOrder<T> anOrder, TInt aMode) const
  6592 	{ User::LeaveIfError(SpecificFindInOrder(anEntry, anIndex, anOrder, aMode));}
  6593 
  6594 
  6595 /**
  6596 Inserts an object into the array in ascending signed key order.
  6597 
  6598 The order of two class T type objects is based on comparing a TInt value
  6599 located at the key offset position within the class T object.
  6600 
  6601 No duplicate entries are permitted.
  6602 
  6603 The function leaves with one of the system wide error codes, if the operation fails.
  6604 
  6605 Note that the array remains unchanged following an attempt to insert a duplicate entry.
  6606 
  6607 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  6608 
  6609 @param anEntry A reference to the object of type class T to be inserted.
  6610 */
  6611 template <class T>
  6612 inline void RArray<T>::InsertInSignedKeyOrderL(const T& anEntry)
  6613 	{ User::LeaveIfError(InsertInSignedKeyOrder(anEntry));}
  6614 
  6615 
  6616 /**
  6617 Inserts an object into the array in ascending unsigned key order, not allowing 
  6618 duplicate entries.
  6619 
  6620 The order of two class T type objects is based on comparing a TUint value 
  6621 located at the key offset position within the class T object. 
  6622 
  6623 The function leaves with one of the system wide error codes, if the operation fails.
  6624 
  6625 Note that the array remains unchanged following an attempt to insert a duplicate entry.
  6626 
  6627 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  6628 
  6629 @param anEntry A reference to the object of type class T to be inserted.
  6630 */
  6631 template <class T>
  6632 inline void RArray<T>::InsertInUnsignedKeyOrderL(const T& anEntry)
  6633 	{ User::LeaveIfError(InsertInUnsignedKeyOrder(anEntry));}
  6634 
  6635 
  6636 /**
  6637 Inserts an object of into the array in object order.
  6638 
  6639 The algorithm for determining the order of two class T type objects is provided 
  6640 by a function supplied by the caller.
  6641 
  6642 No duplicate entries are permitted.
  6643 
  6644 The function assumes that existing objects within the array are in object 
  6645 order.
  6646 
  6647 The function leaves with one of the system wide error codes, if the operation fails.
  6648 
  6649 Note that the array remains unchanged following an attempt to insert a duplicate entry.
  6650 
  6651 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  6652 
  6653 @param anEntry A reference to the object of type class T to be inserted.
  6654 @param anOrder A package encapsulating the function which determines the order 
  6655                of two class T objects.
  6656 */
  6657 template <class T>
  6658 inline void RArray<T>::InsertInOrderL(const T& anEntry, TLinearOrder<T> anOrder)
  6659 	{ User::LeaveIfError(InsertInOrder(anEntry, anOrder));}
  6660 
  6661 
  6662 /**
  6663 Inserts an object into the array in ascending signed key order,
  6664 allowing duplicates.
  6665 
  6666 The order of two class T type objects is based on comparing a TInt value
  6667 located at the key offset position within the class T object. 
  6668 
  6669 If anEntry is a duplicate of an existing object in the array, then the new 
  6670 object is inserted after the existing object. If more than one duplicate object 
  6671 already exists in the array, then any new duplicate object is inserted after 
  6672 the last one.
  6673 
  6674 The function leaves with one of the system wide error codes, if the operation fails.
  6675 
  6676 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  6677 
  6678 @param anEntry A reference to the object of type class T to be inserted.
  6679 */
  6680 template <class T>
  6681 inline void RArray<T>::InsertInSignedKeyOrderAllowRepeatsL(const T& anEntry)
  6682 	{ User::LeaveIfError(InsertInSignedKeyOrderAllowRepeats(anEntry));}
  6683 
  6684 
  6685 /**
  6686 Inserts an object into the array in ascending unsigned key order, allowing 
  6687 duplicates.
  6688 
  6689 The order of two class T type objects is based on comparing a TUint value 
  6690 located at the key offset position within the class T object. 
  6691 
  6692 If anEntry is a duplicate of an existing object in the array, then the new 
  6693 object is inserted after the existing object. If more than one duplicate object 
  6694 already exists in the array, then any new duplicate object is inserted after 
  6695 the last one.
  6696 
  6697 The function leaves with one of the system wide error codes, if the operation fails.
  6698 
  6699 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  6700 
  6701 @param anEntry A reference to the object of type class T to be inserted.
  6702 */
  6703 template <class T>
  6704 inline void RArray<T>::InsertInUnsignedKeyOrderAllowRepeatsL(const T& anEntry)
  6705 	{ User::LeaveIfError(InsertInUnsignedKeyOrderAllowRepeats(anEntry));}
  6706 
  6707 
  6708 /**
  6709 Inserts an object into the array in object order, allowing duplicates.
  6710 
  6711 The algorithm for determining the order of two class T type objects is provided 
  6712 by a function supplied by the caller.
  6713 
  6714 If anEntry is a duplicate of an existing object in the array, then the new 
  6715 object is inserted after the existing object. If more than one duplicate object 
  6716 already exists in the array, then anEntry is inserted after the last one.
  6717 
  6718 The function assumes that existing objects within the array are in object 
  6719 order.
  6720 
  6721 The function leaves with one of the system wide error codes, if the operation fails.
  6722 
  6723 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  6724 
  6725 @param anEntry A reference to the object of type class T to be inserted.
  6726 @param anOrder A package encapsulating the function which determines the order 
  6727                of two class T objects.
  6728 */
  6729 template <class T>
  6730 inline void RArray<T>::InsertInOrderAllowRepeatsL(const T& anEntry, TLinearOrder<T> anOrder)
  6731 	{ User::LeaveIfError(InsertInOrderAllowRepeats(anEntry, anOrder));}
  6732 
  6733 
  6734 
  6735 /**
  6736 Reserves space for the specified number of elements.
  6737 
  6738 After a call to this function, the memory allocated to the array is sufficient 
  6739 to hold the number of objects specified. Adding new objects to the array 
  6740 does not result in a re-allocation of memory until the the total number of 
  6741 objects exceeds the specified count.
  6742 
  6743 @param	aCount	The number of objects for which space should be reserved
  6744 @leave KErrNoMemory	If the requested amount of memory could not be allocated
  6745 */
  6746 template <class T>
  6747 inline void RArray<T>::ReserveL(TInt aCount)
  6748 	{ User::LeaveIfError(RArrayBase::DoReserve(aCount)); }
  6749 
  6750 
  6751 
  6752 
  6753 /**
  6754 Appends a signed integer onto the array.
  6755 
  6756 The function leaves with one of the system wide error codes, if the operation fails.
  6757 	
  6758 NOTE: This function is NOT AVAILABLE to code running on the kernel side.	
  6759 	
  6760 @param anEntry The signed integer to be appended.
  6761 */
  6762 inline void RArray<TInt>::AppendL(TInt anEntry)
  6763 	{ User::LeaveIfError(Append(anEntry));}
  6764 
  6765 
  6766 /**
  6767 Inserts a signed integer into the array at the specified position.
  6768 	
  6769 The function leaves with one of the system wide error codes, if the operation fails.
  6770 	
  6771 NOTE: This function is NOT AVAILABLE to code running on the kernel side.	
  6772 	
  6773 @param anEntry The signed integer to be inserted.
  6774 @param aPos    The position within the array where the signed integer is to be 
  6775 	           inserted. The position is relative to zero, i.e. zero implies
  6776 			   that an entry is inserted at the beginning of the array.
  6777 		   
  6778 @panic USER 131, if aPos is negative, or is greater than the number of entries
  6779        currently in the array.
  6780 */
  6781 inline void RArray<TInt>::InsertL(TInt anEntry, TInt aPos)
  6782 	{ User::LeaveIfError(Insert(anEntry, aPos));}
  6783 
  6784 
  6785 /**
  6786 Finds the first signed integer in the array which matches the specified signed 
  6787 integer using a sequential search.
  6788 
  6789 The find operation always starts at the low index end of the array. There 
  6790 is no assumption about the order of entries in the array.
  6791 
  6792 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  6793 	
  6794 @param anEntry The signed integer to be found.
  6795 
  6796 @return The index of the first matching signed integer within the array.
  6797 @leave  KErrNotFound, if no matching entry can be found.
  6798 */
  6799 inline TInt RArray<TInt>::FindL(TInt anEntry) const
  6800 	{ return User::LeaveIfError(Find(anEntry));}
  6801 
  6802 
  6803 /**
  6804 Finds the last signed integer in the array which matches the specified signed 
  6805 integer using a sequential search.
  6806 
  6807 The find operation always starts at the high index end of the array. There 
  6808 is no assumption about the order of entries in the array.
  6809 
  6810 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  6811 	
  6812 @param anEntry The signed integer to be found.
  6813 
  6814 @return The index of the last matching signed integer within the array.
  6815 @leave  KErrNotFound, if no matching entry can be found.
  6816 */
  6817 inline TInt RArray<TInt>::FindReverseL(TInt anEntry) const
  6818 	{ return User::LeaveIfError(FindReverse(anEntry));}
  6819 
  6820 
  6821 /**
  6822 Finds the signed integer in the array that matches the specified signed integer 
  6823 using a binary search technique.
  6824 
  6825 The function assumes that the array is in signed integer order.
  6826 	
  6827 NOTE: This function is NOT AVAILABLE to code running on the kernel side.	
  6828 	
  6829 @param anEntry The signed integer to be found.
  6830 
  6831 @return The index of the matching signed integer within the array.
  6832 @leave  KErrNotFound, if no match can be found.
  6833 */
  6834 inline TInt RArray<TInt>::FindInOrderL(TInt anEntry) const
  6835 	{ return User::LeaveIfError(FindInOrder(anEntry));}
  6836 
  6837 
  6838 /**
  6839 Finds the signed integer in the array that matches the specified signed integer
  6840 using a binary search technique.
  6841 	
  6842 The function assumes that the array is in signed integer order.
  6843 	
  6844 NOTE: This function is NOT AVAILABLE to code running on the kernel side.	
  6845 	
  6846 @param anEntry The signed integer to be found.
  6847 @param anIndex A reference to a signed integer into which the
  6848                function puts an index value: If the function returns ,
  6849                this is the index of the matching signed integer within the
  6850                array. If the function leaves with KErrNotFound, this is the
  6851                index of the first signed integer within the array that is
  6852                bigger than the signed integer being searched for - if no
  6853                signed integers within the array are bigger, then the index
  6854                value is the same as the total number of signed integers
  6855                within the array.
  6856 @leave  KErrNotFound if no  match can be found.
  6857 */
  6858 inline void RArray<TInt>::FindInOrderL(TInt anEntry, TInt& anIndex) const
  6859 	{ User::LeaveIfError(FindInOrder(anEntry, anIndex));}
  6860 
  6861 
  6862 /**
  6863 Finds the signed integer in the array that matches the specified signed integer 
  6864 using a binary search technique.
  6865 
  6866 Where there is more than one matching element, it finds the first, last or any
  6867 matching element  as specified by the value of aMode.
  6868 	
  6869 The function assumes that the array is in signed integer order.
  6870 	
  6871 NOTE: This function is NOT AVAILABLE to code running on the kernel side.	
  6872 	
  6873 @param anEntry The signed integer to be found.
  6874 @param aMode   Specifies whether to find the first match, the last match or
  6875                any match, as defined by one of the TArrayFindMode enum values.
  6876 
  6877 @return The array index of a matching element - what the index refers to
  6878         depends on the value of aMode:
  6879         if this is EArrayFindMode_First, then the index refers to the first matching element;
  6880         if this is EArrayFindMode_Any, then the index can refer to any of the matching elements;
  6881         if this is EArrayFindMode_Last, then the index refers to first element that follows
  6882         the last matching element - if the last matching element is also the last element
  6883         of the array, then the index value is the same as the total number of elements in the array.
  6884         
  6885 @leave  KErrNotFound if no matching entry exists.
  6886 
  6887 @see TArrayFindMode
  6888 */
  6889 inline TInt RArray<TInt>::SpecificFindInOrderL(TInt anEntry, TInt aMode) const
  6890 	{ return User::LeaveIfError(SpecificFindInOrder(anEntry, aMode));}
  6891 
  6892 
  6893 /**
  6894 Finds the signed integer in the array that matches the specified signed integer
  6895 using a binary search technique.
  6896 
  6897 Where there is more than one matching element, it finds the first, last or any
  6898 matching element  as specified by the value of aMode.
  6899 
  6900 The function assumes that the array is in signed integer order.
  6901 
  6902 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  6903 	
  6904 @param anEntry The signed integer to be found.
  6905 @param anIndex A TInt type supplied by the caller. On return, it contains an
  6906                index value depending on whether a match is found and on the value of aMode.
  6907                If there is no matching element in the array, then this is
  6908                the  index of the first element in the array that is bigger
  6909                than the element being searched for - if no elements in the
  6910                array are bigger, then the index value is the same as the total
  6911                number of elements in the array. If there is a matching element,
  6912                then what the index refers to depends on the value of aMode:
  6913                if this is EArrayFindMode_First, then the index refers to the first matching element;
  6914                if this is EArrayFindMode_Any, then the index can refer to any of the matching elements;
  6915                if this is EArrayFindMode_Last, then the index refers to first element that follows
  6916                the last matching element - if the last matching element is also the last element
  6917                of the array, then the index value is the same as the total number of elements in the array.
  6918                
  6919 @param	aMode  Specifies whether to find the first match, the last match or any match, as defined
  6920                by one of the TArrayFindMode enum values.
  6921                
  6922 @leave KErrNotFound if no matching entry exists.
  6923 
  6924 @see TArrayFindMode
  6925 */
  6926 inline void RArray<TInt>::SpecificFindInOrderL(TInt anEntry, TInt& anIndex, TInt aMode) const
  6927 	{ User::LeaveIfError(SpecificFindInOrder(anEntry, anIndex, aMode));}
  6928 
  6929 
  6930 /**
  6931 Inserts a signed integer into the array in signed integer order.
  6932 
  6933 No duplicate entries are permitted.
  6934 
  6935 The function assumes that existing entries within the array are in signed 
  6936 integer order.
  6937 
  6938 The function leaves with one of the system wide error codes, if the operation fails.
  6939 
  6940 Note that the array remains unchanged following an attempt to insert a duplicate entry. 
  6941 
  6942 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  6943 
  6944 @param anEntry The signed integer to be inserted.
  6945 */
  6946 inline void RArray<TInt>::InsertInOrderL(TInt anEntry)
  6947 	{ User::LeaveIfError(InsertInOrder(anEntry));}
  6948 
  6949 
  6950 /**
  6951 Inserts a signed integer into the array in signed integer order,
  6952 allowing duplicates.
  6953 
  6954 If anEntry is a duplicate of an existing entry in the array, then the new 
  6955 signed integer is inserted after the existing one. If more than one duplicate 
  6956 entry already exists in the array, then any new duplicate signed integer is 
  6957 inserted after the last one.
  6958 
  6959 The function assumes that existing entries within the array are in signed 
  6960 integer order.
  6961 
  6962 The function leaves with one of the system wide error codes, if the operation fails.
  6963 	
  6964 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  6965 	
  6966 @param anEntry The signed integer to be inserted.
  6967 */
  6968 inline void RArray<TInt>::InsertInOrderAllowRepeatsL(TInt anEntry)
  6969 	{ User::LeaveIfError(InsertInOrderAllowRepeats(anEntry));}
  6970 
  6971 
  6972 
  6973 /**
  6974 Reserves space for the specified number of elements.
  6975 
  6976 After a call to this function, the memory allocated to the array is sufficient 
  6977 to hold the number of integers specified. Adding new integers to the array 
  6978 does not result in a re-allocation of memory until the the total number of 
  6979 integers exceeds the specified count.
  6980 
  6981 @param	aCount	The number of integers for which space should be reserved
  6982 @leave KErrNoMemory	If the requested amount of memory could not be allocated
  6983 */
  6984 inline void RArray<TInt>::ReserveL(TInt aCount)
  6985 	{ User::LeaveIfError(RPointerArrayBase::DoReserve(aCount)); }
  6986 
  6987 
  6988 
  6989 
  6990 /**
  6991 Appends an unsigned integer onto the array.
  6992 	
  6993 The function leaves with one of the system wide error codes, if the operation fails.
  6994 	
  6995 NOTE: This function is NOT AVAILABLE to code running on the kernel side.	
  6996 	
  6997 @param anEntry The unsigned integer to be appended.
  6998 */
  6999 inline void RArray<TUint>::AppendL(TUint anEntry)
  7000 	{ User::LeaveIfError(Append(anEntry));}
  7001 
  7002 
  7003 /**
  7004 Inserts an unsigned integer into the array at the specified position.
  7005 	
  7006 The function leaves with one of the system wide error codes, if the operation fails.
  7007 	
  7008 NOTE: This function is NOT AVAILABLE to code running on the kernel side.	
  7009 	
  7010 @param anEntry  The unsigned integer to be inserted.
  7011 @param aPos     The position within the array where the unsigned integer is to 
  7012 	            be inserted. The position is relative to zero, i.e. zero
  7013 				implies that an entry is inserted at the beginning of
  7014 				the array.
  7015 			
  7016 @panic USER 131, if aPos is negative, or is greater than the number of entries
  7017        currently in the array.
  7018 */
  7019 inline void RArray<TUint>::InsertL(TUint anEntry, TInt aPos)
  7020 	{ User::LeaveIfError(Insert(anEntry, aPos));}
  7021 
  7022 
  7023 /**
  7024 Finds the first unsigned integer in the array which matches the specified
  7025 value, using a sequential search.
  7026 
  7027 The find operation always starts at the low index end of the array. There 
  7028 is no assumption about the order of entries in the array.
  7029 	
  7030 NOTE: This function is NOT AVAILABLE to code running on the kernel side.	
  7031 	
  7032 @param anEntry The unsigned integer to be found.
  7033 @return The index of the first matching unsigned integer within the array.
  7034 @leave  KErrNotFound, if no matching entry can be found.
  7035 */
  7036 inline TInt RArray<TUint>::FindL(TUint anEntry) const
  7037 	{ return User::LeaveIfError(Find(anEntry));}
  7038 
  7039 
  7040 /**
  7041 Finds the last unsigned integer in the array which matches the specified
  7042 value, using a sequential search.
  7043 
  7044 The find operation always starts at the high index end of the array. There 
  7045 is no assumption about the order of entries in the array.
  7046 	
  7047 NOTE: This function is NOT AVAILABLE to code running on the kernel side.	
  7048 	
  7049 @param anEntry The unsigned integer to be found.
  7050 @return The index of the last matching unsigned integer within the array.
  7051 @leave  KErrNotFound, if no matching entry can be found.
  7052 */
  7053 inline TInt RArray<TUint>::FindReverseL(TUint anEntry) const
  7054 	{ return User::LeaveIfError(FindReverse(anEntry));}
  7055 
  7056 
  7057 /**
  7058 Finds the unsigned integer in the array which matches the specified value, 
  7059 using a binary search technique.
  7060 	
  7061 The functions assume that existing entries within the array are in unsigned 
  7062 integer order.
  7063 
  7064 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  7065 	
  7066 @param anEntry The unsigned integer to be found.
  7067 
  7068 @return The index of the matching unsigned integer within the array;
  7069 @leave  KErrNotFound, if no matching entry can be found.
  7070 */
  7071 inline TInt RArray<TUint>::FindInOrderL(TUint anEntry) const
  7072 	{ return User::LeaveIfError(FindInOrder(anEntry));}
  7073 
  7074 
  7075 /**
  7076 Finds the unsigned integer in the array which matches the specified value, 
  7077 using a binary search technique.
  7078 
  7079 If the index cannot be found, the function returns the index of the last
  7080 unsigned integer within the array which logically precedes anEntry.
  7081 The functions assume that existing entries within the array are in unsigned 
  7082 integer order.
  7083 	
  7084 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  7085 	
  7086 @param anEntry The unsigned integer to be found.
  7087 @param anIndex A TInt supplied by the caller. On return, contains an index
  7088                value of the matching unsigned integer within the array. 
  7089                If the function leaves with KErrNotFound, this is the index of the
  7090                first unsigned integer within the array that is bigger than the
  7091                unsigned integer being searched for - if no unsigned integers within
  7092                the array are bigger, then the index value is the same as the
  7093                total number of unsigned integers within the array.
  7094 
  7095 @leave  KErrNotFound, if no matching entry can be found.
  7096 */
  7097 inline void RArray<TUint>::FindInOrderL(TUint anEntry, TInt& anIndex) const
  7098 	{ User::LeaveIfError(FindInOrder(anEntry, anIndex));}
  7099 
  7100 
  7101 /**
  7102 Finds the unsigned integer in the array that matches the specified unsigned integer 
  7103 using a binary search technique.
  7104 
  7105 In the case that there is more than one matching element, finds the first, last or any
  7106 match as specified.
  7107 	
  7108 The function assumes that the array is in unsigned integer order.
  7109 
  7110 NOTE: This function is NOT AVAILABLE to code running on the kernel side.
  7111 	
  7112 @param anEntry The unsigned integer to be found.
  7113 @param aMode   Specifies whether to find the first match, the last match or 
  7114                any match, as defined by one of the TArrayFindMode enum values.
  7115 
  7116 @return The array index of a matching element - what the index refers to depends
  7117         on the value of aMode:
  7118         if this is EArrayFindMode_First, then the index refers to the first matching element;
  7119         if this is EArrayFindMode_Any, then the index can refer to any of the matching elements;
  7120         if this is EArrayFindMode_Last, then the index refers to first element that follows
  7121         the last matching element - if the last matching element is also the last element
  7122         of the array, then the index value is the same as the total number of elements in the array.
  7123         
  7124 @leave KErrNotFound if no matching entry exists.
  7125 
  7126 @see TArrayFindMode
  7127 */
  7128 inline TInt RArray<TUint>::SpecificFindInOrderL(TUint anEntry, TInt aMode) const
  7129 	{ return User::LeaveIfError(SpecificFindInOrder(anEntry, aMode));}
  7130 
  7131 
  7132 /**
  7133 Finds the unsigned integer in the array that matches the specified unsigned integer
  7134 using a binary search technique.
  7135 
  7136 Where there is more than one matching element, it finds the first, last or
  7137 any matching element as specified by the value of aMode.
  7138 
  7139 The function assumes that the array is in unsigned integer order.
  7140 	
  7141 NOTE: This function is NOT AVAILABLE to code running on the kernel side.	
  7142 	
  7143 @param anEntry The unsigned integer to be found.
  7144 @param anIndex A TInt type supplied by the caller. On return, it contains an index
  7145                value depending on whether a match is found and on the value of aMode.
  7146                If there is no matching element in the array, then this is the
  7147                index of the first element in the array that is bigger than the element
  7148                being searched for - if no elements in the array are bigger, then
  7149                the index value is the same as the total number of elements in the array.
  7150                If there is a matching element, then what the index refers to depends on
  7151                the value of aMode:
  7152                if this is EArrayFindMode_First, then the index refers to the first matching element;
  7153                if this is EArrayFindMode_Any, then the index can refer to any of the matching elements;
  7154                if this is EArrayFindMode_Last, then the index refers to first element that follows
  7155                the last matching element - if the last matching element is also the last element of the array,
  7156                then the index value is the same as the total number of elements in the array.
  7157                
  7158 @param	aMode  Specifies whether to find the first match, the last match or any match, as defined by
  7159                one of the TArrayFindMode enum values.
  7160 @leave KErrNotFound if no matching entry exists.
  7161 
  7162 @see TArrayFindMode
  7163 */
  7164 inline void RArray<TUint>::SpecificFindInOrderL(TUint anEntry, TInt& anIndex, TInt aMode) const
  7165 	{ User::LeaveIfError(SpecificFindInOrder(anEntry, anIndex, aMode));}
  7166 
  7167 
  7168 /**
  7169 Inserts an unsigned integer into the array in unsigned integer order.
  7170 
  7171 No duplicate entries are permitted.
  7172 
  7173 The function assumes that existing entries within the array are in unsigned 
  7174 integer order.
  7175 
  7176 The function leaves with one of the system wide error codes, if the operation fails.
  7177 	
  7178 Note that the array remains unchanged following an attempt to insert a duplicate entry.
  7179 	
  7180 NOTE: This function is NOT AVAILABLE to code running on the kernel side.	
  7181 	
  7182 @param anEntry The unsigned integer to be inserted.
  7183 */
  7184 inline void RArray<TUint>::InsertInOrderL(TUint anEntry)
  7185 	{ User::LeaveIfError(InsertInOrder(anEntry));}
  7186 
  7187 
  7188 /**
  7189 Inserts an unsigned integer into the array in unsigned integer order, allowing 
  7190 duplicates.
  7191 
  7192 If the new integer is a duplicate of an existing entry in the array, then 
  7193 the new unsigned integer is inserted after the existing one. If more than 
  7194 one duplicate entry already exists in the array, then any new duplicate
  7195 unsigned integer is inserted after the last one.
  7196 	
  7197 The function assumes that existing entries within the array are in unsigned 
  7198 integer order.
  7199 
  7200 The function leaves with one of the system wide error codes, if the operation fails.
  7201 	
  7202 NOTE: This function is NOT AVAILABLE to code running on the kernel side.	
  7203 	
  7204 @param anEntry The unsigned integer to be inserted.
  7205 */
  7206 inline void RArray<TUint>::InsertInOrderAllowRepeatsL(TUint anEntry)
  7207 	{ User::LeaveIfError(InsertInOrderAllowRepeats(anEntry));}
  7208 
  7209 
  7210 
  7211 /**
  7212 Reserves space for the specified number of elements.
  7213 
  7214 After a call to this function, the memory allocated to the array is sufficient 
  7215 to hold the number of integers specified. Adding new integers to the array 
  7216 does not result in a re-allocation of memory until the the total number of 
  7217 integers exceeds the specified count.
  7218 
  7219 @param	aCount	The number of integers for which space should be reserved
  7220 @leave KErrNoMemory	If the requested amount of memory could not be allocated
  7221 */
  7222 inline void RArray<TUint>::ReserveL(TInt aCount)
  7223 	{ User::LeaveIfError(RPointerArrayBase::DoReserve(aCount)); }
  7224 
  7225 
  7226 
  7227 
  7228 /**
  7229 Sets the priority of the client's process.
  7230 
  7231 @param aPriority The priority value.
  7232 */
  7233 inline void RMessagePtr2::SetProcessPriorityL(TProcessPriority aPriority) const
  7234 	{ User::LeaveIfError(SetProcessPriority(aPriority));}
  7235 
  7236 
  7237 /**
  7238 Opens a handle on the client thread.
  7239 
  7240 @param aClient    On successful return, the handle to the client thread.
  7241 @param aOwnerType An enumeration whose enumerators define the ownership of
  7242                   the handle. If not explicitly specified,
  7243                   EOwnerProcess is taken as default.
  7244 */
  7245 inline void RMessagePtr2::ClientL(RThread& aClient, TOwnerType aOwnerType) const
  7246 	{ User::LeaveIfError(Client(aClient, aOwnerType));}
  7247 
  7248 
  7249 #ifndef __REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__
  7250 
  7251 inline TBool RMessagePtr2::HasCapability(TCapability aCapability, const char* aDiagnostic) const
  7252 	{
  7253 	return DoHasCapability(aCapability, aDiagnostic);
  7254 	}
  7255 
  7256 inline void RMessagePtr2::HasCapabilityL(TCapability aCapability, const char* aDiagnosticMessage) const
  7257 	{
  7258 	if (!HasCapability(aCapability, aDiagnosticMessage))
  7259 		{
  7260 		User::Leave(KErrPermissionDenied);
  7261 		}
  7262 	}
  7263 
  7264 inline TBool RMessagePtr2::HasCapability(TCapability aCapability1, TCapability aCapability2, const char* aDiagnostic) const
  7265 	{
  7266 	return DoHasCapability(aCapability1, aCapability2, aDiagnostic);
  7267 	}
  7268 
  7269 inline void RMessagePtr2::HasCapabilityL(TCapability aCapability1, TCapability aCapability2, const char* aDiagnosticMessage) const
  7270 	{
  7271 	if (!HasCapability(aCapability1, aCapability2, aDiagnosticMessage))
  7272 		{
  7273 		User::Leave(KErrPermissionDenied);
  7274 		}
  7275 	}
  7276 
  7277 #else //__REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__
  7278 
  7279 // Only available to NULL arguments
  7280 inline TBool RMessagePtr2::HasCapability(TCapability aCapability, OnlyCreateWithNull /*aDiagnostic*/) const
  7281 	{
  7282 	return DoHasCapability(aCapability);
  7283 	}
  7284 
  7285 inline void RMessagePtr2::HasCapabilityL(TCapability aCapability, OnlyCreateWithNull /*aDiagnosticMessage*/) const
  7286 	{
  7287 	if (!DoHasCapability(aCapability))
  7288 		{
  7289 		User::Leave(KErrPermissionDenied);
  7290 		}
  7291 	}
  7292 
  7293 inline TBool RMessagePtr2::HasCapability(TCapability aCapability1, TCapability aCapability2, OnlyCreateWithNull /*aDiagnostic*/) const
  7294 	{
  7295 	return DoHasCapability(aCapability1, aCapability2);
  7296 	}
  7297 
  7298 inline void RMessagePtr2::HasCapabilityL(TCapability aCapability1, TCapability aCapability2, OnlyCreateWithNull /*aDiagnosticMessage*/) const
  7299 	{
  7300 	if (!DoHasCapability(aCapability1, aCapability2))
  7301 		{
  7302 		User::Leave(KErrPermissionDenied);
  7303 		}
  7304 	}
  7305 
  7306 #ifndef __REMOVE_PLATSEC_DIAGNOSTICS__
  7307 // For things using KSuppressPlatSecDiagnostic
  7308 inline TBool RMessagePtr2::HasCapability(TCapability aCapability, OnlyCreateWithNull /*aDiagnostic*/, OnlyCreateWithNull /*aSuppress*/) const
  7309 	{
  7310 	return DoHasCapability(aCapability, KSuppressPlatSecDiagnosticMagicValue);
  7311 	}
  7312 
  7313 inline void RMessagePtr2::HasCapabilityL(TCapability aCapability, OnlyCreateWithNull /*aDiagnostic*/, OnlyCreateWithNull /*aSuppress*/) const
  7314 	{
  7315 	if (!DoHasCapability(aCapability, KSuppressPlatSecDiagnosticMagicValue))
  7316 		{
  7317 		User::Leave(KErrPermissionDenied);
  7318 		}
  7319 	}
  7320 
  7321 inline TBool RMessagePtr2::HasCapability(TCapability aCapability1, TCapability aCapability2, OnlyCreateWithNull /*aDiagnostic*/, OnlyCreateWithNull /*aSuppress*/) const
  7322 	{
  7323 	return DoHasCapability(aCapability1, aCapability2, KSuppressPlatSecDiagnosticMagicValue);
  7324 	}
  7325 
  7326 inline void RMessagePtr2::HasCapabilityL(TCapability aCapability1, TCapability aCapability2, OnlyCreateWithNull /*aDiagnostic*/, OnlyCreateWithNull /*aSuppress*/) const
  7327 	{
  7328 	if (!DoHasCapability(aCapability1, aCapability2, KSuppressPlatSecDiagnosticMagicValue))
  7329 		{
  7330 		User::Leave(KErrPermissionDenied);
  7331 		}
  7332 	}
  7333 #endif // !__REMOVE_PLATSEC_DIAGNOSTICS__
  7334 
  7335 #endif // !__REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__
  7336 
  7337 inline TInt RThread::RenameMe(const TDesC& aName)
  7338 	{ return User::RenameThread(aName); }
  7339 inline TInt RProcess::RenameMe(const TDesC& aName)
  7340 	{ return User::RenameProcess(aName); }
  7341 
  7342 
  7343 #endif // !__KERNEL_MODE__
  7344 
  7345 #ifdef __SUPPORT_CPP_EXCEPTIONS__
  7346 // The standard header file <exception> defines the following guard macro for EDG and CW, VC++, GCC respectively.
  7347 // The guard below is ugly. It will surely come back and bite us unless we resolve the whole issue of standard headers
  7348 // when we move to supporting Standard C++. 
  7349 #if !defined(_EXCEPTION) && !defined(_EXCEPTION_) && !defined(__EXCEPTION__)
  7350 
  7351 #if defined(__VC32__) && !defined(_CRTIMP_PURE)
  7352 
  7353 	// Declare MS EH runtime functions
  7354 	bool __uncaught_exception(void);
  7355 
  7356 #if _MSC_VER >= 1200
  7357 	__declspec(noreturn) void terminate(void);
  7358 	__declspec(noreturn) void unexpected(void);
  7359 #else
  7360 	void terminate(void);
  7361 	void unexpected(void);
  7362 #endif
  7363 
  7364 	typedef void (*terminate_handler)();
  7365 	terminate_handler set_terminate(terminate_handler h) throw();
  7366 	typedef void (*unexpected_handler)();
  7367 	unexpected_handler set_unexpected(unexpected_handler h) throw();
  7368 
  7369 namespace std {
  7370 #ifdef __MSVCDOTNET__
  7371 	inline bool uncaught_exception(void) { return ::__uncaught_exception(); }
  7372 #else // !__MSVCDOTNET__
  7373 	// MS KB242192: BUG: uncaught_exception() Always Returns False
  7374 	inline bool uncaught_exception(void) { return false; }
  7375 #endif //__MSVCDOTNET__
  7376 	inline void terminate(void) { ::terminate(); }
  7377 	inline void unexpected(void) { ::unexpected(); }
  7378 	inline terminate_handler set_terminate(terminate_handler h) throw() { return ::set_terminate(h); }
  7379 	inline unexpected_handler set_unexpected(unexpected_handler h) throw() { return ::set_unexpected(h); }
  7380 }
  7381 
  7382 #endif // extract from MSVC headers
  7383 
  7384 #ifdef __CW32__
  7385 
  7386 	extern "C" bool __uncaught_exception(void);
  7387 
  7388 namespace std {
  7389 #if __MWERKS__ > 0x3200
  7390 	inline bool uncaught_exception(void) { return ::__uncaught_exception(); }
  7391 #else
  7392 	// no uncaught_exception() implementation on CW 2.4.7
  7393 	inline bool uncaught_exception(void) { return false; }
  7394 #endif
  7395 }
  7396 
  7397 #endif // extract from CW headers
  7398 
  7399 #endif // <exception> header guard
  7400 
  7401 #endif //__SUPPORT_CPP_EXCEPTIONS__