renderablefactory.h
来自「symbian系统上的2D图形游戏」· C头文件 代码 · 共 61 行
H
61 行
////////////////////////////////////////////////////////////////////////
//
// RenderableFactory.h
//
// Copyright (c) 2003 Nokia Mobile Phones Ltd. All rights reserved.
//
////////////////////////////////////////////////////////////////////////
#ifndef __RENDERABLEFACTORY_H
#define __RENDERABLEFACTORY_H
#include <coeccntx.h>
////////////////////////////////////////////////////////////////////////
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
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?