osl::container::PieceMask Class Reference

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Static Public Member Functions | Private Member Functions | List of all members
osl::container::PieceMask Class Reference

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

`#include <pieceMask.h>`

Inheritance diagram for osl::container::PieceMask:
[legend]
Collaboration diagram for osl::container::PieceMask:
[legend]

## 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を取り出す More...
template<Ptype PTYPE>
const mask_t | selectBit () const
| unpromote(PTYPE) の駒のbit だけ取り出す More...
template<Ptype PTYPE>
void | clearBit ()
| unpromote(PTYPE) の駒のbit を消す More...
template<Ptype PTYPE>
void | setBit ()
| unpromote(PTYPE) の駒のbit を立てる More...

## Static Public Member Functions
static const mask_t | numToMask (int num)

## Private Member Functions
mask_t & | mutableMaskNum (int num)
const mask_t | getMaskNum (int num) const

## Detailed Description

駒番号のビットセット.

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

Definition at line 31 of file pieceMask.h.

## Constructor & Destructor Documentation

osl::container::PieceMask::PieceMask | ( | ) |  |
| inline

Definition at line 34 of file pieceMask.h.

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

Definition at line 35 of file pieceMask.h.

## Member Function Documentation

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

Definition at line 68 of file pieceMask.h.

template<Ptype PTYPE>

void osl::container::PieceMask::clearBit | ( | ) |  |
| inline

unpromote(PTYPE) の駒のbit を消す

Definition at line 85 of file pieceMask.h.

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

Definition at line 62 of file pieceMask.h.

References mutableMaskNum(), and numToMask().

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

Definition at line 70 of file pieceMask.h.

Referenced by osl::container::operator&(), osl::container::operator<<(), osl::container::operator==(), osl::container::operator|(), and osl::container::operator~().

template<Ptype PTYPE>

const mask_t osl::container::PieceMask::getMask | ( | ) |  | const
| inline

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

Definition at line 73 of file pieceMask.h.

References getMask().

Referenced by getMask(), and getMaskNum().

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

Definition at line 46 of file pieceMask.h.

References getMask().

Referenced by test().

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

Definition at line 43 of file pieceMask.h.

Referenced by flip(), reset(), and set().

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

Definition at line 36 of file pieceMask.h.

Referenced by flip(), reset(), set(), and test().

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

Definition at line 53 of file pieceMask.h.

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

Definition at line 65 of file pieceMask.h.

References mutableMaskNum(), and numToMask().

template<Ptype PTYPE>

const mask_t osl::container::PieceMask::selectBit | ( | ) |  | const
| inline

unpromote(PTYPE) の駒のbit だけ取り出す

Definition at line 77 of file pieceMask.h.

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

Definition at line 59 of file pieceMask.h.

References mutableMaskNum(), and numToMask().

template<Ptype PTYPE>

void osl::container::PieceMask::setBit | ( | ) |  |
| inline

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

Definition at line 92 of file pieceMask.h.

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

Definition at line 39 of file pieceMask.h.

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

Definition at line 56 of file pieceMask.h.

References getMaskNum(), and numToMask().

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

Definition at line 50 of file pieceMask.h.

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

- pieceMask.h