My Project
osl::PieceMask Class Reference

駒番号のビットセット. More...

#include <pieceMask.h>

Inheritance diagram for osl::PieceMask:
osl::container::PieceMask64 osl::effect::NumBitmapEffect

Public Member Functions

 PieceMask ()
 
 PieceMask (const PieceMaskBase &base)
 
void setMask (int index, mask_t val)
 
void xorMask (int index, mask_t val)
 
void orMask (int index, mask_t val)
 
bool test (int num) const
 
void set (int num)
 
void flip (int num)
 
void reset (int num)
 
bool any () const
 
const mask_t getMask (int num) const
 
template<Ptype PTYPE>
const mask_t getMask () const
 unpromote(PTYPE) の駒のbit を*含む*mask_tを取り出す
 
template<Ptype PTYPE>
const mask_t selectBit () const
 unpromote(PTYPE) の駒のbit だけ取り出す
 
template<Ptype PTYPE>
void clearBit ()
 unpromote(PTYPE) の駒のbit を消す
 
template<Ptype PTYPE>
void setBit ()
 unpromote(PTYPE) の駒のbit を立てる
 
- Public Member Functions inherited from osl::container::PieceMask64
 PieceMask64 ()
 
 PieceMask64 (misc::Mask64 const &m)
 
const misc::Mask64getMask (int) const
 
void resetAll ()
 
void setAll ()
 
PieceMask64operator^= (const PieceMask64 &o)
 
PieceMask64operator&= (const PieceMask64 &o)
 
PieceMask64operator|= (const PieceMask64 &o)
 
PieceMask64operator-= (const PieceMask64 &o)
 
PieceMask64operator+= (const PieceMask64 &o)
 
bool none () const
 
bool hasMultipleBit () const
 
int countBit2 () const
 bit の数を2まで数える
 
int countBit () const
 
int takeOneBit ()
 

Static Public Member Functions

static const mask_t numToMask (int num)
 
- Static Public Member Functions inherited from osl::container::PieceMask64
static int numToIndex (int)
 
static int numToOffset (int num)
 

Private Member Functions

mask_tmutableMaskNum (int num)
 
const mask_t getMaskNum (int num) const
 

Additional Inherited Members

- Protected Member Functions inherited from osl::container::PieceMask64
misc::Mask64mutableMask (int)
 
- Protected Attributes inherited from osl::container::PieceMask64
Mask64 mask
 

Detailed Description

駒番号のビットセット.

64bitのMask64を一つもしくは,32bitのMask32を2枚で表現する. 各メソッドの変数名は num は駒番号に, index はマスクのID(0-1)に用いられている.

Definition at line 20 of file pieceMask.h.

Constructor & Destructor Documentation

◆ PieceMask() [1/2]

osl::PieceMask::PieceMask ( )
inline

Definition at line 23 of file pieceMask.h.

◆ PieceMask() [2/2]

osl::PieceMask::PieceMask ( const PieceMaskBase & base)
inline

Definition at line 24 of file pieceMask.h.

Member Function Documentation

◆ any()

◆ clearBit()

◆ flip()

void osl::PieceMask::flip ( int num)
inline

◆ getMask() [1/2]

template<Ptype PTYPE>
const mask_t osl::PieceMask::getMask ( ) const
inline

unpromote(PTYPE) の駒のbit を*含む*mask_tを取り出す

Definition at line 62 of file pieceMask.h.

References getMask().

Referenced by osl::effect::NumBitmapEffect::countEffect(), getMask(), getMaskNum(), osl::effect::NumBitmapEffect::hasAny(), selectBit(), and osl::effect::NumBitmapEffect::selectLong().

◆ getMask() [2/2]

◆ getMaskNum()

const mask_t osl::PieceMask::getMaskNum ( int num) const
inlineprivate

Definition at line 35 of file pieceMask.h.

References getMask(), and osl::container::PieceMask64::numToIndex().

Referenced by test().

◆ mutableMaskNum()

mask_t & osl::PieceMask::mutableMaskNum ( int num)
inlineprivate

◆ numToMask()

◆ orMask()

◆ reset()

◆ selectBit()

◆ set()

◆ setBit()

template<Ptype PTYPE>
void osl::PieceMask::setBit ( )
inline

◆ setMask()

void osl::PieceMask::setMask ( int index,
mask_t val )
inline

◆ test()

◆ xorMask()

void osl::PieceMask::xorMask ( int index,
mask_t val )
inline

Definition at line 39 of file pieceMask.h.

References osl::container::PieceMask64::mutableMask().


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