epoc32/include/attrlut.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
     1.1 --- a/epoc32/include/attrlut.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/attrlut.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,79 @@
     1.4 -attrlut.h
     1.5 +// Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +// All rights reserved.
     1.7 +// This component and the accompanying materials are made available
     1.8 +// 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
     1.9 +// which accompanies this distribution, and is available
    1.10 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.11 +//
    1.12 +// Initial Contributors:
    1.13 +// Nokia Corporation - initial contribution.
    1.14 +//
    1.15 +// Contributors:
    1.16 +//
    1.17 +// Description:
    1.18 +// Attribute Look-Up-Table header
    1.19 +// The Attribute Lookup Table maintains a global set of unique IDs to be defined for document
    1.20 +// node attributes and language tags. It does this by generating a unique ID for any descriptor
    1.21 +// passed to it. This descriptor is in fact a pointer to a copy of the string. Once a string
    1.22 +// has been seen once, any further references to it will map back to the same ID (pointer)
    1.23 +// value.
    1.24 +// 
    1.25 +//
    1.26 +
    1.27 +#if !defined(__CWAPENGINE_LUT_H__)
    1.28 +#define __CWAPENGINE_LUT_H__
    1.29 +
    1.30 +#include <e32base.h>
    1.31 +
    1.32 +class RTest;
    1.33 +class CAttributeLookupTableNode;
    1.34 +
    1.35 +//##ModelId=3B666BC70189
    1.36 +
    1.37 +class CAttributeLookupTable : public CBase
    1.38 +/** Provides an attribute lookup table, which maintains a global set of unique IDs to be defined 
    1.39 +	for document node attributes and language tags. 
    1.40 +
    1.41 +	It does this by generating a unique (in the scope of the lookup table object) ID for any string 
    1.42 +	passed to it. Once a string has been seen once, any further references to it will map back to the 
    1.43 +	same ID value. 
    1.44 +
    1.45 +	@publishedAll
    1.46 +	@released
    1.47 +*/
    1.48 +{
    1.49 +public:
    1.50 +	//##ModelId=3B666BC701E3
    1.51 +	IMPORT_C ~CAttributeLookupTable();
    1.52 +	//##ModelId=3B666BC701DC
    1.53 +	IMPORT_C static CAttributeLookupTable* CAttributeLookupTable::NewL();
    1.54 +	//##ModelId=3B666BC701DA
    1.55 +	IMPORT_C const HBufC* Des2IDL( const TDesC& ); // map descriptor to ID
    1.56 +	//##ModelId=3B666BC701D3
    1.57 +	IMPORT_C const HBufC* KeyExists( const TDesC& ); // check to see if the given descriptor already exists
    1.58 +	//##ModelId=3B666BC701D2
    1.59 +	IMPORT_C void Reset(); // clear the table
    1.60 +
    1.61 +	// debug hook
    1.62 +	typedef enum{
    1.63 +		EPrint,
    1.64 +		EPrintWholeTable
    1.65 +	} TDebugSelectorType;
    1.66 +	//##ModelId=3B666BC701C6
    1.67 +	IMPORT_C void Debug( TDebugSelectorType aSelector, TAny* aParam1, TAny* aParam2 );
    1.68 +
    1.69 +private:
    1.70 +	//##ModelId=3B666BC701C5
    1.71 +	CAttributeLookupTable();
    1.72 +	//##ModelId=3B666BC701BF
    1.73 +	void ConstructL();
    1.74 +	//##ModelId=3B666BC701BD
    1.75 +	CAttributeLookupTableNode* FindDes( const TDesC& );
    1.76 +	//##ModelId=3B666BC701BB
    1.77 +	TUint Hash( const TDesC& );
    1.78 +	//##ModelId=3B666BC701A9
    1.79 +	CArrayPtrFlat<CArrayPtrSeg<CAttributeLookupTableNode> >* iList;
    1.80 +};
    1.81 +
    1.82 +
    1.83 +#endif // __CWAPENGINE_LUT_H__