javauis/lcdui_akn/lcdgr/inc/MidProxyMap.h
branchRCL_3
changeset 19 04becd199f91
equal deleted inserted replaced
16:f5050f1da672 19:04becd199f91
       
     1 /*
       
     2 * Copyright (c) 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 "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 #ifndef MIDPROXYMAP_H
       
    20 #define MIDPROXYMAP_H
       
    21 
       
    22 #include <lcdui.h>
       
    23 
       
    24 NONSHARABLE_CLASS(CMIDProxyMap) : public CBase
       
    25 {
       
    26 public:
       
    27     CMIDProxyMap();
       
    28     ~CMIDProxyMap();
       
    29 
       
    30     template<class T>
       
    31     inline TBool Lookup(T*& aPointer, TUint32 aHandle);
       
    32 
       
    33 protected:
       
    34     TAny* Lookup(MMIDComponent::TType aType, TUint32 aHandle);
       
    35 
       
    36 private:
       
    37 };
       
    38 
       
    39 template<class T>
       
    40 inline TBool CMIDProxyMap::Lookup(T*& aPointer, TUint32 aHandle)
       
    41 {
       
    42     TAny* pointer = Lookup(T::EType, aHandle);
       
    43     if (pointer)
       
    44     {
       
    45         aPointer = (T*)pointer;
       
    46         return ETrue;
       
    47     }
       
    48     return EFalse;
       
    49 }
       
    50 
       
    51 #endif // MIDPROXYMAP_H