8 #include <boost/foreach.hpp> 
   12 using namespace osl::record;
 
   13 using namespace osl::record::opening;
 
   14 using namespace osl::stl;
 
   17 void show(
const std::string& filename,
 
   18           const state_map& states, 
const SimpleState& state)
 
   20   state_map::const_iterator it = states.find(HashKey(state));
 
   21   if (it == states.end())
 
   23     std::cout << filename << 
"\t" << 
"Not found" << std::endl;
 
   27     std::cout << filename;
 
   29     for (
size_t j = 0; j < moves.size(); ++j)
 
   32                 << 
"\t" << moves[j].getWeight();
 
   34     std::cout << std::endl;
 
   37 int main(
int argc, 
char **argv)
 
   44     std::vector<int> state_stack;
 
   47     while (!state_stack.empty())
 
   49       const int index = state_stack.back();
 
   50       state_stack.pop_back();
 
   53       const HashKey key = HashKey(state);
 
   54       if (states.find(key) == states.end())
 
   57         for (
size_t i = 0; i < moves.size(); ++i)
 
   59           state_stack.push_back(moves[i].getStateIndex());
 
   66   for (
int i = 1; i < argc; ++i)
 
   68     const std::string filename(argv[i]);
 
   73     if (record_moves.empty() || !(state == SimpleState(
HIRATE)))
 
   74       show(filename, states, state);
 
   75     BOOST_FOREACH(
Move move, record_moves) {
 
   77       show(filename, states, state);