All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
quiescenceRecord.cc
Go to the documentation of this file.
1 /* quiescenceRecord.cc
2  */
4 #include "osl/record/csa.h"
5 #include "osl/ptypeTable.h"
6 #include <boost/static_assert.hpp>
7 #include <map>
8 #include <iostream>
9 
10 #ifndef MINIMAL
11 void osl::search::
12 QuiescenceRecord::dump(std::ostream& os) const
13 {
14  os << "QuiescenceRecord " << this << "\n";
15  os << lower_bound << " (" << (int)lower_depth << ")"
16  << upper_bound << " (" << (int)upper_depth << ")";
17  if (hasStaticValue())
18  {
19  os << " s " << static_value << toString(staticValueType());
20  os << " t1 " << threat1.value << " " << record::csa::show(threat1.move)
21  << " t2 " << threat2.value << " " << record::csa::show(threat2.move);
22  }
23  os << "\n";
24  os << "checkmate read " << checkmate_nodes << "\t"
25  << "threatmate read " << threatmate_nodes << "\n";
26  os << "best move " << record::csa::show(bestMove()) << "\n";
27  os << "threatmate " << threatmate << "\n";
28  os << "sendoffs " << (unsigned int)threatmate.sendoffs << "\n";
29  os << "moves " << moves_size();
30  size_t i=0;
31  MoveVector moves_copy;
32  loadMoves(moves_copy);
33  for (MoveVector::const_iterator p=moves_copy.begin(); p!=moves_copy.end(); ++p, ++i)
34  {
35  os << " " << record::csa::show(*p);
36  if (i % 8 == 7)
37  os << "\n";
38  }
39  if (i % 8 != 7)
40  os << "\n";
41 }
42 
43 const char *osl::search::
45 {
46  switch (type)
47  {
48  case UNKNOWN:
49  return "?";
50  case UPPER_BOUND:
51  return ">";
52  case EXACT:
53  return "=";
54  default:
55  assert(0);
56  }
57  return "!"; // should not occur
58 }
59 #endif
60 /* ------------------------------------------------------------------------- */
61 // ;;; Local Variables:
62 // ;;; mode:c++
63 // ;;; c-basic-offset:2
64 // ;;; End: