bintools/rcomp/inc/LINKARRA.H
author Dean Draper <dean.draper@nokia.com>
Mon, 29 Mar 2010 09:55:24 +0100
branchfix
changeset 413 5eb26ea9cb49
parent 0 044383f39525
permissions -rw-r--r--
Release note: SF bug 2134 Raptor does not pass overridden make variables into its makefiles

/*
* Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of the License "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: 
*
*/


#include "ARRAY.H"  
#include "ASTRING.H"

class RCBinaryStream;
class ResourceDataStream;

class LinkItem : public ArrayItem
	{
public:
	LinkItem(ResourceDataStream& aStream,const String& aResourceName,const String& aFileName,int aLineNumber);
	virtual void OverwriteLink(RCBinaryStream& os) const=0;
	virtual ostream& StreamOut(ostream& os)=0;
public:
	String iResourceName;	// Name of resource to which link points.
	unsigned long iStreamPosition;
	String iFileName;
	int iLineNumber;
	};

class LinkArray : public Array
	{
	friend ostream& operator<<(ostream& os,LinkArray& o);
public:
	LinkArray();
	~LinkArray();
	void Add(LinkItem* aNewItem);
	void OverwriteLinks ( RCBinaryStream & os ) const;
private:
	static int iInUse;	// Only one instance of this class may exist at a time.
	};

class WordLink : public LinkItem
	{
public:
	WordLink(ResourceDataStream& aStream,const String& aResourceName,const String& aFileName,int aLineNumber);
	virtual void OverwriteLink(RCBinaryStream& os) const;
	virtual ostream& StreamOut(ostream& os);
	static int NumberOfBytesOccupiesInStream();
	};

class LongLink : public LinkItem
	{
public:
	LongLink(ResourceDataStream& aStream,const String& aResourceName,const String& aFileName,int aLineNumber);
	virtual void OverwriteLink(RCBinaryStream& os) const;
	virtual ostream& StreamOut(ostream& os);
	static int NumberOfBytesOccupiesInStream();
	};

class LinkArrayIterator : public ArrayIterator
	{
public:
	LinkArrayIterator(const LinkArray& aArray);
	LinkItem* operator()();
	};