NovelPlayer実装例
以下に、NovelPlayerの具象化クラスを擬似コードで示します。
class NovelPlayerImpl : public NovelPlayer{
public:
//コンストラクタ
NovelPlayerImpl(HWND hWnd, BaseTextStream* Text, BaseInputManager* Input, BaseSoundManager* Sound, BaseDrawManager* Graphic, unsigned int InitFlag) : m_HWND(hWnd), NovelPlayer(Text, Input, Sound, Graphic, InitFlag) {
}
//ウインドウハンドルを取得
HWND GetMyAppHWND() const{
return(m_HWND);
}
protected:
//アプリケーションを終了
void _EndApp(){
DestroyWindow(m_HWND);
}
private:
HWND m_HWND; //ウインドウハンドル
NovelPlayerImpl(const NovelPlayerImpl&); //コピーコンストラクタ(禁止)
NovelPlayerImpl& operator =(const NovelPlayerImpl&); //代入演算子(禁止)
};