www.pudn.com > 2DGameAnimS60C_v1_0.zip > RenderableFactory.h


//////////////////////////////////////////////////////////////////////// 
// 
// RenderableFactory.h 
// 
// Copyright (c) 2003 Nokia Mobile Phones Ltd.  All rights reserved. 
// 
//////////////////////////////////////////////////////////////////////// 
 
#ifndef __RENDERABLEFACTORY_H 
#define __RENDERABLEFACTORY_H 
 
#include  
 
//////////////////////////////////////////////////////////////////////// 
 
class MRenderable  
	{ 
public:    
	virtual void Render(const TPoint& aOrigin,const TRect& aScreenRect,CFbsBitGc* aCallerGc) const = 0;		 
	}; 
 
//////////////////////////////////////////////////////////////////////// 
 
class CRenderable : public CBase, public MRenderable 
	{ 
public: 
	~CRenderable(){} 
 
public:    
	void Render(const TPoint& aOrigin,const TRect& aScreenRect,CFbsBitGc* aCallerGc) const = 0;		 
 
protected: 
	CRenderable(){} 
	}; 
 
//////////////////////////////////////////////////////////////////////// 
 
class CRenderableFactory : public CBase 
	{ 
public: 
	~CRenderableFactory(); 
 
public:    
	MRenderable* Renderable(int idx); 
 
protected: 
	void AllocRenderablesL(TInt aMaxRenderableCount); 
	void AddRenderable(CRenderable* aRenderable); 
	void FreeRenderables(); 
 
private: 
	CRenderable** iRenderables; 
	TInt iRenderableCount; 
	TInt iMaxRenderableCount; 
	}; 
 
//////////////////////////////////////////////////////////////////////// 
 
#endif