| 1 |
/* oraclePool.h |
| 2 |
*/ |
| 3 |
#ifndef _ORACLEPOOL_H |
| 4 |
#define _ORACLEPOOL_H |
| 5 |
|
| 6 |
#include "osl/state/numEffectState.h" |
| 7 |
#include "osl/position.h" |
| 8 |
#include "osl/pieceStand.h" |
| 9 |
#include <boost/scoped_ptr.hpp> |
| 10 |
#include <cstddef> |
| 11 |
|
| 12 |
namespace osl |
| 13 |
{ |
| 14 |
namespace checkmate |
| 15 |
{ |
| 16 |
class CheckHashRecord; |
| 17 |
class OraclePool |
| 18 |
{ |
| 19 |
class Table; |
| 20 |
std::unique_ptr<Table> proof_oracles; |
| 21 |
std::unique_ptr<Table> disproof_oracles; |
| 22 |
public: |
| 23 |
explicit OraclePool(Player attacker); |
| 24 |
~OraclePool(); |
| 25 |
|
| 26 |
void addProofOracle(const NumEffectState&, const CheckHashRecord*, |
| 27 |
int node_count); |
| 28 |
void addDisproofOracle(const NumEffectState&, const CheckHashRecord*, |
| 29 |
int node_count); |
| 30 |
const CheckHashRecord *findProofOracle(const NumEffectState&, |
| 31 |
PieceStand black_stand, |
| 32 |
unsigned short& oracle_age) const; |
| 33 |
const CheckHashRecord *findDisproofOracle(const NumEffectState&, |
| 34 |
PieceStand black_stand, |
| 35 |
unsigned short& oracle_age) const; |
| 36 |
size_t totalSize() const; |
| 37 |
size_t keySize() const; |
| 38 |
}; |
| 39 |
|
| 40 |
} // namespace checkmate |
| 41 |
} // namespace osl |
| 42 |
|
| 43 |
#endif /* _ORACLEPOOL_H */ |
| 44 |
// ;;; Local Variables: |
| 45 |
// ;;; mode:c++ |
| 46 |
// ;;; c-basic-offset:2 |
| 47 |
// ;;; End: |