pictographs/AknPictograph/src/AknAnimatedPictographDefKey.cpp
changeset 0 05e9090e2422
equal deleted inserted replaced
-1:000000000000 0:05e9090e2422
       
     1 /*
       
     2 * Copyright (c) 2002 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:  Animated pictograph definition key used for binary search.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDE FILES
       
    20 #include    "AknAnimatedPictographDefKey.h"
       
    21 #include    "AknPictographFactory.h"
       
    22 #include    <e32std.h>
       
    23 
       
    24 // ============================ MEMBER FUNCTIONS ===============================
       
    25 
       
    26 // -----------------------------------------------------------------------------
       
    27 // Constructor
       
    28 // -----------------------------------------------------------------------------
       
    29 //
       
    30 TAknAnimatedPictographDefKey::TAknAnimatedPictographDefKey() :
       
    31     TKey( _FOFF( TAknAnimatedPictographDefinition, iCode ), ECmpTUint16 )
       
    32     {
       
    33     }
       
    34 
       
    35 // -----------------------------------------------------------------------------
       
    36 // TAknAnimatedPictographDefKey::At
       
    37 // Implements At() according to the protocol.
       
    38 // -----------------------------------------------------------------------------
       
    39 //
       
    40 TAny* TAknAnimatedPictographDefKey::At( TInt aIndex ) const
       
    41     {
       
    42     const TUint8* ret;
       
    43     if ( aIndex == KIndexPtr )
       
    44         {
       
    45         ret = reinterpret_cast<const TUint8*>( iPtr );
       
    46         }
       
    47     else
       
    48         {
       
    49         ret = reinterpret_cast<const TUint8*>( 
       
    50             &( AknPictographFactory::AnimatedPictographTable()[aIndex] ) );
       
    51         }
       
    52     ret += iKeyOffset;
       
    53     return const_cast<TUint8*>( ret );
       
    54     }
       
    55 
       
    56 //  End of File