epoc32/include/mw/aiwvariant.inl
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
parent 1 666f914201fb
child 4 837f303aceeb
permissions -rw-r--r--
Final list of Symbian^2 public API header files
     1 /*
     2 * Copyright (c) 2003-2005 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     5 * 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
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description:     Inline function implementations of class TAiwVariant.
    15 *
    16 */
    17 
    18 
    19 
    20 
    21 
    22 
    23 inline TAiwVariant::TAiwVariant() : iTypeId(EVariantTypeNull), iPtrC(), iPtrC8()
    24     {
    25     iData.iBufC = NULL;
    26     iData.iBufC8 = NULL;
    27     Reset();
    28     }
    29 
    30 inline TAiwVariant::TAiwVariant(TInt32 aValue) : iTypeId(EVariantTypeNull), iPtrC(), iPtrC8()
    31     {   
    32     Set(aValue);
    33     }
    34 
    35 inline TAiwVariant::TAiwVariant(const TUid& aValue) : iTypeId(EVariantTypeNull), iPtrC(), iPtrC8()
    36     {
    37     Set(aValue);
    38     }
    39 
    40 inline TAiwVariant::TAiwVariant(const TDesC& aValue) : iTypeId(EVariantTypeNull), iPtrC(), iPtrC8()
    41     {
    42     iData.iBufC = NULL;
    43     Set(aValue);
    44     }
    45 
    46 inline TAiwVariant::TAiwVariant(const HBufC* aValue) : iTypeId(EVariantTypeNull), iPtrC(), iPtrC8()
    47     {
    48     iData.iBufC = NULL;
    49     if(aValue)
    50         Set(*aValue);
    51     else
    52         Reset();    
    53     }
    54 
    55 inline TAiwVariant::TAiwVariant(const TTime& aValue) : iTypeId(EVariantTypeNull), iPtrC(), iPtrC8()
    56     {
    57     Set(aValue);
    58     }
    59 
    60 inline TAiwVariant::TAiwVariant(const TDesC8& aValue) : iTypeId(EVariantTypeNull), iPtrC(), iPtrC8()
    61     {
    62     iData.iBufC8 = NULL;
    63     Set(aValue);
    64     }
    65 
    66 
    67 inline TAiwVariant::TAiwVariant(const RFile& aValue) : iTypeId(EVariantTypeNull), iPtrC(), iPtrC8()
    68     {
    69     Set(aValue);
    70     }
    71 
    72 
    73 inline TVariantTypeId TAiwVariant::TypeId() const
    74     {
    75     return static_cast<TVariantTypeId>(iTypeId);
    76     }
    77 
    78 inline TBool TAiwVariant::IsEmpty() const
    79     {
    80     return (iTypeId == EVariantTypeNull);
    81     }
    82 
    83 inline void TAiwVariant::Set(const HBufC* aValue)
    84     {
    85     Set(*aValue);
    86     }
    87 
    88 inline TAiwVariant& TAiwVariant::operator=(TInt32 aValue)
    89     {
    90     Set(aValue);
    91     return *this;
    92     }
    93 
    94 inline TAiwVariant& TAiwVariant::operator=(const TUid& aValue)
    95     {
    96     Set(aValue);
    97     return *this;
    98     }
    99 
   100 inline TAiwVariant& TAiwVariant::operator=(const TDesC& aValue)
   101     {
   102     Set(aValue);
   103     return *this;
   104     }
   105 
   106 inline TAiwVariant& TAiwVariant::operator=(const HBufC* aValue)
   107     {
   108     Set(*aValue);
   109     return *this;
   110     }
   111 
   112 inline TAiwVariant& TAiwVariant::operator=(const TTime& aValue)
   113     {
   114     Set(aValue);
   115     return *this;
   116     }
   117 
   118 
   119 inline TAiwVariant& TAiwVariant::operator=(const TDesC8& aValue)
   120     {
   121     Set(aValue);    
   122     return *this;
   123     }
   124 
   125 
   126 inline TAiwVariant& TAiwVariant::operator=(const RFile& aValue)
   127     {
   128     Set(aValue);
   129     return *this;
   130     }
   131 
   132 
   133 inline TBool operator!=(const TAiwVariant& aLhs, const TAiwVariant& aRhs)
   134     {
   135     return !(aLhs == aRhs);
   136     }
   137 
   138 // End of file