00001 /* oraclePool.h 00002 */ 00003 #ifndef _ORACLEPOOL_H 00004 #define _ORACLEPOOL_H 00005 00006 #include "osl/state/numEffectState.h" 00007 #include "osl/position.h" 00008 #include "osl/pieceStand.h" 00009 #include <boost/scoped_ptr.hpp> 00010 #include <cstddef> 00011 00012 namespace osl 00013 { 00014 namespace checkmate 00015 { 00016 class CheckHashRecord; 00017 class OraclePool 00018 { 00019 class Table; 00020 boost::scoped_ptr<Table> proof_oracles; 00021 boost::scoped_ptr<Table> disproof_oracles; 00022 public: 00023 explicit OraclePool(Player attacker); 00024 ~OraclePool(); 00025 00026 void addProofOracle(const NumEffectState&, const CheckHashRecord*, 00027 int node_count); 00028 void addDisproofOracle(const NumEffectState&, const CheckHashRecord*, 00029 int node_count); 00030 const CheckHashRecord *findProofOracle(const NumEffectState&, 00031 PieceStand black_stand, 00032 unsigned short& oracle_age) const; 00033 const CheckHashRecord *findDisproofOracle(const NumEffectState&, 00034 PieceStand black_stand, 00035 unsigned short& oracle_age) const; 00036 size_t totalSize() const; 00037 size_t keySize() const; 00038 }; 00039 00040 } // namespace checkmate 00041 } // namespace osl 00042 00043 #endif /* _ORACLEPOOL_H */ 00044 // ;;; Local Variables: 00045 // ;;; mode:c++ 00046 // ;;; c-basic-offset:2 00047 // ;;; End: