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

Lamp::KeyboardState Class Reference

キーボードステート More...

#include <KeyboardState.h>

Inheritance diagram for Lamp::KeyboardState:

Lamp::KeyboardKey List of all members.

Public Member Functions

 KeyboardState ()
 コンストラクタ

virtual ~KeyboardState ()
 デストラクタ

virtual void clear ()
 クリア

virtual void setKeyPressed (Key key, bool pressed)
 キーの設定

virtual bool keyPressed (Key key) const
 キーが押されているか

virtual String toString () const
 文字列への変換

virtual void writeBinary (BinaryWriter *binaryWriter) const
 バイナリ書き出し

virtual void readBinary (BinaryReader *binaryReader)
 バイナリ読み込み


Detailed Description

キーボードステート

Definition at line 39 of file KeyboardState.h.


Member Function Documentation

virtual bool Lamp::KeyboardState::keyPressed Key  key  )  const [inline, virtual]
 

キーが押されているか

Parameters:
key 対象キー
Returns:
キーが押されていればtrue

Definition at line 74 of file KeyboardState.h.

References Assert, and Lamp::KeyboardKey::maxKeyCount.

Referenced by Lamp::Keyboard::down(), Lamp::Keyboard::pressed(), toString(), Lamp::Keyboard::up(), and writeBinary().

void Lamp::KeyboardState::readBinary BinaryReader binaryReader  )  [virtual]
 

バイナリ読み込み

Parameters:
binaryReader バイナリリーダ

Definition at line 46 of file KeyboardState.cpp.

References Lamp::KeyboardKey::Key, Lamp::KeyboardKey::maxKeyCount, Lamp::BinaryReader::readUChar(), setKeyPressed(), and u_char.

virtual void Lamp::KeyboardState::setKeyPressed Key  key,
bool  pressed
[inline, virtual]
 

キーの設定

Parameters:
key 対象キー
pressed trueなら押されている

Definition at line 64 of file KeyboardState.h.

References Assert, and Lamp::KeyboardKey::maxKeyCount.

Referenced by Lamp::KeyboardDevice::polling(), and readBinary().

virtual String Lamp::KeyboardState::toString  )  const [inline, virtual]
 

文字列への変換

Returns:
文字列

Definition at line 84 of file KeyboardState.h.

References Lamp::KeyboardKey::Key, keyPressed(), Lamp::KeyboardKey::keyToString(), and Lamp::KeyboardKey::maxKeyCount.

Referenced by Lamp::KeyboardDevice::toString().

void Lamp::KeyboardState::writeBinary BinaryWriter binaryWriter  )  const [virtual]
 

バイナリ書き出し

Parameters:
binaryWriter バイナリライタ

Definition at line 34 of file KeyboardState.cpp.

References Lamp::KeyboardKey::Key, keyPressed(), Lamp::KeyboardKey::maxKeyCount, u_char, and Lamp::BinaryWriter::writeUChar().


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