41 #include <boost/type_traits/add_reference.hpp> 42 #include <boost/type_traits/add_const.hpp> 43 #include <boost/type_traits/is_same.hpp> 44 #include <boost/type_traits/is_void.hpp> 45 #include <boost/type_traits/remove_reference.hpp> 46 #include <boost/type_traits/remove_const.hpp> 47 #include <boost/mpl/bool.hpp> 48 #include <boost/mpl/logical.hpp> 49 #include <boost/utility.hpp> 62 typedef typename boost::remove_const<
68 :
public boost::mpl::false_
73 :
public boost::mpl::true_
78 :
public boost::mpl::false_
81 template<
typename iter>
94 :
public std::unary_function<T, typename T::first_type>
103 :
public std::unary_function<T, typename T::second_type>
112 template<
typename PairT>
114 :
public std::unary_function<PairT, typename PairT::first_type>
116 typedef typename PairT::first_type ResultT;
118 const ResultT& operator()(
const PairT& p )
124 template<
typename PairT>
126 :
public std::unary_function<PairT, typename PairT::second_type>
128 typedef typename PairT::second_type ResultT;
130 const ResultT& operator()(
const PairT& p )
139 template<
typename MapT>
140 std::vector<typename MapT::mapped_type>
values(
const MapT& map )
142 std::vector<typename MapT::mapped_type> ret;
143 ret.reserve( map.size() );
144 std::transform( map.begin(), map.end(),
145 std::back_inserter( ret ),
150 template<
typename MapT>
151 std::vector<typename MapT::key_type>
keys(
const MapT& map )
153 std::vector<typename MapT::key_type> ret;
154 ret.reserve( map.size() );
155 std::transform( map.begin(), map.end(),
156 std::back_inserter( ret ),
168 struct equal_to< const _Tp& >
169 :
public binary_function<const _Tp&, const _Tp& ,bool>
171 bool operator()(
const _Tp& __x,
const _Tp& __y)
const {
return __x == __y; }
176 struct not_equal_to<const _Tp&>
177 :
public binary_function<const _Tp&, const _Tp&, bool>
179 bool operator()(
const _Tp& __x,
const _Tp& __y)
const {
return __x != __y; }
184 struct greater<const _Tp&>
185 :
public binary_function<const _Tp&,const _Tp&,bool>
187 bool operator()(
const _Tp& __x,
const _Tp& __y)
const {
return __x > __y; }
192 struct less<const _Tp&>
193 :
public binary_function<const _Tp&,const _Tp&,bool>
195 bool operator()(
const _Tp& __x,
const _Tp& __y)
const {
return __x < __y; }
199 template<
class Arg1T,
class Arg2T,
class Arg3T,
class ResultT >
215 :
public std::unary_function<T, T>
224 template<
typename ResultT,
typename Arg1T,
typename Arg2T,
typename Arg3T>
227 typedef ResultT (Signature)( Arg1T, Arg2T, Arg3T );
229 ResultT (*fun)( Arg1T, Arg2T, Arg3T );
241 return (*fun)( a, b, c );
245 template<
typename ResultT,
typename Arg1T,
typename Arg2T,
typename Arg3T>
247 ptr_fun( ResultT (*fun)( Arg1T, Arg2T, Arg3T ) )
254 template<
typename ResultT,
typename Arg1T,
typename Arg2T,
typename Arg3T,
255 typename Arg4T,
typename Arg5T,
typename Arg6T >
258 typedef ResultT (Signature)( Arg1T, Arg2T, Arg3T, Arg4T, Arg5T, Arg6T );
259 ResultT (*fun)( Arg1T, Arg2T, Arg3T, Arg4T, Arg5T, Arg6T );
271 ResultT
operator()( Arg1T a, Arg2T b, Arg3T c, Arg4T d, Arg5T e, Arg6T f )
const 273 return (*fun)( a, b, c, d, e, f );
277 template<
typename ResultT,
typename Arg1T,
typename Arg2T,
typename Arg3T,
278 typename Arg4T,
typename Arg5T,
typename Arg6T >
280 ptr_fun( ResultT (*fun)( Arg1T, Arg2T, Arg3T, Arg4T, Arg5T, Arg6T ) )
292 template<
typename A,
typename B>
295 typedef typeof(
A() *
B() ) result_type;
296 typedef A first_argument_type;
297 typedef B second_argument_type;
299 result_type operator()(
A a,
B b )
const 304 template<
typename A,
typename B>
307 typedef typeof(
A() /
B() ) result_type;
308 typedef A first_argument_type;
309 typedef B second_argument_type;
311 result_type operator()(
A a,
B b )
const 317 template<
typename R,
typename A,
typename B>
329 template<
typename R,
typename A,
typename B>
355 return b == 0 ? 0 : a/b;
359 struct divides3<unsigned int, unsigned int, unsigned int>
365 result_type
operator()(
unsigned int a,
unsigned int b )
const 372 return b == 0 ? 0 : a/b;
389 return b == 0 ? 0 : a/b;
393 struct divides3<unsigned long long, unsigned long long, unsigned long long>
399 result_type
operator()(
unsigned long long a,
unsigned long long b )
const 406 return b == 0 ? 0 : a/b;
409 template<
typename R,
typename A,
typename B>
421 template<
typename R,
typename A,
typename B>
Arg4T fourth_argument_type
Arg3T third_argument_type
unsigned long long result_type
unsigned long long second_argument_type
unsigned int second_argument_type
result_type operator()(A a, B b) const
T::first_type operator()(const T &p)
pointer_to_ternary_function< ResultT, Arg1T, Arg2T, Arg3T > ptr_fun(ResultT(*fun)(Arg1T, Arg2T, Arg3T))
result_type operator()(unsigned int a, unsigned int b) const
Arg1T first_argument_type
Arg6T sixth_argument_type
Arg2T second_argument_type
bool operator()(const _Tp &__x, const _Tp &__y) const
Arg5T fifth_argument_type
unsigned int first_argument_type
ResultT operator()(Arg1T a, Arg2T b, Arg3T c, Arg4T d, Arg5T e, Arg6T f) const
Arg3T third_argument_type
result_type operator()(A a, B b) const
static void delete_all(iter a, iter b)
Arg3T third_argument_type
result_type operator()(int a, int b) const
pointer_to_ternary_function(ResultT(*f)(Arg1T, Arg2T, Arg3T))
Arg1T first_argument_type
T::second_type operator()(const T &p)
Arg2T second_argument_type
Arg2T second_argument_type
long long second_argument_type
bool operator()(const _Tp &__x, const _Tp &__y) const
result_type operator()(A a, B b) const
result_type operator()(unsigned long long a, unsigned long long b) const
bool operator()(const _Tp &__x, const _Tp &__y) const
bool operator()(const _Tp &__x, const _Tp &__y) const
std::vector< typename MapT::key_type > keys(const MapT &map)
Arg1T first_argument_type
unsigned long long first_argument_type
result_type operator()(long long a, long long b) const
const T & operator()(const T &t) const
pointer_to_sixary_function(ResultT(*f)(Arg1T, Arg2T, Arg3T, Arg4T, Arg5T, Arg6T))
std::vector< typename MapT::mapped_type > values(const MapT &map)
boost::remove_const< typename boost::remove_reference< typename function::result_type >::type >::type type
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
result_type operator()(A a, B b) const
long long first_argument_type
ResultT operator()(Arg1T a, Arg2T b, Arg3T c) const