| 1 |
/* showAllTree.h |
| 2 |
*/ |
| 3 |
#ifndef _CHECK_SHOWALLTREE_H |
| 4 |
#define _CHECK_SHOWALLTREE_H |
| 5 |
|
| 6 |
#include <iosfwd> |
| 7 |
namespace osl |
| 8 |
{ |
| 9 |
namespace checkmate |
| 10 |
{ |
| 11 |
class CheckHashRecord; |
| 12 |
|
| 13 |
namespace analyzer |
| 14 |
{ |
| 15 |
class TreeWriter; |
| 16 |
class RecordSet; |
| 17 |
/** |
| 18 |
* record を root とする木を書き出す |
| 19 |
*/ |
| 20 |
class ShowAllTree |
| 21 |
{ |
| 22 |
std::ostream& os; |
| 23 |
int maxDepth; |
| 24 |
bool expandFinalState; |
| 25 |
bool showTerminalMoves; |
| 26 |
public: |
| 27 |
ShowAllTree(std::ostream& os, int maxDepth, |
| 28 |
bool expandFinalState=true, bool showTerminalMoves=false); |
| 29 |
void showOutline(const CheckHashRecord *record) const; |
| 30 |
void showDot(const CheckHashRecord *record, size_t threshold) const; |
| 31 |
static bool isTerminal(const CheckHashRecord *record); |
| 32 |
private: |
| 33 |
void show(TreeWriter& writer, const CheckHashRecord *record) const; |
| 34 |
void show(const CheckHashRecord *record, TreeWriter& writer, |
| 35 |
RecordSet& visited) const; |
| 36 |
}; |
| 37 |
} // namespace analyzer |
| 38 |
} // namespace checkmate |
| 39 |
} // namespace osl |
| 40 |
|
| 41 |
|
| 42 |
#endif /* _CHECK_SHOWALLTREE_H */ |
| 43 |
// ;;; Local Variables: |
| 44 |
// ;;; mode:c++ |
| 45 |
// ;;; c-basic-offset:2 |
| 46 |
// ;;; End: |