Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
include
osl
move_action
move_action/concept.h
Go to the documentation of this file.
1
#ifndef _MOVE_ACTION_CONCEPT_H
2
#define _MOVE_ACTION_CONCEPT_H
3
4
#include "
osl/square.h
"
5
#include "
osl/player.h
"
6
#include "
osl/piece.h
"
7
#include "
osl/ptype.h
"
8
#include "
osl/move.h
"
9
#include <boost/concept_check.hpp>
10
11
namespace
osl
12
{
13
namespace
move_action
14
{
18
class
MoveAction
19
{
20
public
:
22
void
simpleMove
(
Square
from,
Square
to,
Ptype
ptype,
23
bool
isPromote,
Player
p,
Move
move);
24
26
void
unknownMove
(
Square
from,
Square
to,
Piece
captured
,
27
Ptype
ptype,
bool
isPromote,
Player
p,
Move
move);
29
void
dropMove
(
Square
to,
Ptype
ptype,
Player
p,
Move
move);
30
};
31
36
template
<
class
T>
37
struct
Concept
38
{
40
void
constraints
()
41
{
42
// MoveAction must have the following three methods
43
44
// 試行錯誤中
45
// 呼出すとinline展開などでコンパイル時間が増えるので
46
// アドレスをとるだけにしてみる
47
simple
= &
T::simpleMove
;
48
unknown
= &
T::unknownMove
;
49
drop
= &
T::dropMove
;
50
}
51
void (T::*
simple
)(
Square
,
Square
,
Ptype
, bool,
Player
,
Move
);
52
void (T::*
unknown
)(
Square
,
Square
,
Piece
,
Ptype
, bool,
Player
,
Move
);
53
void (T::*
drop
)(
Square
,
Ptype
,
Player
,
Move
);
54
};
55
}
// namespace move_action
56
}
// namespace osl
57
58
59
#endif
/* _MOVE_ACTION_CONCEPT_H */
60
// ;;; Local Variables:
61
// ;;; mode:c++
62
// ;;; c-basic-offset:2
63
// ;;; End:
Generated on Sun Jul 21 2013 13:37:23 by
1.8.4