Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

Lamp::SimpleFramework Class Reference

シンプルフレームワーク More...

#include <SimpleFramework.h>

Inheritance diagram for Lamp::SimpleFramework:

Lamp::BasicFramework Lamp::SceneFramework List of all members.

Public Member Functions

 SimpleFramework (const String &name)
 コンストラクタ

virtual ~SimpleFramework ()
 デストラクタ

virtual int execute (HINSTANCE instance)
 実行


Static Public Member Functions

LRESULT CALLBACK registrationWindowProcedure (HWND windowHandle, u_int message, WPARAM wParam, LPARAM lParam)
 登録用ウィンドウプロシージャ


Protected Member Functions

virtual bool initialize ()
 初期化

virtual void finalize ()
 後始末

virtual void run ()
 実行

virtual void renderSetup ()
 レンダリング準備

virtual void render ()
 レンダリング

virtual bool frameworkInitialize (HINSTANCE instanceHandle)
 フレームワークの初期化

virtual int frameworkExecute ()
 フレームワークの実行

virtual void frameworkFinalize ()
 フレームワークの後始末

virtual void mainLoop ()
 メインループ

virtual void frameworkRun ()
 フレームワーク実行

virtual void frameworkRenderSetup ()
 フレームワークレンダリング準備

virtual bool frameworkPresentation ()
 フレームワークプレゼンテーション

virtual void frameworkRender ()
 フレームワークレンダリング

virtual LRESULT windowProcedure (HWND windowHandle, u_int message, WPARAM wParam, LPARAM lParam)
 ウィンドウプロシージャ

virtual LRESULT frameworkWindowProcedure (HWND windowHandle, u_int message, WPARAM wParam, LPARAM lParam)
 フレームワークウィンドウプロシージャ


Protected Attributes

String name_
 名前

HWND windowHandle_
 ウィンドウハンドル

WindowCreator::CreateParameter createWindowParameter_
 ウィンドウ作成パラメータ

DimensionI minimumWindowSize_
 ウィンドウ最小サイズ

Color4c backGroundColor_
 背景色

FPSControllerfpsController_
 FPSコントローラ.

Keyboardkeyboard_
 キーボード

Mousemouse_
 マウス

bool startFullscreen_
 フルスクリーンで開始するか


Static Protected Attributes

SimpleFrameworkinstance_ = NULL
 インスタンス


Detailed Description

シンプルフレームワーク

最低限必要な処理を詰め込んだ小さなフレームワーク。基本的にフレームワークはLampに とっつきやすくするため、用意されています(例えるならコード量の少ないd3dapp)。 ちゃんとしたアプリケーションを組む場合は、このフレームワークを参考にしてプログラム を1から書きはじめ、だんだん大きくしていけばよいでしょう。 その場合は空っぽのオーバライドメソッドをフレームワークメソッドと置き換えるように するとプログラムがシンプルになります。

Definition at line 50 of file SimpleFramework.h.


Constructor & Destructor Documentation

Lamp::SimpleFramework::SimpleFramework const String name  ) 
 

コンストラクタ

Parameters:
name アプリケーション名

Definition at line 42 of file SimpleFramework.cpp.

References backGroundColor_, fpsController_, keyboard_, minimumWindowSize_, mouse_, NULL, Lamp::Color4c::set(), Lamp::DimensionI::set(), startFullscreen_, and windowHandle_.


Member Function Documentation

int Lamp::SimpleFramework::execute HINSTANCE  instance  )  [virtual]
 

実行

Parameters:
instance インスタンスハンドル
Returns:
成功すれば0を返す

Definition at line 62 of file SimpleFramework.cpp.

References finalize(), frameworkExecute(), frameworkFinalize(), frameworkInitialize(), and initialize().

int Lamp::SimpleFramework::frameworkExecute  )  [protected, virtual]
 

フレームワークの実行

Returns:
実行結果。WinMainの返り値

Definition at line 138 of file SimpleFramework.cpp.

References mainLoop(), and NULL.

Referenced by execute().

bool Lamp::SimpleFramework::frameworkInitialize HINSTANCE  instanceHandle  )  [protected, virtual]
 

フレームワークの初期化

Parameters:
instanceHandle インスタンスハンドル
Returns:
初期化に成功すればtrueを返す

Reimplemented in Lamp::SceneFramework.

Definition at line 82 of file SimpleFramework.cpp.

References Assert, backGroundColor_, createWindowParameter_, instance_, Lamp::WindowCreator::CreateParameter::instanceHandle_, keyboard_, mouse_, name_, NULL, registrationWindowProcedure(), startFullscreen_, windowHandle_, Lamp::WindowCreator::CreateParameter::windowName_, and Lamp::WindowCreator::CreateParameter::windowProcedure_.

Referenced by execute().

bool Lamp::SimpleFramework::frameworkPresentation  )  [protected, virtual]
 

フレームワークプレゼンテーション

Returns:
デバイスがロストしていればtrue

Definition at line 203 of file SimpleFramework.cpp.

References fpsController_, and Lamp::FPSController::sleep().

Referenced by mainLoop(), and Lamp::BasicFramework::mainLoop().

LRESULT Lamp::SimpleFramework::frameworkWindowProcedure HWND  windowHandle,
u_int  message,
WPARAM  wParam,
LPARAM  lParam
[protected, virtual]
 

フレームワークウィンドウプロシージャ

Parameters:
windowHandle ウィンドウハンドル
message メッセージ
wParam wメッセージパラメータ
lParam lメッセージパラメータ
Returns:
メッセージを処理し、それ以上の処理が必要無いならば0以外を返す。

Definition at line 246 of file SimpleFramework.cpp.

References Lamp::DimensionI::height, minimumWindowSize_, and Lamp::DimensionI::width.

Referenced by registrationWindowProcedure().

virtual bool Lamp::SimpleFramework::initialize  )  [inline, protected, virtual]
 

初期化

Returns:
初期化に成功すればtrueを返す

Definition at line 81 of file SimpleFramework.h.

Referenced by execute().

LRESULT CALLBACK Lamp::SimpleFramework::registrationWindowProcedure HWND  windowHandle,
u_int  message,
WPARAM  wParam,
LPARAM  lParam
[static]
 

登録用ウィンドウプロシージャ

Parameters:
windowHandle ウィンドウハンドル
message メッセージ
wParam wメッセージパラメータ
lParam lメッセージパラメータ

Definition at line 224 of file SimpleFramework.cpp.

References frameworkWindowProcedure(), instance_, NULL, and windowProcedure().

Referenced by frameworkInitialize().

virtual LRESULT Lamp::SimpleFramework::windowProcedure HWND  windowHandle,
u_int  message,
WPARAM  wParam,
LPARAM  lParam
[inline, protected, virtual]
 

ウィンドウプロシージャ

Parameters:
windowHandle ウィンドウハンドル
message メッセージ
wParam wメッセージパラメータ
lParam lメッセージパラメータ
Returns:
メッセージを処理し、それ以上の処理が必要無いならば0以外を返す。

Definition at line 164 of file SimpleFramework.h.

Referenced by registrationWindowProcedure().


The documentation for this class was generated from the following files:
Generated on Wed Mar 16 10:29:51 2005 for Lamp by doxygen 1.3.2