epoc32/include/xml/plugins/dictionarycodepage.h
branchSymbian3
changeset 4 837f303aceeb
parent 3 e1b950c65cb4
     1.1 --- a/epoc32/include/xml/plugins/dictionarycodepage.h	Wed Mar 31 12:27:01 2010 +0100
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,158 +0,0 @@
     1.4 -// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 -// All rights reserved.
     1.6 -// This component and the accompanying materials are made available
     1.7 -// 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.8 -// which accompanies this distribution, and is available
     1.9 -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.10 -//
    1.11 -// Initial Contributors:
    1.12 -// Nokia Corporation - initial contribution.
    1.13 -//
    1.14 -// Contributors:
    1.15 -//
    1.16 -// Description:
    1.17 -//
    1.18 -
    1.19 -#ifndef __DICTIONARYCODEPAGE_H__
    1.20 -#define __DICTIONARYCODEPAGE_H__
    1.21 -
    1.22 -#include <e32base.h>
    1.23 -#include <stringpool.h>
    1.24 -
    1.25 -
    1.26 -namespace Xml
    1.27 -{
    1.28 -
    1.29 -class CDictionaryCodePage : public CBase
    1.30 -/**
    1.31 -The CDictionaryCodePage, represents a single numeric code page for Elements, Attributes, and
    1.32 -AttributeValues.
    1.33 -
    1.34 -This object refers to the appropriate string pool tables, and creates mappings between
    1.35 -strings in these tables and their token values.
    1.36 -
    1.37 -Used mainly for wbxml document parsing, and allows for the quick comparison of strings.
    1.38 -
    1.39 -This object is associated with a string dictionary via a user defined class.
    1.40 -
    1.41 -@see RStringPool
    1.42 -@see CStringDictionary
    1.43 -
    1.44 -@publishedPartner
    1.45 -@released
    1.46 -*/
    1.47 -	{
    1.48 -
    1.49 -public:
    1.50 -
    1.51 -	enum TStringType
    1.52 -/**
    1.53 -A structure for describing the types of string pool table associated with this class.
    1.54 -*/
    1.55 -		{
    1.56 -			EStringTypeElement,
    1.57 -			EStringTypeAttribute,
    1.58 -			EStringTypeAttributeValue
    1.59 -		};
    1.60 -
    1.61 -
    1.62 -public:
    1.63 -
    1.64 -	IMPORT_C static CDictionaryCodePage* NewL(const TStringTable* aElementTable, 
    1.65 -											  const TStringTable* aAttributeTable, 
    1.66 -											  const TStringTable* aValueTable, 
    1.67 -											  TUint8 aCodePage);
    1.68 -
    1.69 -	IMPORT_C virtual ~CDictionaryCodePage();
    1.70 -	
    1.71 -	IMPORT_C const TStringTable* StringTable(TStringType aType) const;
    1.72 -	IMPORT_C TUint8 CodePage() const;
    1.73 -
    1.74 -	IMPORT_C TInt StringPoolIndexFromToken(TInt aToken, TStringType aType) const;
    1.75 -	IMPORT_C TInt TokenFromStringPoolIndex(TInt aIndex, TStringType aType) const;
    1.76 -	
    1.77 -	IMPORT_C void ConstructIndexMappingL(const TInt* aStringPoolToTokenMapping, TStringType aType);
    1.78 -
    1.79 -private:
    1.80 -
    1.81 -	CDictionaryCodePage(const TStringTable* aElementTable, const TStringTable* aAttributeTable, 
    1.82 -		                const TStringTable* aValueTable, TUint8 aCodePage);
    1.83 -
    1.84 -	CDictionaryCodePage(const CDictionaryCodePage& aOriginal);
    1.85 -	CDictionaryCodePage& operator=(const CDictionaryCodePage& aRhs);
    1.86 -
    1.87 -private:
    1.88 -
    1.89 -	struct TStringPoolTokenMapping
    1.90 -/**
    1.91 -The TStringPoolTokenMapping struct stores a mapping between table index and 
    1.92 -token values for a single string entry.
    1.93 -*/
    1.94 -		{
    1.95 -		TInt iTokenValue;
    1.96 -		TInt iTableIndex;
    1.97 -		};
    1.98 -
    1.99 -	static TInt CompareStringPoolTokenMappingTable(const TStringPoolTokenMapping& aFirst, 
   1.100 -		                                           const TStringPoolTokenMapping& aSecond);
   1.101 -private:
   1.102 -
   1.103 -/**
   1.104 -Pointer to the static Element string pool table.
   1.105 -We do not own this.
   1.106 -*/	
   1.107 -	const TStringTable*				iElementTable;
   1.108 -
   1.109 -/**
   1.110 -Pointer to the static Attribute string pool table.
   1.111 -We do not own this.
   1.112 -*/	
   1.113 -	const TStringTable*				iAttributeTable;
   1.114 -
   1.115 -/**
   1.116 -Pointer to the static AttributeValue string pool table.
   1.117 -We do not own this.
   1.118 -*/	
   1.119 -	const TStringTable*				iValueTable;
   1.120 -
   1.121 -/**
   1.122 -Array to obtain a Element Token from String Pool index.
   1.123 -*/	
   1.124 -	RArray<TInt>					iElementStringPoolIndexToToken;
   1.125 -
   1.126 -/**
   1.127 -Array to obtain a Element String Pool Index from a token.
   1.128 -*/	
   1.129 -	RArray<TStringPoolTokenMapping>	iElementTokenToStringPoolIndex;
   1.130 -
   1.131 -/**
   1.132 -Array to obtain a Attribute Token from String Pool index.
   1.133 -*/	
   1.134 -	RArray<TInt>					iAttributeStringPoolIndexToToken;
   1.135 -
   1.136 -/**
   1.137 -Array to obtain a Attribute String Pool Index from a token.
   1.138 -*/	
   1.139 -	RArray<TStringPoolTokenMapping>	iAttributeTokenToStringPoolIndex;
   1.140 -
   1.141 -/**
   1.142 -Array to obtain a Value Token from String Pool index.
   1.143 -*/	
   1.144 -	RArray<TInt>					iValueStringPoolIndexToToken;
   1.145 -																		
   1.146 -/**
   1.147 -Array to obtain a Value String Pool Index from a token.
   1.148 -*/	
   1.149 -	RArray<TStringPoolTokenMapping>	iValueTokenToStringPoolIndex;
   1.150 -
   1.151 -
   1.152 -/**
   1.153 -The numeric codepage this object represents.
   1.154 -*/	
   1.155 -	TUint8							iCodePage;
   1.156 -
   1.157 -	};
   1.158 -
   1.159 -}
   1.160 -
   1.161 -#endif // __DICTIONARYCODEPAGE_H__