idlehomescreen/xmluicontroller/inc/csspropertymap.h
changeset 0 f72a12da539e
equal deleted inserted replaced
-1:000000000000 0:f72a12da539e
       
     1 /*
       
     2 * Copyright (c) 2005-2007 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:  Utility for caching CSS property values
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_CSSPROPERTYMAP_H
       
    20 #define C_CSSPROPERTYMAP_H
       
    21 
       
    22 
       
    23 #include <e32base.h>
       
    24 #include <e32hashtab.h>
       
    25 
       
    26 class CXnProperty;
       
    27 class CXnDomPropertyValue;
       
    28 
       
    29 namespace AiXmlUiController
       
    30 {
       
    31 
       
    32 typedef RPtrHashMap< TDesC8, CXnDomPropertyValue > RDomPropertyValueMap;
       
    33 typedef RPtrHashMap< TDesC8, RDomPropertyValueMap > RElementMap;
       
    34 
       
    35 
       
    36 /*
       
    37  *  @ingroup group_xmluicontroller
       
    38  * 
       
    39  *  Utility for storing CSS property values. 
       
    40  *
       
    41  *  @lib AiXmlUiMain
       
    42  */
       
    43 class CCssPropertyMap : public CBase
       
    44     {
       
    45 
       
    46 public:
       
    47 
       
    48     static CCssPropertyMap* NewL();
       
    49 
       
    50     virtual ~CCssPropertyMap();
       
    51 
       
    52     /**
       
    53      * Stores property value.
       
    54      *
       
    55      * @param aElementId Ui element id to associate property value with
       
    56      * @param aProperty property to store
       
    57      */
       
    58 
       
    59     void StorePropertyValueL( const TDesC8& aElementId, CXnProperty& aProperty );
       
    60     
       
    61     /**
       
    62      * Finds property value.
       
    63      *
       
    64      * @param aElementId Ui element Id to associate property value
       
    65      * @param aName property name for lookup
       
    66      * @return property value or NULL.
       
    67      */
       
    68     CXnDomPropertyValue* FindPropertyValue( const TDesC8& aElementId, const TDesC8& aName );
       
    69 
       
    70     void Reset();
       
    71 
       
    72 private:
       
    73 
       
    74     CCssPropertyMap();
       
    75 
       
    76 private: // data
       
    77 
       
    78     /**
       
    79      * Hashmap of element specific property value maps. Own.
       
    80      */
       
    81     RElementMap iElementMap;
       
    82     
       
    83     };
       
    84 
       
    85 } // namespace AiXmlUiController
       
    86 
       
    87 #endif // C_CSSPROPERTYMAP_H