12 #ifndef ZYPP_BASE_FUNCTIONAL_H
13 #define ZYPP_BASE_FUNCTIONAL_H
15 #include <boost/functional.hpp>
30 using boost::mem_fun_ref;
78 namespace functor_detail
80 template <
class TFunctor,
class res_type>
96 template <
class TFunctor,
class res_type,
class arg1_type>
97 struct FunctorRef1 :
public std::unary_function<arg1_type, res_type>
112 template <
class TFunctor,
class res_type,
class arg1_type,
class arg2_type>
113 struct FunctorRef2 :
public std::binary_function<arg1_type, arg2_type, res_type>
142 : functor_detail::
FunctorRef2<TFunctor, res_type, arg1_type, arg2_type>( f_r )
149 template <
class TFunctor,
class res_type,
class arg1_type>
154 : functor_detail::FunctorRef1<TFunctor, res_type, arg1_type>( f_r )
161 template <
class TFunctor,
class res_type>
166 : functor_detail::FunctorRef0<TFunctor, res_type>( f_r )
171 template <
class res_type,
class arg1_type,
class arg2_type,
class TFunctor>
172 FunctorRef<TFunctor, res_type, arg1_type, arg2_type>
175 template <
class res_type,
class arg1_type,
class TFunctor>
176 FunctorRef<TFunctor, res_type, arg1_type>
179 template <
class res_type,
class TFunctor>
180 FunctorRef<TFunctor, res_type>
218 template<
class TConst>
235 template<
class TConst>
270 template<
class TCondition>
287 template<
class TCondition>
295 template<
class TACondition,
class TBCondition>
298 Or( TACondition conda_r, TBCondition condb_r )
316 template<
class TACondition,
class TBCondition>
324 template<
class TACondition,
class TBCondition>
327 Chain( TACondition conda_r, TBCondition condb_r )
345 template<
class TACondition,
class TBCondition>
374 { *
_result = val_r;
return false; }
395 { *
_result = val_r;
return true; }
414 template<
class TOutputIterator>
423 { *(
_result++) = val_r;
return true; }
430 template<
class TOutputIterator>
443 #endif // ZYPP_BASE_FUNCTIONAL_H