00001 /* tableStack.h 00002 */ 00003 #ifndef OSL_TABLESTACK_H 00004 #define OSL_TABLESTACK_H 00005 00006 #include "osl/hash/hashKey.h" 00007 #include <boost/scoped_ptr.hpp> 00008 namespace osl 00009 { 00010 namespace search 00011 { 00012 class SimpleHashTable; 00013 } // namespace search 00014 using search::SimpleHashTable; 00015 namespace game_playing 00016 { 00020 class TableStack 00021 { 00022 public: 00023 static const size_t max_size = 2; 00024 static const int migration_depth = 16; 00025 static const int migration_limit = 200; 00026 private: 00027 class TableWithRoot; 00028 class Stack; 00029 boost::scoped_ptr<Stack> stack; 00030 public: 00031 TableStack(); 00032 TableStack(const TableStack&); 00033 ~TableStack(); 00035 void pushMove(Move selected, const HashKey& root, const SimpleHashTable&); 00037 void pushMove(Move); 00038 void popMove(); 00039 void clear(); 00040 00041 void migrate(SimpleHashTable&) const; 00042 }; 00043 } // game_playing 00044 } // osl 00045 00046 #endif /* OSL_TABLESTACK_H */ 00047 // ;;; Local Variables: 00048 // ;;; mode:c++ 00049 // ;;; c-basic-offset:2 00050 // ;;; End: