Sudoku::Pos Class Reference

Position in a Sudoku. More...

#include <puzzle.h>

List of all members.

Public Member Functions

 Pos (unsigned int col, unsigned int row)
 Pos (unsigned int pos=0)
 operator unsigned int () const
Pos next () const
unsigned int col () const
unsigned int row () const
unsigned int reg () const
Pos symmetric () const
Pos prev_col () const
Pos next_col () const
Pos prev_row () const
Pos next_row () const
bool interacts_with (Pos other) const

Static Public Member Functions

static Pos first ()
static Pos last ()
static Pos center ()

Private Attributes

unsigned int pos

Detailed Description

Position in a Sudoku.

Definition at line 55 of file puzzle.h.


Constructor & Destructor Documentation

Sudoku::Pos::Pos ( unsigned int  col,
unsigned int  row 
) [inline]

Definition at line 59 of file puzzle.h.

Sudoku::Pos::Pos ( unsigned int  pos = 0  )  [inline]

Definition at line 60 of file puzzle.h.


Member Function Documentation

static Pos Sudoku::Pos::center (  )  [inline, static]

Definition at line 68 of file puzzle.h.

References Sudoku::SDIM.

Referenced by Sudoku::Generator::is_valid_at().

unsigned int Sudoku::Pos::col (  )  const [inline]

Definition at line 65 of file puzzle.h.

References Sudoku::DIM, and pos.

Referenced by interacts_with(), next_col(), SudokuPlugin::Menu::paint(), prev_col(), reg(), and Test_Puzzle::test_Pos().

static Pos Sudoku::Pos::first (  )  [inline, static]
bool Sudoku::Pos::interacts_with ( Pos  other  )  const [inline]

Definition at line 74 of file puzzle.h.

References col(), pos, reg(), and row().

static Pos Sudoku::Pos::last (  )  [inline, static]
Pos Sudoku::Pos::next (  )  const [inline]

Definition at line 64 of file puzzle.h.

References pos.

Referenced by Test_Puzzle::test_Pos().

Pos Sudoku::Pos::next_col (  )  const [inline]

Definition at line 71 of file puzzle.h.

References col(), Sudoku::DIM, and pos.

Referenced by SudokuPlugin::Menu::ProcessKey(), and Test_Puzzle::test_Pos().

Pos Sudoku::Pos::next_row (  )  const [inline]

Definition at line 73 of file puzzle.h.

References Sudoku::DIM, pos, and row().

Referenced by SudokuPlugin::Menu::ProcessKey(), and Test_Puzzle::test_Pos().

Sudoku::Pos::operator unsigned int (  )  const [inline]

Definition at line 61 of file puzzle.h.

References pos.

Pos Sudoku::Pos::prev_col (  )  const [inline]

Definition at line 70 of file puzzle.h.

References col(), and pos.

Referenced by SudokuPlugin::Menu::ProcessKey(), and Test_Puzzle::test_Pos().

Pos Sudoku::Pos::prev_row (  )  const [inline]

Definition at line 72 of file puzzle.h.

References Sudoku::DIM, pos, and row().

Referenced by SudokuPlugin::Menu::ProcessKey(), and Test_Puzzle::test_Pos().

unsigned int Sudoku::Pos::reg (  )  const [inline]

Definition at line 67 of file puzzle.h.

References col(), Sudoku::RDIM, and row().

Referenced by interacts_with(), and Test_Puzzle::test_Pos().

unsigned int Sudoku::Pos::row (  )  const [inline]

Definition at line 66 of file puzzle.h.

References Sudoku::DIM, and pos.

Referenced by interacts_with(), next_row(), SudokuPlugin::Menu::paint(), prev_row(), reg(), and Test_Puzzle::test_Pos().

Pos Sudoku::Pos::symmetric (  )  const [inline]

Definition at line 69 of file puzzle.h.

References pos, and Sudoku::SDIM.

Referenced by Sudoku::Generator::is_valid_at(), and Test_Puzzle::test_Pos().


Member Data Documentation

unsigned int Sudoku::Pos::pos [private]

The documentation for this class was generated from the following file:
Generated on Mon Apr 5 17:01:12 2010 for VDR plugin 'Sudoku' by  doxygen 1.6.3