sl@0: /*
sl@0: * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0: * All rights reserved.
sl@0: * This component and the accompanying materials are made available
sl@0: * under the terms of "Eclipse Public License v1.0"
sl@0: * which accompanies this distribution, and is available
sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0: *
sl@0: * Initial Contributors:
sl@0: * Nokia Corporation - initial contribution.
sl@0: *
sl@0: * Contributors:
sl@0: *
sl@0: * Description: 
sl@0: * Abstract base class from which all shapers drive.
sl@0: *
sl@0: */
sl@0: 
sl@0: 
sl@0: /**
sl@0:  @file 
sl@0:  @internalComponent
sl@0: */
sl@0: 
sl@0: // Symbian includes
sl@0: #include <openfont.h>
sl@0: 
sl@0: // ICU includes 
sl@0: #include "LETypes.h"
sl@0: #include "LayoutEngine.h"
sl@0: #include "SymbianFontInstance.h"
sl@0: #include "IcuLayoutEngine.h"
sl@0: #include <ecom/ecom.h>
sl@0: #include <ecom/implementationproxy.h>
sl@0: 
sl@0: 
sl@0: class CIcuShaperFactory: public CShaperFactory
sl@0: 	{
sl@0: public:
sl@0: 	static CIcuShaperFactory* NewL();
sl@0: 	virtual ~CIcuShaperFactory();
sl@0: 
sl@0:    /**
sl@0: 	Factory function to create an instance of shaper object
sl@0:     @param aBitmapFont The font that requires shaping
sl@0:     @param aScript Isic standard script code
sl@0:     @param aLanguage Isic standard language code
sl@0:     @param aHeap The heap to be used by the shaper
sl@0:     @return KErrNone if successful else a system wide error code
sl@0:     */
sl@0: 	virtual CShaper* NewShaperL(CBitmapFont* aBitmapFont, TInt aScript, TInt aLanguage, RHeap* aHeap);
sl@0: 
sl@0: private:
sl@0: 	CIcuShaperFactory();
sl@0: 
sl@0: 	};
sl@0: 
sl@0: 
sl@0: CIcuShaperFactory* CIcuShaperFactory::NewL()
sl@0: 	{
sl@0: 	CIcuShaperFactory* r = new(ELeave) CIcuShaperFactory;
sl@0: 	return r;
sl@0: 	}
sl@0: 
sl@0: CIcuShaperFactory::CIcuShaperFactory()
sl@0: 	{
sl@0: 	}
sl@0: 
sl@0: CIcuShaperFactory::~CIcuShaperFactory()
sl@0: 	{
sl@0: 	
sl@0: 	}
sl@0: 
sl@0: 
sl@0: CShaper* CIcuShaperFactory::NewShaperL(CBitmapFont* aBitmapFont, TInt aScript, TInt aLanguage, RHeap* aHeap)
sl@0: 	{
sl@0: 	return CIcuLayoutEngine::NewL(aBitmapFont, aScript, aLanguage, aHeap);
sl@0: 	} 
sl@0: 
sl@0: void* CShaperFactory::ExtendedInterface(TUid /*aInterfaceId*/)
sl@0: 	{
sl@0: 	return 0;
sl@0: 	}
sl@0: 
sl@0: // Exported proxy for instantiation method resolution
sl@0: // Define the interface UIDs
sl@0: const TImplementationProxy ImplementationTable[] = 
sl@0: 	{
sl@0: 		IMPLEMENTATION_PROXY_ENTRY(0x10279727,	CIcuShaperFactory::NewL)
sl@0: 	};
sl@0: 
sl@0: EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
sl@0: 	{
sl@0: 	aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
sl@0: 
sl@0: 	return ImplementationTable;
sl@0: 	}