All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
open.h
Go to the documentation of this file.
1 #ifndef _GENERATE_OPEN_MOVES_H
2 #define _GENERATE_OPEN_MOVES_H
7 #include <boost/static_assert.hpp>
8 // Open<StoreMoveAction> 以外の組み合わせで使うときは
9 // open.tcc もinclude すること (但しコンパイル時間がかかるので推奨しない)
10 
11 namespace osl
12 {
13  namespace move_generator
14  {
20  template<class Action>
21  class Open
22  {
23  // BOOST_CLASS_REQUIRE(Action,osl::move_action,Concept);
24  public:
25  template<Player P>
26  static void generate(const NumEffectState& state,Piece p,Action& action,Square to,Direction dir);
27 
28  };
29 
30  struct GenerateOpen
31  {
32  template<class Action>
33  static void
34  generate(Player pl,const NumEffectState& state,Piece p,
35  Action& action,Square to,Direction dir)
36  {
37  if (pl == BLACK)
38  Open<Action>::template generate<BLACK>(state, p, action, to, dir);
39  else
40  Open<Action>::template generate<WHITE>(state, p, action, to, dir);
41  }
42  };
43 
44  } // namespace move_generator
45 } // namespace osl
46 #endif /* _GENERATE_OPEN_MOVES_H */
47 // ;;; Local Variables:
48 // ;;; mode:c++
49 // ;;; c-basic-offset:2
50 // ;;; End: