Sudoku::History Class Reference

#include <history.h>

Collaboration diagram for Sudoku::History:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 History ()
 Constructor.
 ~History ()
 Destructor.
void reset ()
 Reset the history.
Movecurrent ()
 Current move in the history.
void add (Move *move)
 Add a new move.
void backward ()
 Set previous move as current.
void forward ()
 Set next move as current.
bool movesExecuted () const
 Are there executed moves in the history?
bool movesToExecute () const
 Are there moves to execute in the history?

Private Attributes

Moves history
unsigned int executed

Detailed Description

Definition at line 37 of file history.h.


Constructor & Destructor Documentation

History::History (  ) 

Constructor.

Definition at line 30 of file history.cpp.

References executed.

History::~History (  ) 

Destructor.

Definition at line 36 of file history.cpp.

References reset().


Member Function Documentation

void History::add ( Move move  ) 

Add a new move.

Definition at line 62 of file history.cpp.

References executed, and history.

Referenced by Sudoku::PuzzleGame::set_with_history(), Test_History::test_HistoryAdd(), and Test_History::test_HistoryNull().

void History::backward (  ) 

Set previous move as current.

Definition at line 78 of file history.cpp.

References executed, and movesExecuted().

Referenced by Sudoku::PuzzleGame::backward(), Test_History::test_HistoryAdd(), and Test_History::test_HistoryEmpty().

Move * History::current (  ) 
void History::forward (  ) 

Set next move as current.

Definition at line 85 of file history.cpp.

References executed, and movesToExecute().

Referenced by Sudoku::PuzzleGame::forward(), Test_History::test_HistoryAdd(), and Test_History::test_HistoryEmpty().

bool History::movesExecuted (  )  const

Are there executed moves in the history?

Definition at line 92 of file history.cpp.

References executed.

Referenced by Sudoku::PuzzleGame::backward(), backward(), current(), Test_History::test_HistoryAdd(), Test_History::test_HistoryEmpty(), and Test_History::test_HistoryNull().

bool History::movesToExecute (  )  const

Are there moves to execute in the history?

Definition at line 98 of file history.cpp.

References executed, and history.

Referenced by Sudoku::PuzzleGame::forward(), forward(), Test_History::test_HistoryAdd(), Test_History::test_HistoryEmpty(), and Test_History::test_HistoryNull().

void History::reset (  ) 

Reset the history.

Definition at line 42 of file history.cpp.

References executed, and history.

Referenced by Sudoku::PuzzleGame::reset(), Test_History::test_HistoryEmpty(), and ~History().


Member Data Documentation

unsigned int Sudoku::History::executed [private]

Definition at line 41 of file history.h.

Referenced by add(), backward(), current(), forward(), History(), movesExecuted(), movesToExecute(), and reset().

Definition at line 40 of file history.h.

Referenced by add(), current(), movesToExecute(), and reset().


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