osl::DirectionTraits< Dir > Struct Template Reference

`#include <directionTraits.h>`

## Static Public Member Functions

static const Offset | blackOffset ()

## Static Public Attributes

static const unsigned int | mask =1<<static_cast<int>(Dir)
static const bool | isLong =(static_cast<int>(Dir) >= LONG_UL)
static const int | blackDx =DirectionTraitsGen<Dir>::blackDx
static const int | blackDy =DirectionTraitsGen<Dir>::blackDy
static const bool | canPromoteTo =DirectionTraitsGen<Dir>::canPromoteTo
static const Direction | longDir =DirectionTraitsGen<Dir>::longDir
static const int | ptypeMask =DirectionTraitsGen<Dir>::ptypeMask
static const int | ptypeMaskNotKing
static const Direction | primDir =DirectionTraitsGen<Dir>::primDir
static const Direction | altDir =DirectionTraitsGen<Dir>::altDir

## Detailed Description

template<Direction Dir>
struct osl::DirectionTraits< Dir >

Definition at line 225 of file directionTraits.h.

## Member Function Documentation

## blackOffset()

template<Direction Dir>

const Offset osl::DirectionTraits< Dir >::blackOffset | ( |  | ) |

inline static

Definition at line 231 of file directionTraits.h.

References blackDx, and blackDy.

Referenced by osl::NumEffectState::makePinOpenDir(), osl::DirectionPlayerTraits< Dir, BLACK >::offset(), and osl::DirectionPlayerTraits< Dir, WHITE >::offset().

## Member Data Documentation

## altDir

template<Direction Dir>

const Direction osl::DirectionTraits< Dir >::altDir =DirectionTraitsGen<Dir>::altDir

static

Definition at line 238 of file directionTraits.h.

## blackDx

template<Direction Dir>

const int osl::DirectionTraits< Dir >::blackDx =DirectionTraitsGen<Dir>::blackDx

static

Definition at line 229 of file directionTraits.h.

Referenced by blackOffset(), osl::BoardTable::setDirections(), and osl::BoardTable::setKnightDirections().

## blackDy

template<Direction Dir>

const int osl::DirectionTraits< Dir >::blackDy =DirectionTraitsGen<Dir>::blackDy

static

Definition at line 230 of file directionTraits.h.

Referenced by blackOffset(), osl::BoardTable::setDirections(), and osl::BoardTable::setKnightDirections().

## canPromoteTo

template<Direction Dir>

const bool osl::DirectionTraits< Dir >::canPromoteTo =DirectionTraitsGen<Dir>::canPromoteTo

static

Definition at line 232 of file directionTraits.h.

## isLong

template<Direction Dir>

const bool osl::DirectionTraits< Dir >::isLong =(static_cast<int>(Dir) >= LONG_UL)

static

Definition at line 228 of file directionTraits.h.

Referenced by osl::NumEffectState::hasEffectInDirection().

## longDir

template<Direction Dir>

const Direction osl::DirectionTraits< Dir >::longDir =DirectionTraitsGen<Dir>::longDir

static

Definition at line 233 of file directionTraits.h.

## mask

template<Direction Dir>

const unsigned int osl::DirectionTraits< Dir >::mask =1<<static_cast<int>(Dir)

static

Definition at line 227 of file directionTraits.h.

Referenced by osl::effect::NumSimpleEffectTable::doEffectShort(), osl::eval::ml::King8EffectAll::eval(), osl::eval::ml::KingXBlocked3::eval(), osl::eval::ml::KingXBothBlocked::eval(), osl::NumEffectState::forEachEffectOfPieceDir(), osl::NumEffectState::forEachEffectOfPieceLongDir(), and osl::eval::ml::KingXBlockedBase::isBlocked().

## primDir

template<Direction Dir>

const Direction osl::DirectionTraits< Dir >::primDir =DirectionTraitsGen<Dir>::primDir

static

Definition at line 237 of file directionTraits.h.

## ptypeMask

template<Direction Dir>

const int osl::DirectionTraits< Dir >::ptypeMask =DirectionTraitsGen<Dir>::ptypeMask

static

Definition at line 234 of file directionTraits.h.

## ptypeMaskNotKing

template<Direction Dir>

const int osl::DirectionTraits< Dir >::ptypeMaskNotKing

static

Initial value:
=DirectionTraitsGen<Dir>::ptypeMask &
~(1<<KING)
osl::KING
@ KING
Definition basic_type.h:93
osl::DirectionTraitsGen
Definition directionTraits.h:11

Definition at line 235 of file directionTraits.h.

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

- directionTraits.h