1.1 --- a/epoc32/include/e32cmn.inl Wed Mar 31 12:27:01 2010 +0100
1.2 +++ b/epoc32/include/e32cmn.inl Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -1,9 +1,9 @@
1.4 // Copyright (c) 1994-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 // All rights reserved.
1.6 // This component and the accompanying materials are made available
1.7 -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.8 +// under the terms of the License "Eclipse Public License v1.0"
1.9 // which accompanies this distribution, and is available
1.10 -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.11 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.12 //
1.13 // Initial Contributors:
1.14 // Nokia Corporation - initial contribution.
1.15 @@ -2962,6 +2962,40 @@
1.16
1.17
1.18
1.19 +// Class TPoint3D
1.20 +#ifndef __KERNEL_MODE__
1.21 +inline TPoint3D::TPoint3D()
1.22 + : iX(0),iY(0),iZ(0)
1.23 +/**
1.24 +Constructs default 3Dpoint, initialising its iX, iY and iZ members to zero.
1.25 +*/
1.26 + {}
1.27 +
1.28 +inline TPoint3D::TPoint3D(TInt aX,TInt aY,TInt aZ)
1.29 + : iX(aX),iY(aY),iZ(aZ)
1.30 +/**
1.31 +Constructs TPoint3D with the specified x,y and z co-ordinates.
1.32 +
1.33 +@param aX The x co-ordinate value.
1.34 +@param aY The y co-ordinate value.
1.35 +@param aZ The z co-ordinate value.
1.36 +*/
1.37 + {}
1.38 +
1.39 +
1.40 +
1.41 +
1.42 +inline TPoint3D::TPoint3D(const TPoint& aPoint)
1.43 +:iX(aPoint.iX),iY(aPoint.iY),iZ(0)
1.44 +/*
1.45 +Copy Construct from TPoint , initialises Z co-ordinate to Zero
1.46 +@param aPoint The TPoint from which we create TPoint3D object
1.47 +*/
1.48 + {}
1.49 +
1.50 +
1.51 +#endif
1.52 +
1.53
1.54 // Class TFindHandle
1.55 inline TFindHandle::TFindHandle()
1.56 @@ -3186,6 +3220,16 @@
1.57
1.58
1.59
1.60 +/**
1.61 +Default constructor.
1.62 +*/
1.63 +inline RReadWriteLock::RReadWriteLock()
1.64 + : iValues(0), iPriority(EAlternatePriority), iReaderSem(), iWriterSem()
1.65 + {}
1.66 +
1.67 +
1.68 +
1.69 +
1.70 // Class RMessagePtr2
1.71
1.72
1.73 @@ -3233,6 +3277,7 @@
1.74 Default constructor
1.75 */
1.76 inline RMessage2::RMessage2()
1.77 + :iFunction(0), iSpare1(0), iSessionPtr(NULL), iFlags(0), iSpare3(0)
1.78 {}
1.79
1.80
1.81 @@ -3472,6 +3517,17 @@
1.82
1.83 // Class TIdentityRelation<T>
1.84 template <class T>
1.85 +inline TIdentityRelation<T>::TIdentityRelation()
1.86 +/**
1.87 +Constructs the object to use the equality operator (==) defined for class T
1.88 +to determine whether two class T type objects match.
1.89 +*/
1.90 + {iIdentity=(TGeneralIdentityRelation)&EqualityOperatorCompare;}
1.91 +
1.92 +
1.93 +
1.94 +
1.95 +template <class T>
1.96 inline TIdentityRelation<T>::TIdentityRelation( TBool (*anIdentity)(const T&, const T&) )
1.97 /**
1.98 Constructs the object taking the specified function as an argument.
1.99 @@ -3501,6 +3557,14 @@
1.100
1.101
1.102
1.103 +template <class T>
1.104 +inline TBool TIdentityRelation<T>::EqualityOperatorCompare(const T& aLeft, const T& aRight)
1.105 +/**
1.106 +Compares two objects of class T using the equality operator defined for class T.
1.107 +*/
1.108 + {return aLeft == aRight;}
1.109 +
1.110 +
1.111
1.112 // Class TLinearOrder<T>
1.113 template <class T>
1.114 @@ -5063,6 +5127,9 @@
1.115 Matching is based on the comparison of a TInt value at the key offset position
1.116 within the objects.
1.117
1.118 +For classes which define their own equality operator (==), the alternative method
1.119 +Find(const T& anEntry, TIdentityRelation<T> anIdentity) is recommended.
1.120 +
1.121 The find operation always starts at the low index end of the array. There
1.122 is no assumption about the order of objects in the array.
1.123
1.124 @@ -5085,6 +5152,18 @@
1.125 The algorithm for determining whether two class T type objects match is provided
1.126 by a function supplied by the caller.
1.127
1.128 +Such a function need not be supplied if an equality operator (==) is defined for class T.
1.129 +In this case, default construction of anIdentity provides matching, as in the example below:
1.130 +
1.131 +@code
1.132 +//Construct a TPoint and append to an RArray<TPoint>
1.133 +TPoint p1(0,0);
1.134 +RArray<TPoint> points;
1.135 +points.AppendL(p1);
1.136 +//Find position of p1 in points using TIdentityRelation<TPoint> default construction
1.137 +TInt r = points.Find(p1, TIdentityRelation<TPoint>());
1.138 +@endcode
1.139 +
1.140 The find operation always starts at the low index end of the array. There
1.141 is no assumption about the order of objects in the array.
1.142
1.143 @@ -5110,6 +5189,9 @@
1.144 Matching is based on the comparison of a TInt value at the key offset position
1.145 within the objects.
1.146
1.147 +For classes which define their own equality operator (==), the alternative method
1.148 +FindReverse(const T& anEntry, TIdentityRelation<T> anIdentity) is recommended.
1.149 +
1.150 The find operation always starts at the high index end of the array. There
1.151 is no assumption about the order of objects in the array.
1.152
1.153 @@ -5132,6 +5214,11 @@
1.154 The algorithm for determining whether two class T type objects match is provided
1.155 by a function supplied by the caller.
1.156
1.157 +Such a function need not be supplied if an equality operator (==) is defined for class T.
1.158 +In this case, default construction of anIdentity provides matching.
1.159 +
1.160 +See Find(const T& anEntry, TIdentityRelation<T> anIdentity) for more details.
1.161 +
1.162 The find operation always starts at the high index end of the array. There
1.163 is no assumption about the order of objects in the array.
1.164
1.165 @@ -6815,6 +6902,29 @@
1.166 #endif
1.167
1.168
1.169 +/**
1.170 +Allows the client to specify whether each argument of the TIpcArgs object will
1.171 +be pinned before being sent to the server.
1.172 +
1.173 +To pin all the arguments in the TIpcArgs object pass no parameters to this
1.174 +method.
1.175 +
1.176 +@return A reference to this TIpcArgs object that can be passed as a parameter to
1.177 + one of the overloads the DSession::Send() and DSession::SendReceive() methods.
1.178 +*/
1.179 +inline TIpcArgs& TIpcArgs::PinArgs(TBool aPinArg0, TBool aPinArg1, TBool aPinArg2, TBool aPinArg3)
1.180 + {
1.181 + __ASSERT_COMPILE(!((1 << ((KBitsPerType*KMaxMessageArguments)-1)) & KPinMask));
1.182 + if (aPinArg0)
1.183 + iFlags |= KPinArg0;
1.184 + if (aPinArg1)
1.185 + iFlags |= KPinArg1;
1.186 + if (aPinArg2)
1.187 + iFlags |= KPinArg2;
1.188 + if (aPinArg3)
1.189 + iFlags |= KPinArg3;
1.190 + return *this;
1.191 + }
1.192
1.193
1.194 inline TIpcArgs::TArgType TIpcArgs::Type(TNothing)
1.195 @@ -6981,7 +7091,7 @@
1.196 inline const TSecureId* SSecureId::operator&() const
1.197 { return (const TSecureId*)this; }
1.198 inline SSecureId::operator const TSecureId&() const
1.199 - { return (const TSecureId&)iId; }
1.200 + { /* coverity[return_local_addr] */ return (const TSecureId&)iId; }
1.201 inline SSecureId::operator TUint32() const
1.202 { return iId; }
1.203 inline SSecureId::operator TUid() const
1.204 @@ -7021,7 +7131,7 @@
1.205 inline const TVendorId* SVendorId::operator&() const
1.206 { return (const TVendorId*)this; }
1.207 inline SVendorId::operator const TVendorId&() const
1.208 - { return (const TVendorId&)iId; }
1.209 + { /* coverity[return_local_addr] */ return (const TVendorId&)iId; }
1.210 inline SVendorId::operator TUint32() const
1.211 { return iId; }
1.212 inline SVendorId::operator TUid() const