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

# Lamp::InputDevice Class Reference

入力デバイス More...

`#include <InputDevice.h>`

Inheritance diagram for Lamp::InputDevice:

List of all members.

## Public Member Functions
| InputDevice (bool exclusive)
| コンストラクタ
virtual | ~InputDevice ()
| デストラクタ
virtual bool | initialize (DirectInputDevice *inputDevice, HWND windowHandle)
| 初期化
virtual bool | acquire ()
| アクセス権の取得
virtual void | unacquire ()
| アクセス権の解放
virtual bool | polling ()
| ポーリング
virtual bool | setCooperativeLevel (bool exclusive, bool foreground)
| 協調レベルの設定
virtual bool | isExclusive () const
| 排他モードか
virtual bool | isForeground () const
| フォアグラウンドモードか
virtual String | getProductName () const
| プロダクト名の取得
virtual String | getInstanceName () const
| インスタンス名の取得
virtual int | getAxisCount () const
| 軸数の取得
virtual int | getButtonCount () const
| ボタン数の取得
virtual int | getPOVCount () const
| 視点コントローラ数の取得
virtual bool | isAttached () const
| デバイスがアタッチされているか
virtual bool | isPolled () const
| ポーリングが必要か
virtual String | toString () const
| 文字列への変換
virtual String | getInputDeviceString () const
| 入力デバイス文字列の取得
## Protected Member Functions
virtual void | setExclusive (bool exclusive)
| 排他モードの設定
virtual void | setForeground (bool foreground)
| フォアグラウンドモードの設定
## Protected Attributes
DirectInputDevice * | inputDevice_
| 入力デバイス
HWND | windowHandle_
| ウィンドウハンドル

## Detailed Description

入力デバイス

Definition at line 34 of file InputDevice.h.

## Constructor & Destructor Documentation

Lamp::InputDevice::InputDevice | ( | bool | exclusive | ) | `[inline]`

  | コンストラクタ Parameters:
  exclusive | 排他モードならtrue
Definition at line 41 of file InputDevice.h. References inputDevice_, NULL, and windowHandle_.

## Member Function Documentation

virtual bool Lamp::InputDevice::acquire | ( |  | ) | `[inline, virtual]`

| アクセス権の取得 Returns: アクセス権の取得に成功すればtrue Definition at line 85 of file InputDevice.h. References Assert, DirectXSucceeded, ErrorOut, and inputDevice_. Referenced by Lamp::MouseDevice::polling(), Lamp::KeyboardDevice::polling(), Lamp::JoystickDevice::polling(), and setCooperativeLevel().

virtual int Lamp::InputDevice::getAxisCount | ( |  | ) | const`[inline, virtual]`

| 軸数の取得 Returns: 軸数 Definition at line 175 of file InputDevice.h. Referenced by Lamp::Joystick::getAxisCount(), Lamp::Joystick::getAxisCountWithoutSlider(), getInputDeviceString(), and Lamp::MouseDevice::initialize().

virtual int Lamp::InputDevice::getButtonCount | ( |  | ) | const`[inline, virtual]`

| ボタン数の取得 Returns: ボタン数 Definition at line 181 of file InputDevice.h. Referenced by Lamp::Mouse::getButtonCount(), Lamp::Joystick::getButtonCount(), getInputDeviceString(), and Lamp::Keyboard::getKeyCount().

virtual String Lamp::InputDevice::getInputDeviceString | ( |  | ) | const`[inline, virtual]`

| 入力デバイス文字列の取得 Returns: 入力デバイス文字列 Definition at line 216 of file InputDevice.h. References Assert, Lamp::String::format(), getAxisCount(), getButtonCount(), getInstanceName(), getPOVCount(), getProductName(), isAttached(), and isPolled(). Referenced by Lamp::MouseDevice::toString(), Lamp::KeyboardDevice::toString(), Lamp::JoystickDevice::toString(), and toString().

virtual String Lamp::InputDevice::getInstanceName | ( |  | ) | const`[inline, virtual]`

| インスタンス名の取得 Returns: インスタンス名 Definition at line 167 of file InputDevice.h. Referenced by getInputDeviceString().

virtual int Lamp::InputDevice::getPOVCount | ( |  | ) | const`[inline, virtual]`

| 視点コントローラ数の取得 Returns: 視点コントローラ数 Reimplemented in Lamp::JoystickDevice. Definition at line 187 of file InputDevice.h. Referenced by getInputDeviceString().

virtual String Lamp::InputDevice::getProductName | ( |  | ) | const`[inline, virtual]`

