Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
1 // Copyright (c) 2003-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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef __DICTIONARYCODEPAGE_H__
17 #define __DICTIONARYCODEPAGE_H__
20 #include <stringpool.h>
26 class CDictionaryCodePage : public CBase
28 The CDictionaryCodePage, represents a single numeric code page for Elements, Attributes, and
31 This object refers to the appropriate string pool tables, and creates mappings between
32 strings in these tables and their token values.
34 Used mainly for wbxml document parsing, and allows for the quick comparison of strings.
36 This object is associated with a string dictionary via a user defined class.
39 @see CStringDictionary
50 A structure for describing the types of string pool table associated with this class.
55 EStringTypeAttributeValue
61 IMPORT_C static CDictionaryCodePage* NewL(const TStringTable* aElementTable,
62 const TStringTable* aAttributeTable,
63 const TStringTable* aValueTable,
66 IMPORT_C virtual ~CDictionaryCodePage();
68 IMPORT_C const TStringTable* StringTable(TStringType aType) const;
69 IMPORT_C TUint8 CodePage() const;
71 IMPORT_C TInt StringPoolIndexFromToken(TInt aToken, TStringType aType) const;
72 IMPORT_C TInt TokenFromStringPoolIndex(TInt aIndex, TStringType aType) const;
74 IMPORT_C void ConstructIndexMappingL(const TInt* aStringPoolToTokenMapping, TStringType aType);
78 CDictionaryCodePage(const TStringTable* aElementTable, const TStringTable* aAttributeTable,
79 const TStringTable* aValueTable, TUint8 aCodePage);
81 CDictionaryCodePage(const CDictionaryCodePage& aOriginal);
82 CDictionaryCodePage& operator=(const CDictionaryCodePage& aRhs);
86 struct TStringPoolTokenMapping
88 The TStringPoolTokenMapping struct stores a mapping between table index and
89 token values for a single string entry.
96 static TInt CompareStringPoolTokenMappingTable(const TStringPoolTokenMapping& aFirst,
97 const TStringPoolTokenMapping& aSecond);
101 Pointer to the static Element string pool table.
104 const TStringTable* iElementTable;
107 Pointer to the static Attribute string pool table.
110 const TStringTable* iAttributeTable;
113 Pointer to the static AttributeValue string pool table.
116 const TStringTable* iValueTable;
119 Array to obtain a Element Token from String Pool index.
121 RArray<TInt> iElementStringPoolIndexToToken;
124 Array to obtain a Element String Pool Index from a token.
126 RArray<TStringPoolTokenMapping> iElementTokenToStringPoolIndex;
129 Array to obtain a Attribute Token from String Pool index.
131 RArray<TInt> iAttributeStringPoolIndexToToken;
134 Array to obtain a Attribute String Pool Index from a token.
136 RArray<TStringPoolTokenMapping> iAttributeTokenToStringPoolIndex;
139 Array to obtain a Value Token from String Pool index.
141 RArray<TInt> iValueStringPoolIndexToToken;
144 Array to obtain a Value String Pool Index from a token.
146 RArray<TStringPoolTokenMapping> iValueTokenToStringPoolIndex;
150 The numeric codepage this object represents.
158 #endif // __DICTIONARYCODEPAGE_H__