Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
include
osl
effect_action
storePtypeOSquare.h
Go to the documentation of this file.
1
/* storePtypeOSquare.h
2
*/
3
#ifndef _STORE_PTYPEO_POSITION_H
4
#define _STORE_PTYPEO_POSITION_H
5
#include "
osl/container/ptypeOSquareVector.h
"
6
namespace
osl
7
{
8
namespace
effect_action
9
{
13
struct
StorePtypeOSquare
14
{
15
container::PtypeOSquareVector
*
out
;
16
Square
target
;
17
StorePtypeOSquare
(
container::PtypeOSquareVector
*s,
Square
t)
18
:
out
(s),
target
(t)
19
{
20
}
21
template
<Player P,Ptype Type>
22
void
doActionPtype
(
Piece
p)
23
{
24
store
(p);
25
}
26
template
<Player P>
27
void
doAction
(
Piece
p,
Square
)
28
{
29
store
(p);
30
}
31
32
void
store
(
Piece
p)
33
{
34
const
PtypeO
ptypeO = p.
ptypeO
();
35
out
->push_back(std::make_pair(ptypeO, p.
square
()));
36
}
37
};
38
}
// namespace effect_action
39
}
// namespace osl
40
#endif // _STORE_PTYPEO_POSITION_H
41
// ;;; Local Variables:
42
// ;;; mode:c++
43
// ;;; c-basic-offset:2
44
// ;;; End:
Generated on Sun Jul 21 2013 13:37:27 by
1.8.4