My Project
Public Member Functions | Static Public Member Functions | Private Member Functions | List of all members
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_t & mutableMaskNum (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()

bool osl::PieceMask::any ( ) const
inline

◆ clearBit()

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

◆ 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(), and osl::effect::NumBitmapEffect::selectLong().

◆ getMask() [2/2]

const mask_t osl::PieceMask::getMask ( int  num) const
inline

◆ 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()

static const mask_t osl::PieceMask::numToMask ( int  num)
inlinestatic

◆ orMask()

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

◆ reset()

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

◆ selectBit()

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

◆ set()

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

◆ setBit()

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

unpromote(PTYPE) の駒のbit を立てる

Definition at line 81 of file pieceMask.h.

References osl::container::PieceMask64::mask, and osl::container::PieceMask64::mutableMask().

Referenced by osl::eval::ml::BishopRookFork::eval().

◆ setMask()

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

◆ test()

bool osl::PieceMask::test ( int  num) const
inline

◆ 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: