30 #ifndef _COUPLING_POLICY_HXX_
31 #define _COUPLING_POLICY_HXX_
33 #include "IteratorTraits.hxx"
34 #include "FindKeyPredicate.hxx"
76 template <
typename Container >
77 bool isDataIdConveniant(Container & storedDatas,
78 const typename Container::key_type & expectedDataId,
79 bool & isEqual ,
bool & isBounded,
80 typename Container::iterator & wDataIt1 )
const {
81 typedef typename Container::key_type key_type;
82 typedef typename Container::value_type value_type;
83 typedef typename Container::iterator iterator;
86 wDataIt1 = std::find_if(storedDatas.begin(),storedDatas.end(),fkp);
87 isEqual = (wDataIt1 != storedDatas.end());
88 std::cout <<
"-------- Generic isDataIdConvenient : isEqual : " << isEqual <<
" , isBounded " << isBounded << std::endl;
89 return isEqual || isBounded;
97 template <
typename DataManipulator,
class EnableIf =
void >
100 template <
typename Iterator,
typename DataId >
101 void inline apply(
typename iterator_t<Iterator>::value_type & data,
102 const DataId & dataId,
103 const Iterator & it1)
const {
104 typedef typename iterator_t<Iterator>::value_type value_type;
105 std::cout <<
"-------- Generic BoundedDataIdProcessor.apply() called " << std::endl;
115 template <
typename DataManipulator>
120 template <
typename Container >
121 void apply(Container & storedDatas,
122 typename Container::iterator & wDataIt1 )
const {
123 typedef typename Container::key_type key_type;
124 typedef typename Container::value_type value_type;
125 typedef typename Container::iterator iterator;
127 std::cout <<
"-------- Generic eraseDataId called " << std::endl;
136 template <
typename DataManipulator >
141 template <
typename Container,
typename DataId >
142 bool apply(Container & storedDatas,
143 const DataId & expectedDataId,
144 typename Container::iterator & wDataIt1 )
const {
145 typedef typename Container::key_type key_type;
146 typedef typename Container::value_type value_type;
147 typedef typename Container::iterator iterator;
149 std::cout <<
"-------- Generic DisconnectProcessor called " << std::endl;
155 template <
typename DataManipulator>
160 template <
typename Container ,
typename TimeType ,
typename TagType >
161 void apply(Container & storedDatas, TimeType time, TagType tag,
bool before )
const {
162 typedef typename Container::key_type key_type;
163 typedef typename Container::value_type value_type;
164 typedef typename Container::iterator iterator;
170 virtual void wakeupWaiting(){};