1.1 --- a/epoc32/include/mw/aiwvariant.inl Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/mw/aiwvariant.inl Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,138 @@
1.4 -aiwvariant.inl
1.5 +/*
1.6 +* Copyright (c) 2003-2005 Nokia Corporation and/or its subsidiary(-ies).
1.7 +* All rights reserved.
1.8 +* This component and the accompanying materials are made available
1.9 +* 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.10 +* which accompanies this distribution, and is available
1.11 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.12 +*
1.13 +* Initial Contributors:
1.14 +* Nokia Corporation - initial contribution.
1.15 +*
1.16 +* Contributors:
1.17 +*
1.18 +* Description: Inline function implementations of class TAiwVariant.
1.19 +*
1.20 +*/
1.21 +
1.22 +
1.23 +
1.24 +
1.25 +
1.26 +
1.27 +inline TAiwVariant::TAiwVariant() : iTypeId(EVariantTypeNull), iPtrC(), iPtrC8()
1.28 + {
1.29 + iData.iBufC = NULL;
1.30 + iData.iBufC8 = NULL;
1.31 + Reset();
1.32 + }
1.33 +
1.34 +inline TAiwVariant::TAiwVariant(TInt32 aValue) : iTypeId(EVariantTypeNull), iPtrC(), iPtrC8()
1.35 + {
1.36 + Set(aValue);
1.37 + }
1.38 +
1.39 +inline TAiwVariant::TAiwVariant(const TUid& aValue) : iTypeId(EVariantTypeNull), iPtrC(), iPtrC8()
1.40 + {
1.41 + Set(aValue);
1.42 + }
1.43 +
1.44 +inline TAiwVariant::TAiwVariant(const TDesC& aValue) : iTypeId(EVariantTypeNull), iPtrC(), iPtrC8()
1.45 + {
1.46 + iData.iBufC = NULL;
1.47 + Set(aValue);
1.48 + }
1.49 +
1.50 +inline TAiwVariant::TAiwVariant(const HBufC* aValue) : iTypeId(EVariantTypeNull), iPtrC(), iPtrC8()
1.51 + {
1.52 + iData.iBufC = NULL;
1.53 + if(aValue)
1.54 + Set(*aValue);
1.55 + else
1.56 + Reset();
1.57 + }
1.58 +
1.59 +inline TAiwVariant::TAiwVariant(const TTime& aValue) : iTypeId(EVariantTypeNull), iPtrC(), iPtrC8()
1.60 + {
1.61 + Set(aValue);
1.62 + }
1.63 +
1.64 +inline TAiwVariant::TAiwVariant(const TDesC8& aValue) : iTypeId(EVariantTypeNull), iPtrC(), iPtrC8()
1.65 + {
1.66 + iData.iBufC8 = NULL;
1.67 + Set(aValue);
1.68 + }
1.69 +
1.70 +
1.71 +inline TAiwVariant::TAiwVariant(const RFile& aValue) : iTypeId(EVariantTypeNull), iPtrC(), iPtrC8()
1.72 + {
1.73 + Set(aValue);
1.74 + }
1.75 +
1.76 +
1.77 +inline TVariantTypeId TAiwVariant::TypeId() const
1.78 + {
1.79 + return static_cast<TVariantTypeId>(iTypeId);
1.80 + }
1.81 +
1.82 +inline TBool TAiwVariant::IsEmpty() const
1.83 + {
1.84 + return (iTypeId == EVariantTypeNull);
1.85 + }
1.86 +
1.87 +inline void TAiwVariant::Set(const HBufC* aValue)
1.88 + {
1.89 + Set(*aValue);
1.90 + }
1.91 +
1.92 +inline TAiwVariant& TAiwVariant::operator=(TInt32 aValue)
1.93 + {
1.94 + Set(aValue);
1.95 + return *this;
1.96 + }
1.97 +
1.98 +inline TAiwVariant& TAiwVariant::operator=(const TUid& aValue)
1.99 + {
1.100 + Set(aValue);
1.101 + return *this;
1.102 + }
1.103 +
1.104 +inline TAiwVariant& TAiwVariant::operator=(const TDesC& aValue)
1.105 + {
1.106 + Set(aValue);
1.107 + return *this;
1.108 + }
1.109 +
1.110 +inline TAiwVariant& TAiwVariant::operator=(const HBufC* aValue)
1.111 + {
1.112 + Set(*aValue);
1.113 + return *this;
1.114 + }
1.115 +
1.116 +inline TAiwVariant& TAiwVariant::operator=(const TTime& aValue)
1.117 + {
1.118 + Set(aValue);
1.119 + return *this;
1.120 + }
1.121 +
1.122 +
1.123 +inline TAiwVariant& TAiwVariant::operator=(const TDesC8& aValue)
1.124 + {
1.125 + Set(aValue);
1.126 + return *this;
1.127 + }
1.128 +
1.129 +
1.130 +inline TAiwVariant& TAiwVariant::operator=(const RFile& aValue)
1.131 + {
1.132 + Set(aValue);
1.133 + return *this;
1.134 + }
1.135 +
1.136 +
1.137 +inline TBool operator!=(const TAiwVariant& aLhs, const TAiwVariant& aRhs)
1.138 + {
1.139 + return !(aLhs == aRhs);
1.140 + }
1.141 +
1.142 +// End of file