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

Lamp::BitSet< Type > Class Template Reference

ビットセット More...

#include <BitSet.h>

List of all members.

Public Member Functions

 BitSet ()
 コンストラクタ

 BitSet (const Type &bits)
 コンストラクタ

 ~BitSet ()
 デストラクタ

int getLength () const
 長さの取得

void clear ()
 クリア

void setBits (Type bits)
 ビット列の設定

Type getBits () const
 ビット列の取得

const BitSetnot ()
 補数

const BitSetonAllBits ()
 全てのビットをONにする

const BitSetoffAllBits ()
 全てのビットをOFFにする

const BitSetsetAllBits (bool flag)
 全てのビットを設定する

const BitSetand (const BitSet &bitSet)
 論理積

const BitSetor (const BitSet &bitSet)
 論理和

const BitSetxor (const BitSet &bitSet)
 排他的論理和

const BitSetonBit (const BitSet &bitSet)
 ビットをONにする

const BitSetoffBit (const BitSet &bitSet)
 ビットをOFFにする

const BitSetsetBit (const BitSet &bitSet, bool flag)
 ビットの設定

bool getBit (const BitSet &bitSet) const
 ビットの取得

const BitSetand (Type bits)
 論理積

const BitSetor (Type bits)
 論理和

const BitSetxor (Type bits)
 排他的論理和

const BitSetonBit (Type bits)
 ビットをONにする

const BitSetoffBit (Type bits)
 ビットをOFFにする

const BitSetsetBit (Type bits, bool flag)
 ビットの設定

bool getBit (Type bits) const
 ビットの取得

const BitSetonIndexedBit (int index)
 インデックスビットをONにする

const BitSetoffIndexedBit (int index)
 インデックスビットをOFFにする

const BitSetsetIndexedBit (int index, bool flag)
 インデックスビットの設定

bool getIndexedBit (int index) const
 インデックスビットの取得

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


Detailed Description

template<typename Type>
class Lamp::BitSet< Type >

ビットセット

テンプレートの型にu_char, u_short, u_int等を使用してください。 このクラスは継承しないで下さい。

Definition at line 38 of file BitSet.h.


Constructor & Destructor Documentation

template<typename Type>
Lamp::BitSet< Type >::BitSet const Type &  bits  )  [inline]
 

コンストラクタ

Parameters:
bits ビット列

Definition at line 50 of file BitSet.h.


Member Function Documentation

template<typename Type>
const BitSet& Lamp::BitSet< Type >::and Type  bits  )  [inline]
 

論理積

Parameters:
bits 論理積をとるビット列
Returns:
ビットセット

Definition at line 206 of file BitSet.h.

template<typename Type>
const BitSet& Lamp::BitSet< Type >::and const BitSet< Type > &  bitSet  )  [inline]
 

論理積

Parameters:
bitSet 論理積をとるビットセット
Returns:
ビットセット

Definition at line 132 of file BitSet.h.

References Lamp::BitSet< Type >::bits_.

template<typename Type>
bool Lamp::BitSet< Type >::getBit Type  bits  )  const [inline]
 

ビットの取得

Parameters:
bits ビットを取得するビット列
Returns:
ビットがすべてONならばtrue

Definition at line 268 of file BitSet.h.

template<typename Type>
bool Lamp::BitSet< Type >::getBit const BitSet< Type > &  bitSet  )  const [inline]
 

ビットの取得

Parameters:
bitSet ビットを取得するビットセット
Returns:
ビットがすべてONならばtrue

Definition at line 194 of file BitSet.h.

References Lamp::BitSet< Type >::bits_.

template<typename Type>
Type Lamp::BitSet< Type >::getBits  )  const [inline]
 

ビット列の取得

Returns:
ビット列

Definition at line 80 of file BitSet.h.

Referenced by Lamp::MouseState::writeBinary(), and Lamp::JoystickState::writeBinary().

template<typename Type>
bool Lamp::BitSet< Type >::getIndexedBit int  index  )  const [inline]
 

インデックスビットの取得

Parameters:
index ビットのインデックス
Returns:
インデックスのビットが立っていればtrue

Definition at line 311 of file BitSet.h.

References Assert, and Lamp::BitSet< Type >::getLength().

Referenced by Lamp::MouseState::readBinary(), Lamp::JoystickState::readBinary(), and Lamp::BitSet< Type >::toString().

template<typename Type>
int Lamp::BitSet< Type >::getLength  )  const [inline]
 

長さの取得

Returns:
長さ

Definition at line 62 of file BitSet.h.

Referenced by Lamp::BitSet< Type >::getIndexedBit(), Lamp::BitSet< Type >::offIndexedBit(), Lamp::BitSet< Type >::onIndexedBit(), and Lamp::BitSet< Type >::toString().

template<typename Type>
const BitSet& Lamp::BitSet< Type >::not  )  [inline]
 

補数

Returns:
ビットセット

Definition at line 89 of file BitSet.h.

template<typename Type>
const BitSet& Lamp::BitSet< Type >::offAllBits  )  [inline]
 

全てのビットをOFFにする

Returns:
ビットセット

Definition at line 108 of file BitSet.h.

Referenced by Lamp::BitSet< Type >::setAllBits().

template<typename Type>
const BitSet& Lamp::BitSet< Type >::offBit Type  bits  )  [inline]
 

ビットをOFFにする

Parameters:
bits 設定するビット列
Returns:
ビットセット

