ncdengine/engine/inc/catalogspair.h
changeset 0 ba25891c3a9e
equal deleted inserted replaced
-1:000000000000 0:ba25891c3a9e
       
     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:   Contains CCatalogsPair class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CCATALOGSPAIR_H
       
    20 #define CCATALOGSPAIR_H
       
    21 
       
    22 #include <e32base.h>
       
    23 
       
    24 /**
       
    25  * Simple pair-type
       
    26  *
       
    27  */
       
    28 template<typename KeyType, typename ValueType>
       
    29 class CCatalogsPair : public CBase
       
    30     {
       
    31 public:
       
    32 
       
    33     /**
       
    34      * @param aKey Key. Ownership is transferred
       
    35      * @param aValue Value. Value is copied
       
    36      */
       
    37     CCatalogsPair( KeyType* aKey, const ValueType& aValue );
       
    38     
       
    39     virtual ~CCatalogsPair();
       
    40     
       
    41     const KeyType& Key() const;
       
    42     const ValueType& Value() const;
       
    43     
       
    44     void SetValue( const ValueType& aValue );
       
    45         
       
    46 private:
       
    47 
       
    48     KeyType* iKey;
       
    49     ValueType iValue;
       
    50           
       
    51     };
       
    52     
       
    53 #include "catalogspair.inl"    
       
    54 
       
    55 #endif // CCATALOGSPAIR_H