reszip/inc/resdict.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Wed, 31 Mar 2010 23:10:55 +0300
branchRCL_3
changeset 9 7c80ebddf816
parent 0 f58d6ec98e88
child 18 44d14dfed84d
permissions -rw-r--r--
Revision: 201011 Kit: 201013

/*
* Copyright (c) 1997-1999 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:
*
*/



#if !defined(__RESDICT_H__)
#define __RESDICT_H__

#include <e32base.h>

const TInt KMaxDictEntry = 80;

class CResEntry;
class CDictArray;
class TBitWriter;


class TDictEntry
	{
public:
	TDictEntry();
	void Close();
	TInt Saved();
	TDesC8& Data();
	TInt Use();
	void CreateEmbeddedDictL(TInt aDictIndex,CDictArray* aDict);
public:
	TBufC8<KMaxDictEntry> iData;
	TInt iUses;
	TInt iRef;
	CResEntry* iEmbedded;
	};


class CDictArray : public CArrayFixFlat<TDictEntry>
	{
public:
	CDictArray();
	~CDictArray();
	TInt AddEntryL(TDesC8& aEntry);
	void OrderedInsertL(TDictEntry& aEntry);
	void SizedInsertL(TDictEntry& aEntry);
	TInt DictionarySize();
	TInt DictionarySizeWithoutIndex();
	TInt BitSize(TInt aIndex);
	void WriteBitStreamL(TInt aIndex, TBitWriter& aWriter);
	CDictArray* DuplicateL();
public:
	TInt iDictionaryBits;
	};


#endif