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