williamr@2: // Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: // All rights reserved. williamr@2: // This component and the accompanying materials are made available williamr@2: // 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 williamr@2: // which accompanies this distribution, and is available williamr@2: // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". williamr@2: // williamr@2: // Initial Contributors: williamr@2: // Nokia Corporation - initial contribution. williamr@2: // williamr@2: // Contributors: williamr@2: // williamr@2: // Description: williamr@2: // Attribute Look-Up-Table header williamr@2: // The Attribute Lookup Table maintains a global set of unique IDs to be defined for document williamr@2: // node attributes and language tags. It does this by generating a unique ID for any descriptor williamr@2: // passed to it. This descriptor is in fact a pointer to a copy of the string. Once a string williamr@2: // has been seen once, any further references to it will map back to the same ID (pointer) williamr@2: // value. williamr@2: // williamr@2: // williamr@2: williamr@2: #if !defined(__CWAPENGINE_LUT_H__) williamr@2: #define __CWAPENGINE_LUT_H__ williamr@2: williamr@2: #include williamr@2: williamr@2: class RTest; williamr@2: class CAttributeLookupTableNode; williamr@2: williamr@2: //##ModelId=3B666BC70189 williamr@2: williamr@2: class CAttributeLookupTable : public CBase williamr@2: /** Provides an attribute lookup table, which maintains a global set of unique IDs to be defined williamr@2: for document node attributes and language tags. williamr@2: williamr@2: It does this by generating a unique (in the scope of the lookup table object) ID for any string williamr@2: passed to it. Once a string has been seen once, any further references to it will map back to the williamr@2: same ID value. williamr@2: williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: { williamr@2: public: williamr@2: //##ModelId=3B666BC701E3 williamr@2: IMPORT_C ~CAttributeLookupTable(); williamr@2: //##ModelId=3B666BC701DC williamr@2: IMPORT_C static CAttributeLookupTable* CAttributeLookupTable::NewL(); williamr@2: //##ModelId=3B666BC701DA williamr@2: IMPORT_C const HBufC* Des2IDL( const TDesC& ); // map descriptor to ID williamr@2: //##ModelId=3B666BC701D3 williamr@2: IMPORT_C const HBufC* KeyExists( const TDesC& ); // check to see if the given descriptor already exists williamr@2: //##ModelId=3B666BC701D2 williamr@2: IMPORT_C void Reset(); // clear the table williamr@2: williamr@2: // debug hook williamr@2: typedef enum{ williamr@2: EPrint, williamr@2: EPrintWholeTable williamr@2: } TDebugSelectorType; williamr@2: //##ModelId=3B666BC701C6 williamr@2: IMPORT_C void Debug( TDebugSelectorType aSelector, TAny* aParam1, TAny* aParam2 ); williamr@2: williamr@2: private: williamr@2: //##ModelId=3B666BC701C5 williamr@2: CAttributeLookupTable(); williamr@2: //##ModelId=3B666BC701BF williamr@2: void ConstructL(); williamr@2: //##ModelId=3B666BC701BD williamr@2: CAttributeLookupTableNode* FindDes( const TDesC& ); williamr@2: //##ModelId=3B666BC701BB williamr@2: TUint Hash( const TDesC& ); williamr@2: //##ModelId=3B666BC701A9 williamr@2: CArrayPtrFlat >* iList; williamr@2: }; williamr@2: williamr@2: williamr@2: #endif // __CWAPENGINE_LUT_H__