/usr/include/osl/move_action/concept.h is in libosl-dev 0.6.0-3.3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | #ifndef _MOVE_ACTION_CONCEPT_H
#define _MOVE_ACTION_CONCEPT_H
#include "osl/square.h"
#include "osl/player.h"
#include "osl/piece.h"
#include "osl/ptype.h"
#include "osl/move.h"
#include <boost/concept_check.hpp>
namespace osl
{
namespace move_action
{
/**
* interface 記述用
*/
class MoveAction
{
public:
/** コマをとらないMove */
void simpleMove(Square from,Square to,Ptype ptype,
bool isPromote,Player p,Move move);
/** コマを取るかもしれない Move */
void unknownMove(Square from,Square to,Piece captured,
Ptype ptype,bool isPromote,Player p,Move move);
/** コマを打つMove */
void dropMove(Square to,Ptype ptype,Player p,Move move);
};
/**
* MoveAction の制約.
* http://www.boost.org/libs/concept_check/concept_check.htm
*/
template <class T>
struct Concept
{
/** 制約 */
void constraints()
{
// MoveAction must have the following three methods
// 試行錯誤中
// 呼出すとinline展開などでコンパイル時間が増えるので
// アドレスをとるだけにしてみる
simple = &T::simpleMove;
unknown = &T::unknownMove;
drop = &T::dropMove;
}
void (T::*simple)(Square, Square, Ptype, bool, Player,Move);
void (T::*unknown)(Square, Square, Piece, Ptype, bool, Player,Move);
void (T::*drop)(Square, Ptype, Player,Move);
};
} // namespace move_action
} // namespace osl
#endif /* _MOVE_ACTION_CONCEPT_H */
// ;;; Local Variables:
// ;;; mode:c++
// ;;; c-basic-offset:2
// ;;; End:
|