#include "config.hpp"
#include <functional>
#include "basefuncs.hpp"
#include "function_traits.hpp"
#include "factory.hpp"
#include "cmp.hpp"
Go to the source code of this file.
Definition in file functional.hpp.
#define _ARAGELI_BINARY_OPERATOR_FUNC_BUILDER_1 | ( | NAME, | |||
OPER | ) |
Value:
template <typename Arg1, typename Arg2 = Arg1, \ typename Res = Arg1> \ struct NAME : public std::binary_function<Arg1, Arg2, Res> \ { \ Res operator() (const Arg1& x, const Arg2& y) const \ { return OPER(x, y); } \ \ Res operator() (const Arg1& x, Arg2& y) const \ { return OPER(x, y); } \ \ Res operator() (Arg1& x, const Arg2& y) const \ { return OPER(x, y); } \ \ Res operator() (Arg1& x, Arg2& y) const \ { return OPER(x, y); } \ };
Definition at line 148 of file functional.hpp.
#define _ARAGELI_BINARY_OPERATOR_FUNC_BUILDER_2 | ( | NAME, | |||
OPER | ) |
Value:
template <typename Arg1, typename Arg2 = Arg1, \ typename Res = Arg1> \ struct NAME : public std::binary_function<Arg1, Arg2, Res> \ { \ Res operator() (const Arg1& x, const Arg2& y) const \ { return x OPER y; } \ \ Res operator() (const Arg1& x, Arg2& y) const \ { return x OPER y; } \ \ Res operator() (Arg1& x, const Arg2& y) const \ { return x OPER y; } \ \ Res operator() (Arg1& x, Arg2& y) const \ { return x OPER y; } \ };
Definition at line 166 of file functional.hpp.
#define _ARAGELI_FUNC_BUILDER_1 | ( | NAME, | |||
RES | ) |
Value:
struct NAME \ { \ template <typename T> \ RES operator() (const T& x) const \ { return Arageli::NAME(x); } \ };
Definition at line 348 of file functional.hpp.
#define _ARAGELI_FUNC_BUILDER_1 | ( | NAME, | |||
RES | ) |
Value:
template <typename T> \ struct NAME : public std::unary_function<T, RES> \ { \ RES operator() (const T& x) const \ { return Arageli::NAME(x); } \ \ RES operator() (T& x) const \ { return Arageli::NAME(x); } \ }
Definition at line 348 of file functional.hpp.
#define _ARAGELI_FUNC_BUILDER_2 | ( | NAME, | |||
RES | ) |
Value:
struct NAME \ { \ template <typename T1, typename T2> \ RES operator() (const T1& x, const T2& y) const \ { return Arageli::NAME(x, y); } \ };
Definition at line 356 of file functional.hpp.
#define _ARAGELI_UNARY_OPERATOR_FUNC_BUILDER_1 | ( | NAME, | |||
OPER | ) |
Value:
template <typename Arg, typename Res = Arg> \ struct NAME : public std::unary_function<Arg, Res> \ { \ Res operator() (const Arg& x) const \ { return OPER x; } \ \ Res operator() (Arg& x) const \ { return OPER x; } \ };
Definition at line 106 of file functional.hpp.
#define ARAGELI_FUNCTIONAL_BINARY_GFUNC_BY_TAG | ( | NAME, | |||
OPER | ) |
Value:
template<> struct by_tag<function_tag::NAME> \ { \ template <typename T1, typename T2> \ typename binary_function_traits \ <function_tag::NAME, const T1&, const T2&>::result_type \ operator() (const T1& x, const T2& y) const \ { return x OPER y; } \ };
Definition at line 417 of file functional.hpp.
#define ARAGELI_FUNCTIONAL_POSTFIX_MODIF_UNARY_GFUNC_BY_TAG | ( | NAME, | |||
OPER | ) |
Value:
template<> struct by_tag<function_tag::NAME> \ { \ template <typename T1> \ typename unary_function_traits \ <function_tag::NAME, T1>::result_type \ operator() (T1& x) const \ { return x OPER; } \ };
Definition at line 402 of file functional.hpp.
#define ARAGELI_FUNCTIONAL_PREFIX_MODIF_UNARY_GFUNC_BY_TAG | ( | NAME, | |||
OPER | ) |
Value:
template<> struct by_tag<function_tag::NAME> \ { \ template <typename T1> \ typename unary_function_traits \ <function_tag::NAME, T1>::result_type \ operator() (T1& x) const \ { return OPER x; } \ };
Definition at line 387 of file functional.hpp.
#define ARAGELI_FUNCTIONAL_PREFIX_NONMODIF_UNARY_GFUNC_BY_TAG | ( | NAME, | |||
OPER | ) |
Value:
template<> struct by_tag<function_tag::NAME> \ { \ template <typename T1> \ typename unary_function_traits \ <function_tag::NAME, T1>::result_type \ operator() (const T1& x) const \ { return OPER x; } \ };
Definition at line 369 of file functional.hpp.