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

Lamp::LampInput Class Reference

Lamp入力. More...

#include <LampInput.h>

List of all members.

Public Types

enum  InputMode { modePolling, modeBuffering }
 入力モード


Static Public Member Functions

bool initialize (HINSTANCE instanceHandle, HWND windowHandle, InputMode inputMode=modeBuffering)
 初期化

void finalize ()
 後始末

void clear ()
 クリア 現在の入力をクリアします

void bufferClear ()
 バッファクリア バッファと現在の入力をクリアします

void setInputMode (InputMode inputMode)
 入力モードの設定

InputMode getInputMode ()
 入力モードの取得

bool polling ()
 ポーリング

bool hasMoreInput ()
 入力があるか

void waitForInput ()
 入力を待つ

void nextInput ()
 次の入力

int getInputCount ()
 入力数の取得

void startLogging (const String &filePath="LampInputLog.log")
 ログ取得の開始

void startLogging (BinaryWriter *binaryWriter)
 ログ取得の開始

void endLogging ()
 ログ取得の終了

bool isLogging ()
 ログ取得中かどうか

void playLog (const String &filePath="LampInputLog.log")
 ログ再生の開始

void playLog (BinaryReader *binaryReader)
 ログ再生の開始

void stopLog ()
 ログ再生の停止

bool isLogPlaying ()
 ログ再生中かどうか

KeyboardgetKeyboard ()
 キーボードの取得

KeyboardDevicegetKeyboardDevice ()
 キーボードデバイスの取得

MousegetMouse ()
 マウスの取得

MouseDevicegetMouseDevice ()
 マウスデバイスの取得

int getJoystickCount ()
 ジョイスティック数の取得

JoystickgetJoystick (int index)
 ジョイスティックの取得

int getJoystickDeviceCount ()
 ジョイスティックデバイス数の取得

JoystickDevicegetJoystickDevice (int index)
 ジョイスティックデバイスの取得

int __stdcall joystickEnumeration (const DIDEVICEINSTANCE *instance, void *userData)
 ジョイスティックの列挙コールバック


Friends

class LampCore


Detailed Description

Lamp入力.

Definition at line 46 of file LampInput.h.


Member Function Documentation

int Lamp::LampInput::getInputCount  )  [static]
 

入力数の取得

Returns:
入力数

Definition at line 339 of file LampInput.cpp.

References Assert, and Lamp::BufferedInput::getInputCount().

InputMode Lamp::LampInput::getInputMode  )  [inline, static]
 

入力モードの取得

Returns:
入力モード

Definition at line 98 of file LampInput.h.

References InputMode.

Referenced by endLogging(), startLogging(), and stopLog().

Joystick* Lamp::LampInput::getJoystick int  index  )  [inline, static]
 

ジョイスティックの取得

Parameters:
index ジョイスティックインデックス
Returns:
ジョイスティック

Definition at line 226 of file LampInput.h.

int Lamp::LampInput::getJoystickCount  )  [inline, static]
 

ジョイスティック数の取得

Returns:
ジョイスティック数

Definition at line 219 of file LampInput.h.

References Lamp::ArrayList< Joystick * >::getCount().

Referenced by playLog(), and startLogging().

JoystickDevice* Lamp::LampInput::getJoystickDevice int  index  )  [inline, static]
 

ジョイスティックデバイスの取得

Parameters:
index ジョイスティックデバイスインデックス
Returns:
ジョイスティックデバイス

Definition at line 239 of file LampInput.h.

int Lamp::LampInput::getJoystickDeviceCount  )  [inline, static]
 

ジョイスティックデバイス数の取得

Returns:
ジョイスティックデバイス数

Definition at line 232 of file LampInput.h.

References Lamp::ArrayList< JoystickDevice * >::getCount().

Keyboard* Lamp::LampInput::getKeyboard  )  [inline, static]
 

キーボードの取得

Returns:
キーボード

Definition at line 193 of file LampInput.h.

KeyboardDevice* Lamp::LampInput::getKeyboardDevice  )  [inline, static]
 

キーボードデバイスの取得

Returns:
キーボードデバイス

Definition at line 199 of file LampInput.h.

Mouse* Lamp::LampInput::getMouse  )  [inline, static]
 

マウスの取得