| プロダクト名の取得 Returns: プロダクト名 Definition at line 159 of file InputDevice.h. Referenced by getInputDeviceString(), Lamp::Mouse::getName(), Lamp::Keyboard::getName(), and Lamp::Joystick::getName().

virtual bool Lamp::InputDevice::initialize | ( | DirectInputDevice * | inputDevice,
|  | HWND | windowHandle
| ) | `[inline, virtual]`

  | 初期化 Parameters:
  inputDevice | 入力デバイス
  windowHandle | ウィンドウハンドル
Returns: 成功すればtrue Reimplemented in Lamp::JoystickDevice, Lamp::KeyboardDevice, and Lamp::MouseDevice. Definition at line 57 of file InputDevice.h. References Assert, DirectXFailed, ErrorOut, inputDevice_, NULL, and windowHandle_.

virtual bool Lamp::InputDevice::isAttached | ( |  | ) | const`[inline, virtual]`

| デバイスがアタッチされているか Returns: デバイスがアタッチされていればtrue Definition at line 193 of file InputDevice.h. Referenced by getInputDeviceString(), Lamp::MouseDevice::initialize(), Lamp::Mouse::isAttached(), Lamp::Keyboard::isAttached(), and Lamp::Joystick::isAttached().

virtual bool Lamp::InputDevice::isExclusive | ( |  | ) | const`[inline, virtual]`

| 排他モードか Returns: 排他モードならtrue Definition at line 146 of file InputDevice.h. Referenced by Lamp::MouseDevice::initialize(), Lamp::KeyboardDevice::initialize(), Lamp::JoystickDevice::initialize(), Lamp::Mouse::isExclusive(), Lamp::Keyboard::isExclusive(), and Lamp::Joystick::isExclusive().

virtual bool Lamp::InputDevice::isForeground | ( |  | ) | const`[inline, virtual]`

| フォアグラウンドモードか Returns: フォアグラウンドモードならtrue、バックグラウンドモードならfalse Definition at line 152 of file InputDevice.h. Referenced by Lamp::MouseDevice::initialize(), Lamp::KeyboardDevice::initialize(), Lamp::JoystickDevice::initialize(), Lamp::Mouse::isForeground(), Lamp::Keyboard::isForeground(), and Lamp::Joystick::isForeground().

virtual bool Lamp::InputDevice::isPolled | ( |  | ) | const`[inline, virtual]`

| ポーリングが必要か Returns: ポーリングが必要ならtrue Definition at line 201 of file InputDevice.h. Referenced by getInputDeviceString(), Lamp::Mouse::isPolled(), Lamp::Keyboard::isPolled(), Lamp::Joystick::isPolled(), and polling().

virtual bool Lamp::InputDevice::polling | ( |  | ) | `[inline, virtual]`

| ポーリング Returns: ポーリングが正常であればtrue Reimplemented in Lamp::JoystickDevice, Lamp::KeyboardDevice, and Lamp::MouseDevice. Definition at line 108 of file InputDevice.h. References inputDevice_, and isPolled().

virtual bool Lamp::InputDevice::setCooperativeLevel | ( | bool | exclusive,
|  | bool | foreground
| ) | `[inline, virtual]`

  | 協調レベルの設定 Parameters:
  exclusive | 排他モードならtrue
  foreground | フォアグラウンドモードならtrue
Returns: 成功すればtrue Reimplemented in Lamp::KeyboardDevice, and Lamp::MouseDevice. Definition at line 120 of file InputDevice.h. References acquire(), DirectXFailed, ErrorOut, inputDevice_, NULL, u_int, unacquire(), and windowHandle_. Referenced by Lamp::JoystickDevice::initialize(), and Lamp::Joystick::setCooperativeLevel().

virtual void Lamp::InputDevice::setExclusive | ( | bool | exclusive | ) | `[inline, protected, virtual]`

  | 排他モードの設定 Parameters:
  exclusive | 排他モードならtrue
Definition at line 234 of file InputDevice.h.

virtual void Lamp::InputDevice::setForeground | ( | bool | foreground | ) | `[inline, protected, virtual]`

  | フォアグラウンドモードの設定 Parameters:
  foreground | フォアグラウンドモードならtrue バックグラウンドモードならfalse
Definition at line 241 of file InputDevice.h.

virtual String Lamp::InputDevice::toString | ( |  | ) | const`[inline, virtual]`

| 文字列への変換 Returns: 文字列 Reimplemented in Lamp::JoystickDevice, Lamp::KeyboardDevice, and Lamp::MouseDevice. Definition at line 210 of file InputDevice.h. References getInputDeviceString().

The documentation for this class was generated from the following file:

- InputDevice.h