00001 /* storePtypeOPosition.h 00002 */ 00003 #ifndef _STORE_PTYPEO_POSITION_H 00004 #define _STORE_PTYPEO_POSITION_H 00005 #include "osl/container/ptypeOPositionVector.h" 00006 namespace osl 00007 { 00008 namespace effect_action 00009 { 00013 struct StorePtypeOPosition 00014 { 00015 container::PtypeOPositionVector *out; 00016 Position target; 00017 StorePtypeOPosition(container::PtypeOPositionVector *s, Position t) 00018 : out(s), target(t) 00019 { 00020 } 00021 template<Player P,Ptype Type> 00022 void doActionPtype(Piece p) 00023 { 00024 store(p); 00025 } 00026 template<Player P> 00027 void doAction(Piece p, Position) 00028 { 00029 store(p); 00030 } 00031 00032 void store(Piece p) 00033 { 00034 const PtypeO ptypeO = p.ptypeO(); 00035 out->push_back(std::make_pair(ptypeO, p.position())); 00036 } 00037 }; 00038 } // namespace effect_action 00039 } // namespace osl 00040 #endif // _STORE_PTYPEO_POSITION_H 00041 // ;;; Local Variables: 00042 // ;;; mode:c++ 00043 // ;;; c-basic-offset:2 00044 // ;;; End: