storePiece.h
Go to the documentation of this file.
00001 /* storePiece.h
00002  */
00003 #ifndef _STORE_PIECE_VECTOR_H
00004 #define _STORE_PIECE_VECTOR_H
00005 #include "osl/container/pieceVector.h"
00006 namespace osl
00007 {
00008   namespace effect_action
00009   {
00013     struct StorePiece
00014     {
00015       PieceVector *store;
00016       explicit StorePiece(PieceVector *s) : store(s)
00017       {
00018       }
00019       template<Player P,Ptype Type>
00020       void doActionPtype(Piece p, Square pos)
00021       {
00022         doAction<P>(p, pos);
00023       }
00024       template<Player P>
00025       void doAction(Piece p, Square)
00026       {
00027         store->push_back(p);
00028       }
00029     };
00030   } // namespace effect_action
00031 } // namespace osl
00032 #endif // _STORE_PIECE_VECTOR_H
00033 // ;;; Local Variables:
00034 // ;;; mode:c++
00035 // ;;; c-basic-offset:2
00036 // ;;; End:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines