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

11 x 12 More...

#include <boardMask.h>

Collaboration diagram for osl::container::BoardMask:
Collaboration graph
[legend]

Public Member Functions

 BoardMask ()
 
 BoardMask (const BoardMask &src)
 
BoardMaskoperator= (const BoardMask &src)
 
void clear ()
 
void invalidate ()
 
bool isInvalid () const
 
void set (unsigned int i)
 
void set (Square pos)
 
void reset (unsigned int i)
 
void reset (Square pos)
 
bool test (unsigned int i) const
 
bool test (Square pos) const
 
bool anyInRange (const BoardMask &mask) const
 
BoardMaskoperator|= (const BoardMask &mask)
 
bool any () const
 
Square takeOneBit ()
 

Static Public Member Functions

static int index (int x, int y)
 
static int index (Square pos)
 
template<Direction Dir, Player P>
static int getIndexOffset ()
 
static Square toSquare (int n)
 

Private Attributes

CArray< unsigned long long, 3 > contents
 the third one is only for edge More...
 

Friends

bool operator== (const BoardMask &, const BoardMask &)
 

Detailed Description

11 x 12

Definition at line 21 of file boardMask.h.

Constructor & Destructor Documentation

osl::container::BoardMask::BoardMask ( )
inline

Definition at line 26 of file boardMask.h.

References invalidate().

osl::container::BoardMask::BoardMask ( const BoardMask src)
inline

Definition at line 27 of file boardMask.h.

References contents.

Member Function Documentation

bool osl::container::BoardMask::any ( ) const
inline

Definition at line 69 of file boardMask.h.

References contents, and isInvalid().

Referenced by takeOneBit().

bool osl::container::BoardMask::anyInRange ( const BoardMask mask) const
inline

Definition at line 58 of file boardMask.h.

References contents.

void osl::container::BoardMask::clear ( )
inline
template<Direction Dir, Player P>
static int osl::container::BoardMask::getIndexOffset ( )
inlinestatic

Definition at line 87 of file boardMask.h.

References osl::BLACK.

static int osl::container::BoardMask::index ( int  x,
int  y 
)
inlinestatic

Definition at line 81 of file boardMask.h.

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

static int osl::container::BoardMask::index ( Square  pos)
inlinestatic

Definition at line 82 of file boardMask.h.

References osl::Square::index().

void osl::container::BoardMask::invalidate ( )
inline

Definition at line 39 of file boardMask.h.

References contents.

Referenced by BoardMask().

bool osl::container::BoardMask::isInvalid ( ) const
inline

Definition at line 40 of file boardMask.h.

References contents.

Referenced by any(), and takeOneBit().

BoardMask& osl::container::BoardMask::operator= ( const BoardMask src)
inline

Definition at line 31 of file boardMask.h.

References contents.

BoardMask& osl::container::BoardMask::operator|= ( const BoardMask mask)
inline

Definition at line 63 of file boardMask.h.

References contents.

void osl::container::BoardMask::reset ( unsigned int  i)
inline

Definition at line 48 of file boardMask.h.

References contents.

void osl::container::BoardMask::reset ( Square  pos)
inline

Definition at line 52 of file boardMask.h.

References index(), and reset().

Referenced by reset().

void osl::container::BoardMask::set ( unsigned int  i)
inline
void osl::container::BoardMask::set ( Square  pos)
inline

Definition at line 45 of file boardMask.h.

References index(), and set().

Square osl::container::BoardMask::takeOneBit ( )
inline

Definition at line 74 of file boardMask.h.

References any(), contents, isInvalid(), osl::misc::BitOp::takeOneBit(), and toSquare().

bool osl::container::BoardMask::test ( unsigned int  i) const
inline

Definition at line 53 of file boardMask.h.

References contents.

Referenced by osl::container::operator<<().

bool osl::container::BoardMask::test ( Square  pos) const
inline

Definition at line 57 of file boardMask.h.

References index(), and test().

Referenced by test().

static Square osl::container::BoardMask::toSquare ( int  n)
inlinestatic

Definition at line 94 of file boardMask.h.

References osl::Square::makeDirect().

Referenced by takeOneBit().

Friends And Related Function Documentation

bool operator== ( const BoardMask l,
const BoardMask r 
)
friend

Member Data Documentation

CArray<unsigned long long,3> osl::container::BoardMask::contents
private

the third one is only for edge

Definition at line 24 of file boardMask.h.

Referenced by any(), anyInRange(), BoardMask(), clear(), invalidate(), isInvalid(), operator=(), osl::container::operator==(), operator|=(), reset(), set(), takeOneBit(), and test().


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