menufw/hierarchynavigator/hnutilities/src/hnmduintegerkey.cpp
changeset 0 f72a12da539e
equal deleted inserted replaced
-1:000000000000 0:f72a12da539e
       
     1 /*
       
     2 * Copyright (c) 2007-2008 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 "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include <liwservicehandler.h>
       
    20 
       
    21 #include "hnmduintegerkey.h"
       
    22 
       
    23 // ======== MEMBER FUNCTIONS ========
       
    24 
       
    25 // ---------------------------------------------------------------------------
       
    26 // 
       
    27 // ---------------------------------------------------------------------------
       
    28 //
       
    29 CHnMdUIntegerKey* CHnMdUIntegerKey::NewL()
       
    30     {
       
    31     CHnMdUIntegerKey* self = NewLC();
       
    32     CleanupStack::Pop( self );
       
    33     return self;
       
    34     }
       
    35 
       
    36 // ---------------------------------------------------------------------------
       
    37 // 
       
    38 // ---------------------------------------------------------------------------
       
    39 //
       
    40 CHnMdUIntegerKey* CHnMdUIntegerKey::NewLC()
       
    41     {
       
    42     CHnMdUIntegerKey* self = new ( ELeave ) CHnMdUIntegerKey();
       
    43     CleanupStack::PushL( self );
       
    44     self->ConstructL();
       
    45     return self;
       
    46     }
       
    47 
       
    48 // ---------------------------------------------------------------------------
       
    49 // 
       
    50 // ---------------------------------------------------------------------------
       
    51 //
       
    52 CHnMdUIntegerKey* CHnMdUIntegerKey::NewL( const CHnMdUIntegerKey* aKey )
       
    53     {
       
    54     CHnMdUIntegerKey* self = NewLC( aKey );
       
    55     CleanupStack::Pop( self );
       
    56     return self;
       
    57     }
       
    58 
       
    59 // ---------------------------------------------------------------------------
       
    60 // 
       
    61 // ---------------------------------------------------------------------------
       
    62 //
       
    63 CHnMdUIntegerKey* CHnMdUIntegerKey::NewLC( const CHnMdUIntegerKey* aKey )
       
    64     {
       
    65     CHnMdUIntegerKey* self = new ( ELeave ) CHnMdUIntegerKey();
       
    66     CleanupStack::PushL( self );
       
    67     self->ConstructL( aKey );
       
    68     return self;
       
    69     }
       
    70 
       
    71 // ---------------------------------------------------------------------------
       
    72 // 
       
    73 // ---------------------------------------------------------------------------
       
    74 //
       
    75 CHnMdBaseKey* CHnMdUIntegerKey::CopyLC()
       
    76     {
       
    77     CHnMdUIntegerKey* self = CHnMdUIntegerKey::NewL( this );
       
    78     CleanupStack::PushL( self );
       
    79     return self;
       
    80     }
       
    81 
       
    82 // ---------------------------------------------------------------------------
       
    83 // 
       
    84 // ---------------------------------------------------------------------------
       
    85 //
       
    86 CHnMdUIntegerKey::~CHnMdUIntegerKey()
       
    87     {
       
    88     }
       
    89 
       
    90 // ---------------------------------------------------------------------------
       
    91 // 
       
    92 // ---------------------------------------------------------------------------
       
    93 //
       
    94 CHnMdUIntegerKey::CHnMdUIntegerKey()
       
    95     {
       
    96     }
       
    97 
       
    98 // ---------------------------------------------------------------------------
       
    99 // 
       
   100 // ---------------------------------------------------------------------------
       
   101 //
       
   102 void CHnMdUIntegerKey::ConstructL()
       
   103     {
       
   104     }
       
   105 
       
   106 // ---------------------------------------------------------------------------
       
   107 // 
       
   108 // ---------------------------------------------------------------------------
       
   109 //
       
   110 void CHnMdUIntegerKey::ConstructL( const CHnMdUIntegerKey* aKey )
       
   111     {
       
   112     BaseConstructL( aKey );
       
   113     }
       
   114 
       
   115 // ---------------------------------------------------------------------------
       
   116 // 
       
   117 // ---------------------------------------------------------------------------
       
   118 //
       
   119 void CHnMdUIntegerKey::ToVariantL( TLiwVariant& aRet ) const
       
   120     {
       
   121     TLex lex( KeyContent() );
       
   122     TUint uIntVal( KErrNone );
       
   123     lex.Val( uIntVal );
       
   124     aRet.SetL( TLiwVariant( uIntVal ) ); // crates a copy of the data
       
   125     }
       
   126