Returns:
マウス

Definition at line 206 of file LampInput.h.

MouseDevice* Lamp::LampInput::getMouseDevice  )  [inline, static]
 

マウスデバイスの取得

Returns:
マウスデバイス

Definition at line 212 of file LampInput.h.

bool Lamp::LampInput::hasMoreInput  )  [static]
 

入力があるか

Returns:
入力があればtrue

Definition at line 317 of file LampInput.cpp.

References Assert, and Lamp::BufferedInput::hasMoreInput().

Referenced by waitForInput().

bool Lamp::LampInput::initialize HINSTANCE  instanceHandle,
HWND  windowHandle,
InputMode  inputMode = modeBuffering
[static]
 

初期化

Parameters:
instanceHandle インスタンスハンドル
windowHandle ウィンドウハンドル
inputMode 入力モード
Returns:
初期化に成功すればtrue

Definition at line 82 of file LampInput.cpp.

References Assert, DIRECTINPUT_VERSION, DirectInputCreate, DirectInputDevice, DirectInputDeviceClass_GameController, DirectInputInterfaceID, DirectXFailed, ErrorOut, Lamp::MouseDevice::initialize(), Lamp::KeyboardDevice::initialize(), joystickEnumeration(), NULL, and setInputMode().

bool Lamp::LampInput::isLogging  )  [inline, static]
 

ログ取得中かどうか

Returns:
ログ取得中ならtrue

Definition at line 158 of file LampInput.h.

Referenced by finalize(), and setInputMode().

bool Lamp::LampInput::isLogPlaying  )  [inline, static]
 

ログ再生中かどうか

Returns:
ログ再生中ならtrue

Definition at line 184 of file LampInput.h.

Referenced by finalize(), and setInputMode().

int __stdcall Lamp::LampInput::joystickEnumeration const DIDEVICEINSTANCE *  instance,
void *  userData
[static]
 

ジョイスティックの列挙コールバック

ユーザはこのメソッドを呼び出さないで下さい

Parameters:
instance デバイスインスタンス
userData ユーザデータ
Returns:
列挙継続フラグ

Definition at line 135 of file LampInput.cpp.

References Lamp::ArrayList< Joystick * >::add(), Lamp::ArrayList< JoystickDevice * >::add(), DirectInputDevice, DirectXFailed, ErrorOut, Lamp::JoystickDevice::initialize(), and NULL.

Referenced by initialize().

void Lamp::LampInput::playLog BinaryReader binaryReader  )  [static]
 

ログ再生の開始

Parameters:
binaryReader バイナリリーダ

Definition at line 389 of file LampInput.cpp.

References Assert, Lamp::String::equals(), ErrorOut, getJoystickCount(), InputMode, NULL, Lamp::BufferedInput::playLog(), Lamp::BinaryReader::readInt(), Lamp::BinaryReader::readString(), and setInputMode().

void Lamp::LampInput::playLog const String filePath = "LampInputLog.log"  )  [static]
 

ログ再生の開始

Parameters:
filePath ファイルパス

Definition at line 382 of file LampInput.cpp.

References Assert, and NULL.

bool Lamp::LampInput::polling  )  [static]
 

ポーリング

Returns:
ポーリングが正常であればtrue

Definition at line 218 of file LampInput.cpp.

References Assert.

void Lamp::LampInput::setInputMode InputMode  inputMode  )  [static]
 

入力モードの設定

Parameters:
inputMode 入力モード

Definition at line 203 of file LampInput.cpp.

References Assert, isLogging(), and isLogPlaying().

Referenced by initialize(), and playLog().

void Lamp::LampInput::startLogging BinaryWriter binaryWriter  )  [static]
 

ログ取得の開始

Parameters:
binaryWriter バイナリライタ

Definition at line 355 of file LampInput.cpp.

References Assert, getInputMode(), getJoystickCount(), InputMode, NULL, Lamp::BufferedInput::startLogging(), Lamp::BinaryWriter::writeInt(), and Lamp::BinaryWriter::writeString().

void Lamp::LampInput::startLogging const String filePath = "LampInputLog.log"  )  [static]
 

ログ取得の開始

Parameters:
filePath ファイルパス

Definition at line 348 of file LampInput.cpp.

References Assert, and NULL.


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