Definition at line 246 of file BitSet.h.

template<typename Type>
const BitSet& Lamp::BitSet< Type >::offBit const BitSet< Type > &  bitSet  )  [inline]
 

ビットをOFFにする

Parameters:
bitSet 設定するビットセット
Returns:
ビットセット

Definition at line 172 of file BitSet.h.

References Lamp::BitSet< Type >::bits_.

Referenced by Lamp::BitSet< Type >::setBit().

template<typename Type>
const BitSet& Lamp::BitSet< Type >::offIndexedBit int  index  )  [inline]
 

インデックスビットをOFFにする

Parameters:
index ビットのインデックス

Definition at line 289 of file BitSet.h.

References Assert, and Lamp::BitSet< Type >::getLength().

Referenced by Lamp::BitSet< Type >::setIndexedBit().

template<typename Type>
const BitSet& Lamp::BitSet< Type >::onAllBits  )  [inline]
 

全てのビットをONにする

Returns:
ビットセット

Definition at line 98 of file BitSet.h.

Referenced by Lamp::BitSet< Type >::setAllBits().

template<typename Type>
const BitSet& Lamp::BitSet< Type >::onBit Type  bits  )  [inline]
 

ビットをONにする

Parameters:
bits 設定するビット列
Returns:
ビットセット

Definition at line 236 of file BitSet.h.

template<typename Type>
const BitSet& Lamp::BitSet< Type >::onBit const BitSet< Type > &  bitSet  )  [inline]
 

ビットをONにする

Parameters:
bitSet 設定するビットセット
Returns:
ビットセット

Definition at line 162 of file BitSet.h.

References Lamp::BitSet< Type >::bits_.

Referenced by Lamp::BitSet< Type >::setBit().

template<typename Type>
const BitSet& Lamp::BitSet< Type >::onIndexedBit int  index  )  [inline]
 

インデックスビットをONにする

Parameters:
index ビットのインデックス

Definition at line 279 of file BitSet.h.

References Assert, and Lamp::BitSet< Type >::getLength().

Referenced by Lamp::BitSet< Type >::setIndexedBit().

template<typename Type>
const BitSet& Lamp::BitSet< Type >::or Type  bits  )  [inline]
 

論理和

Parameters:
bits 論理和をとるビット列
Returns:
ビットセット

Definition at line 216 of file BitSet.h.

template<typename Type>
const BitSet& Lamp::BitSet< Type >::or const BitSet< Type > &  bitSet  )  [inline]
 

論理和

Parameters:
bitSet 論理和をとるビットセット
Returns:
ビットセット

Definition at line 142 of file BitSet.h.

References Lamp::BitSet< Type >::bits_.

template<typename Type>
const BitSet& Lamp::BitSet< Type >::setAllBits bool  flag  )  [inline]
 

全てのビットを設定する

Parameters:
flag trueならビットをONにします
Returns:
ビットセット

Definition at line 118 of file BitSet.h.

References Lamp::BitSet< Type >::offAllBits(), and Lamp::BitSet< Type >::onAllBits().

template<typename Type>
const BitSet& Lamp::BitSet< Type >::setBit Type  bits,
bool  flag
[inline]
 

ビットの設定

Parameters:
bits ビットを設定するビット列
flag trueならビットをONにします
Returns:
ビットセット

Definition at line 257 of file BitSet.h.

References Lamp::BitSet< Type >::offBit(), and Lamp::BitSet< Type >::onBit().

template<typename Type>
const BitSet& Lamp::BitSet< Type >::setBit const BitSet< Type > &  bitSet,
bool  flag
[inline]
 

ビットの設定

Parameters:
bitSet ビットを設定するビットセット
flag trueならビットをONにします
Returns:
ビットセット

Definition at line 183 of file BitSet.h.

References Lamp::BitSet< Type >::offBit(), and Lamp::BitSet< Type >::onBit().

template<typename Type>
void Lamp::BitSet< Type >::setBits Type  bits  )  [inline]
 

ビット列の設定

Parameters:
bits ビット列

Definition at line 74 of file BitSet.h.

template<typename Type>
const BitSet& Lamp::BitSet< Type >::setIndexedBit int  index,
bool  flag
[inline]
 

インデックスビットの設定

Parameters:
index ビットのインデックス
flag trueならビットをONにします

Definition at line 300 of file BitSet.h.

References Lamp::BitSet< Type >::offIndexedBit(), and Lamp::BitSet< Type >::onIndexedBit().

Referenced by Lamp::MouseState::writeBinary(), and Lamp::JoystickState::writeBinary().

template<typename Type>
String Lamp::BitSet< Type >::toString  )  const [inline]
 

文字列への変換

Returns:
文字列

Definition at line 321 of file BitSet.h.

References Lamp::BitSet< Type >::getIndexedBit(), and Lamp::BitSet< Type >::getLength().

template<typename Type>
const BitSet& Lamp::BitSet< Type >::xor Type  bits  )  [inline]
 

排他的論理和

Parameters:
bits 排他的論理和をとるビット列
Returns:
ビットセット

Definition at line 226 of file BitSet.h.

template<typename Type>
const BitSet& Lamp::BitSet< Type >::xor const BitSet< Type > &  bitSet  )  [inline]
 

排他的論理和

Parameters:
bitSet 排他的論理和をとるビットセット
Returns:
ビットセット

Definition at line 152 of file BitSet.h.

References Lamp::BitSet< Type >::bits_.


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