#include <solvethread.h>


Public Types | |
| enum | { ACT_PREPARATION, ACT_REDUCE, ACT_ASSEMBLING, ACT_DISASSEMBLING, ACT_PAUSING, ACT_FINISHED, ACT_ERROR, ACT_WAIT_TO_STOP } |
| enum | { SRT_UNSORT, SRT_COMPLETE_MOVES, SRT_LEVEL } |
Public Member Functions | |
| unsigned int | currentAction (void) |
| unsigned int | currentActionParameter (void) |
| assembler_c::errState | getErrorState (void) |
| int | getErrorParam (void) |
| unsigned long | getTime (void) |
| solveThread_c (problem_c *puz, int par) | |
| const problem_c * | getProblem (void) const |
| void | setSortMethod (int sort) |
| void | setSolutionLimits (unsigned int limit, unsigned int drop=1) |
| const assert_exception & | getAssertException (void) |
| virtual | ~solveThread_c (void) |
| bool | start (bool stop_after_prep=false) |
| void | stop (void) |
| bool | stopped (void) const |
| void | run (void) |
Static Public Attributes | |
| static const int | PAR_REDUCE = 0x01 |
| static const int | PAR_KEEP_MIRROR = 0x02 |
| static const int | PAR_KEEP_ROTATIONS = 0x04 |
| static const int | PAR_DROP_DISASSEMBLIES = 0x08 |
| static const int | PAR_DISASSM = 0x10 |
| static const int | PAR_JUST_COUNT = 0x20 |
| static const int | PAR_COMPLETE_ROTATIONS = 0x40 |
Private Member Functions | |
| bool | assembly (assembly_c *a) |
| solveThread_c (const solveThread_c &) | |
| void | operator= (const solveThread_c &) |
Private Attributes | |
| unsigned int | action |
| assembler_c::errState | errState |
| int | errParam |
| time_t | startTime |
| problem_c * | puzzle |
| int | parameters |
| int | sortMethod |
| unsigned int | solutionLimit |
| unsigned int | solutionDrop |
| unsigned int | dropMultiplicator |
| assert_exception | ae |
| bool | stopPressed |
| bool | return_after_prep |
| disassembler_c * | disassm |
| assembler_c * | assm |
| anonymous enum |
| solveThread_c::solveThread_c | ( | problem_c * | puz, | |
| int | par | |||
| ) |
References disassm, and PAR_DISASSM.
| solveThread_c::~solveThread_c | ( | void | ) | [virtual] |
References disassm, and thread_c::kill().
| solveThread_c::solveThread_c | ( | const solveThread_c & | ) | [private] |
| bool solveThread_c::assembly | ( | assembly_c * | a | ) | [private, virtual] |
Implements assembler_cb.
References ACT_ASSEMBLING, ACT_DISASSEMBLING, action, problem_c::addSolution(), disassembly_c::compare(), disassembler_c::disassemble(), disassm, dropMultiplicator, solution_c::getDisassembly(), solution_c::getDisassemblyInfo(), problem_c::getNumAssemblies(), problem_c::getNumSolutions(), problem_c::getSolution(), problem_c::incNumAssemblies(), problem_c::incNumSolutions(), PAR_DISASSM, PAR_DROP_DISASSEMBLIES, PAR_JUST_COUNT, parameters, assembly_c::placementCount(), puzzle, problem_c::removeSolution(), solutionDrop, solutionLimit, problem_c::solutionNumber(), sortMethod, SRT_COMPLETE_MOVES, SRT_LEVEL, SRT_UNSORT, disassembly_c::sumMoves(), and separation_c::sumMoves().
| unsigned int solveThread_c::currentAction | ( | void | ) | [inline] |
References action.
| unsigned int solveThread_c::currentActionParameter | ( | void | ) |
References ACT_PREPARATION, ACT_REDUCE, action, assm, and assembler_c::getReducePiece().
| const assert_exception& solveThread_c::getAssertException | ( | void | ) | [inline] |
References ae.
| int solveThread_c::getErrorParam | ( | void | ) | [inline] |
| assembler_c::errState solveThread_c::getErrorState | ( | void | ) | [inline] |
| unsigned long solveThread_c::getTime | ( | void | ) | [inline] |
References startTime.
| void solveThread_c::operator= | ( | const solveThread_c & | ) | [private] |
| void solveThread_c::run | ( | void | ) | [virtual] |
Implements thread_c.
References ACT_ASSEMBLING, ACT_ERROR, ACT_FINISHED, ACT_PAUSING, ACT_PREPARATION, ACT_REDUCE, action, problem_c::addTime(), ae, assembler_c::assemble(), assm, assembler_c::createMatrix(), assembler_c::ERR_NONE, errParam, errState, gridType_c::findAssembler(), problem_c::finishedSolving(), problem_c::getAssembler(), assembler_c::getErrorsParam(), assembler_c::getFinished(), problem_c::getGridType(), PAR_COMPLETE_ROTATIONS, PAR_KEEP_MIRROR, PAR_KEEP_ROTATIONS, PAR_REDUCE, parameters, puzzle, assembler_c::reduce(), problem_c::removeAllSolutions(), return_after_prep, problem_c::setAssembler(), startTime, and stopPressed.
| void solveThread_c::setSolutionLimits | ( | unsigned int | limit, | |
| unsigned int | drop = 1 | |||
| ) | [inline] |
References solutionDrop, and solutionLimit.
| void solveThread_c::setSortMethod | ( | int | sort | ) | [inline] |
References sortMethod.
| bool solveThread_c::start | ( | bool | stop_after_prep = false |
) |
| void solveThread_c::stop | ( | void | ) | [virtual] |
Reimplemented from thread_c.
References ACT_ASSEMBLING, ACT_DISASSEMBLING, ACT_PREPARATION, ACT_REDUCE, ACT_WAIT_TO_STOP, action, problem_c::getAssembler(), puzzle, assembler_c::stop(), and stopPressed.
| bool solveThread_c::stopped | ( | void | ) | const [inline] |
References ACT_ERROR, ACT_FINISHED, ACT_PAUSING, and action.
unsigned int solveThread_c::action [private] |
Referenced by assembly(), currentAction(), currentActionParameter(), getErrorParam(), getErrorState(), run(), stop(), and stopped().
assert_exception solveThread_c::ae [private] |
Referenced by getAssertException(), and run().
assembler_c* solveThread_c::assm [private] |
Referenced by currentActionParameter(), and run().
disassembler_c* solveThread_c::disassm [private] |
Referenced by assembly(), solveThread_c(), and ~solveThread_c().
unsigned int solveThread_c::dropMultiplicator [private] |
Referenced by assembly(), and start().
int solveThread_c::errParam [private] |
Referenced by getErrorParam(), and run().
assembler_c::errState solveThread_c::errState [private] |
Referenced by getErrorState(), and run().
const int solveThread_c::PAR_COMPLETE_ROTATIONS = 0x40 [static] |
Referenced by run().
const int solveThread_c::PAR_DISASSM = 0x10 [static] |
Referenced by assembly(), solveThread_c(), and start().
const int solveThread_c::PAR_DROP_DISASSEMBLIES = 0x08 [static] |
Referenced by assembly().
const int solveThread_c::PAR_JUST_COUNT = 0x20 [static] |
Referenced by assembly(), and start().
const int solveThread_c::PAR_KEEP_MIRROR = 0x02 [static] |
Referenced by run().
const int solveThread_c::PAR_KEEP_ROTATIONS = 0x04 [static] |
Referenced by run().
const int solveThread_c::PAR_REDUCE = 0x01 [static] |
Referenced by run().
int solveThread_c::parameters [private] |
Referenced by assembly(), run(), and start().
problem_c* solveThread_c::puzzle [private] |
Referenced by assembly(), getProblem(), run(), start(), and stop().
bool solveThread_c::return_after_prep [private] |
unsigned int solveThread_c::solutionDrop [private] |
Referenced by assembly(), setSolutionLimits(), and start().
unsigned int solveThread_c::solutionLimit [private] |
Referenced by assembly(), setSolutionLimits(), and start().
int solveThread_c::sortMethod [private] |
Referenced by assembly(), and setSortMethod().
time_t solveThread_c::startTime [private] |
bool solveThread_c::stopPressed [private] |
1.5.8