epoc32/include/attrlut.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
permissions -rw-r--r--
Final list of Symbian^2 public API header files
     1 // Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 // Attribute Look-Up-Table header
    15 // The Attribute Lookup Table maintains a global set of unique IDs to be defined for document
    16 // node attributes and language tags. It does this by generating a unique ID for any descriptor
    17 // passed to it. This descriptor is in fact a pointer to a copy of the string. Once a string
    18 // has been seen once, any further references to it will map back to the same ID (pointer)
    19 // value.
    20 // 
    21 //
    22 
    23 #if !defined(__CWAPENGINE_LUT_H__)
    24 #define __CWAPENGINE_LUT_H__
    25 
    26 #include <e32base.h>
    27 
    28 class RTest;
    29 class CAttributeLookupTableNode;
    30 
    31 //##ModelId=3B666BC70189
    32 
    33 class CAttributeLookupTable : public CBase
    34 /** Provides an attribute lookup table, which maintains a global set of unique IDs to be defined 
    35 	for document node attributes and language tags. 
    36 
    37 	It does this by generating a unique (in the scope of the lookup table object) ID for any string 
    38 	passed to it. Once a string has been seen once, any further references to it will map back to the 
    39 	same ID value. 
    40 
    41 	@publishedAll
    42 	@released
    43 */
    44 {
    45 public:
    46 	//##ModelId=3B666BC701E3
    47 	IMPORT_C ~CAttributeLookupTable();
    48 	//##ModelId=3B666BC701DC
    49 	IMPORT_C static CAttributeLookupTable* CAttributeLookupTable::NewL();
    50 	//##ModelId=3B666BC701DA
    51 	IMPORT_C const HBufC* Des2IDL( const TDesC& ); // map descriptor to ID
    52 	//##ModelId=3B666BC701D3
    53 	IMPORT_C const HBufC* KeyExists( const TDesC& ); // check to see if the given descriptor already exists
    54 	//##ModelId=3B666BC701D2
    55 	IMPORT_C void Reset(); // clear the table
    56 
    57 	// debug hook
    58 	typedef enum{
    59 		EPrint,
    60 		EPrintWholeTable
    61 	} TDebugSelectorType;
    62 	//##ModelId=3B666BC701C6
    63 	IMPORT_C void Debug( TDebugSelectorType aSelector, TAny* aParam1, TAny* aParam2 );
    64 
    65 private:
    66 	//##ModelId=3B666BC701C5
    67 	CAttributeLookupTable();
    68 	//##ModelId=3B666BC701BF
    69 	void ConstructL();
    70 	//##ModelId=3B666BC701BD
    71 	CAttributeLookupTableNode* FindDes( const TDesC& );
    72 	//##ModelId=3B666BC701BB
    73 	TUint Hash( const TDesC& );
    74 	//##ModelId=3B666BC701A9
    75 	CArrayPtrFlat<CArrayPtrSeg<CAttributeLookupTableNode> >* iList;
    76 };
    77 
    78 
    79 #endif // __CWAPENGINE_LUT_H__