List of all members
cwchess::Flags Class Reference

Flags representing the state of a piece on the chessboard. More...

#include <Flags.h>

Inheritance diagram for cwchess::Flags:
Inheritance graph
[legend]

Public Member Functions

Constructors
 Flags (void)
 Construct an uninitialized Flags object.
 
 Flags (Flags const& flags)
 Copy-constructor.
 
 Flags (FlagsData flags)
 Construct a Flags object from a constant.
 
Assignment operators
Flags&  operator= (Flags const& flags)
 Assign from another Flags object.
 
Flags&  operator= (FlagsData flags)
 Assign from a constant.
 
void clear (void)
 Set all flags to 0.
 
Bit fiddling
Flags&  operator|= (Flags const& flags)
 Set all bits that are set in flags.
 
Flags&  operator|= (FlagsData flags)
 Set all bits that are set in flags.
 
Flags&  operator&= (Flags const& flags)
 Reset all bits that are not set in flags.
 
Flags&  operator&= (FlagsData flags)
 Reset all bits that are not set in flags.
 
Flags&  operator^= (Flags const& flags)
 Toggle all bits that are set in flags.
 
Flags&  operator^= (FlagsData flags)
 Toggle all bits that are set in flags.
 
void set (FlagsData flags)
 Set the bits that are set in flags.
 
void reset (FlagsData flags)
 Clear the bits that are set in flags.
 
Special functions
void set_can_move_two_squares_if_not_blocked (void)
 Set the fl_pawn_can_move_two_squares bit iff fl_pawn_is_not_blocked bit is already set.
 
Accessors
uint8_t operator() (void) const
 Return the underlaying integral value.
 

Friends

Comparision operators
bool operator== (Flags const& f1, Flags const& f2)
 
bool operator== (Flags const& f1, FlagsData f2)
 
bool operator== (FlagsData f1, Flags const& f2)
 
bool operator!= (Flags const& f1, Flags const& f2)
 
bool operator!= (Flags const& f1, FlagsData f2)
 
bool operator!= (FlagsData f1, Flags const& f2)
 

Additional Inherited Members

- Protected Attributes inherited from cwchess::FlagsData
uint8_t M_bits
 0TKNQ000, T=can move two squares, K=can take king side, N=is not blocked, Q=can take queen side.
 

Detailed Description

Flags representing the state of a piece on the chessboard.

This class is for internal use. You should not need it.

See also
FlagsData

Definition at line 85 of file Flags.h.


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

Copyright © 2006 - 2010 Carlo Wood.  All rights reserved.