function_traits.hpp File Reference

#include "config.hpp"
#include "type_opers.hpp"
#include "type_traits.hpp"

Go to the source code of this file.

Namespaces

namespace  Arageli
namespace  Arageli::function_tag

Classes

struct  Arageli::unary_function_traits_base< TAG, ARG, RETTYPE, ALARG, SE >
 Holds additional information about unary function. More...
struct  Arageli::binary_function_traits_base< TAG, ARG1, ARG2, RETTYPE, ALARG1, ALARG2, SE >
struct  Arageli::ternary_function_traits_base< TAG, ARG1, ARG2, ARG3, RETTYPE, ALARG1, ALARG2, ALARG3, SE >
class  Arageli::function_tag::function
class  Arageli::function_tag::unary
class  Arageli::function_tag::binary
class  Arageli::function_tag::ternary
class  Arageli::function_tag::arithmetic
class  Arageli::function_tag::logical
class  Arageli::function_tag::bitwise
class  Arageli::function_tag::compare
class  Arageli::function_tag::each_compare
class  Arageli::function_tag::all_compare
class  Arageli::function_tag::indirection
class  Arageli::function_tag::address
class  Arageli::function_tag::unary_plus
class  Arageli::function_tag::unary_minus
class  Arageli::function_tag::logical_not
class  Arageli::function_tag::bitwise_not
class  Arageli::function_tag::prefix_increment
class  Arageli::function_tag::prefix_decrement
class  Arageli::function_tag::postfix_increment
class  Arageli::function_tag::postfix_decrement
class  Arageli::function_tag::parentheses_0
class  Arageli::function_tag::parentheses_1
class  Arageli::function_tag::parentheses_2
class  Arageli::function_tag::subscript
class  Arageli::function_tag::plus
class  Arageli::function_tag::minus
class  Arageli::function_tag::multiplies
class  Arageli::function_tag::divides
class  Arageli::function_tag::modulus
class  Arageli::function_tag::logical_or
class  Arageli::function_tag::logical_and
class  Arageli::function_tag::equal_to
class  Arageli::function_tag::not_equal_to
class  Arageli::function_tag::greater
class  Arageli::function_tag::less
class  Arageli::function_tag::greater_equal
class  Arageli::function_tag::less_equal
class  Arageli::function_tag::bitwise_or
class  Arageli::function_tag::bitwise_and
class  Arageli::function_tag::bitwise_xor
class  Arageli::function_tag::shift_left
class  Arageli::function_tag::shift_right
class  Arageli::function_tag::assign
class  Arageli::function_tag::assign_plus
class  Arageli::function_tag::assign_minus
class  Arageli::function_tag::assign_multiplies
class  Arageli::function_tag::assign_divides
class  Arageli::function_tag::assign_modulus
class  Arageli::function_tag::assign_bitwise_or
class  Arageli::function_tag::assign_bitwise_and
class  Arageli::function_tag::assign_bitwise_xor
class  Arageli::function_tag::assign_shift_left
class  Arageli::function_tag::assign_shift_right
class  Arageli::function_tag::left_assign_plus
class  Arageli::function_tag::left_assign_minus
class  Arageli::function_tag::left_assign_multiplies
class  Arageli::function_tag::left_assign_modulus
class  Arageli::function_tag::left_assign_bitwise_or
class  Arageli::function_tag::left_assign_bitwise_and
class  Arageli::function_tag::left_assign_bitwise_xor
class  Arageli::function_tag::left_assign_shift_left
class  Arageli::function_tag::left_assign_shift_right
class  Arageli::function_tag::cmp
class  Arageli::function_tag::each_cmp
class  Arageli::function_tag::each_equal_to
class  Arageli::function_tag::each_not_equal_to
class  Arageli::function_tag::each_greater
class  Arageli::function_tag::each_less
class  Arageli::function_tag::each_greater_equal
class  Arageli::function_tag::each_less_equal
class  Arageli::function_tag::all_equal_to
class  Arageli::function_tag::all_not_equal_to
class  Arageli::function_tag::all_greater
class  Arageli::function_tag::all_less
class  Arageli::function_tag::all_greater_equal
class  Arageli::function_tag::all_less_equal
struct  Arageli::function_tag::omit_each< each_cmp >
struct  Arageli::function_tag::omit_each< each_equal_to >
struct  Arageli::function_tag::omit_each< each_not_equal_to >
struct  Arageli::function_tag::omit_each< each_less >
struct  Arageli::function_tag::omit_each< each_greater >
struct  Arageli::function_tag::omit_each< each_less_equal >
struct  Arageli::function_tag::omit_each< each_greater_equal >
struct  Arageli::function_tag::omit_each< all_equal_to >
struct  Arageli::function_tag::omit_each< all_not_equal_to >
struct  Arageli::function_tag::omit_each< all_less >
struct  Arageli::function_tag::omit_each< all_greater >
struct  Arageli::function_tag::omit_each< all_less_equal >
struct  Arageli::function_tag::omit_each< all_greater_equal >
struct  Arageli::function_tag::compare_category< T >
struct  Arageli::function_tag::compare_category< each_equal_to >
struct  Arageli::function_tag::compare_category< each_not_equal_to >
struct  Arageli::function_tag::compare_category< each_greater >
struct  Arageli::function_tag::compare_category< each_less >
struct  Arageli::function_tag::compare_category< each_greater_equal >
struct  Arageli::function_tag::compare_category< each_less_equal >
struct  Arageli::function_tag::compare_category< all_equal_to >
struct  Arageli::function_tag::compare_category< all_not_equal_to >
struct  Arageli::function_tag::compare_category< all_greater >
struct  Arageli::function_tag::compare_category< all_less >
struct  Arageli::function_tag::compare_category< all_greater_equal >
struct  Arageli::function_tag::compare_category< all_less_equal >
struct  Arageli::unary_function_traits< TAG, ARG >
struct  Arageli::binary_function_traits< TAG, ARG1, ARG2 >
struct  Arageli::ternary_function_traits< TAG, ARG1, ARG2, ARG3 >
struct  Arageli::unary_function_traits< function_tag::address, Arg >
struct  Arageli::unary_function_traits< function_tag::unary_plus, Arg >
struct  Arageli::unary_function_traits< function_tag::unary_minus, Arg >
struct  Arageli::unary_function_traits< function_tag::logical_not, Arg >
struct  Arageli::unary_function_traits< function_tag::bitwise_not, Arg >
struct  Arageli::unary_function_traits< function_tag::prefix_increment, Arg >
struct  Arageli::unary_function_traits< function_tag::prefix_decrement, Arg >
struct  Arageli::unary_function_traits< function_tag::parentheses_0, Arg >
struct  Arageli::binary_function_traits< function_tag::parentheses_1, Arg1, Arg2 >
struct  Arageli::ternary_function_traits< function_tag::parentheses_2, Arg1, Arg2, Arg3 >
struct  Arageli::binary_function_traits< function_tag::plus, Arg1, Arg2 >
struct  Arageli::binary_function_traits< function_tag::minus, Arg1, Arg2 >
struct  Arageli::binary_function_traits< function_tag::multiplies, Arg1, Arg2 >
struct  Arageli::binary_function_traits< function_tag::divides, Arg1, Arg2 >
struct  Arageli::binary_function_traits< function_tag::modulus, Arg1, Arg2 >
struct  Arageli::binary_function_traits< function_tag::logical_or, Arg1, Arg2 >
struct  Arageli::binary_function_traits< function_tag::logical_and, Arg1, Arg2 >
struct  Arageli::binary_function_traits< function_tag::equal_to, Arg1, Arg2 >
struct  Arageli::binary_function_traits< function_tag::not_equal_to, Arg1, Arg2 >
struct  Arageli::binary_function_traits< function_tag::greater, Arg1, Arg2 >
struct  Arageli::binary_function_traits< function_tag::less, Arg1, Arg2 >
struct  Arageli::binary_function_traits< function_tag::greater_equal, Arg1, Arg2 >
struct  Arageli::binary_function_traits< function_tag::less_equal, Arg1, Arg2 >
struct  Arageli::binary_function_traits< function_tag::bitwise_or, Arg1, Arg2 >
struct  Arageli::binary_function_traits< function_tag::bitwise_and, Arg1, Arg2 >
struct  Arageli::binary_function_traits< function_tag::bitwise_xor, Arg1, Arg2 >
struct  Arageli::binary_function_traits< function_tag::shift_left, Arg1, Arg2 >
struct  Arageli::binary_function_traits< function_tag::shift_right, Arg1, Arg2 >
struct  Arageli::binary_function_traits< function_tag::all_equal_to, Arg1, Arg2 >
struct  Arageli::binary_function_traits< function_tag::all_not_equal_to, Arg1, Arg2 >
struct  Arageli::binary_function_traits< function_tag::all_greater, Arg1, Arg2 >
struct  Arageli::binary_function_traits< function_tag::all_less, Arg1, Arg2 >
struct  Arageli::binary_function_traits< function_tag::all_greater_equal, Arg1, Arg2 >
struct  Arageli::binary_function_traits< function_tag::all_less_equal, Arg1, Arg2 >
struct  Arageli::binary_function_traits< function_tag::each_equal_to, Arg1, Arg2 >
struct  Arageli::binary_function_traits< function_tag::each_not_equal_to, Arg1, Arg2 >
struct  Arageli::binary_function_traits< function_tag::each_greater, Arg1, Arg2 >
struct  Arageli::binary_function_traits< function_tag::each_less, Arg1, Arg2 >
struct  Arageli::binary_function_traits< function_tag::each_greater_equal, Arg1, Arg2 >
struct  Arageli::binary_function_traits< function_tag::each_less_equal, Arg1, Arg2 >
struct  Arageli::binary_function_traits< function_tag::assign, Arg1, Arg2 >
struct  Arageli::binary_function_traits< function_tag::assign_plus, Arg1, Arg2 >
struct  Arageli::binary_function_traits< function_tag::assign_minus, Arg1, Arg2 >
struct  Arageli::binary_function_traits< function_tag::assign_multiplies, Arg1, Arg2 >
struct  Arageli::binary_function_traits< function_tag::assign_divides, Arg1, Arg2 >
struct  Arageli::binary_function_traits< function_tag::assign_modulus, Arg1, Arg2 >
struct  Arageli::binary_function_traits< function_tag::assign_bitwise_or, Arg1, Arg2 >
struct  Arageli::binary_function_traits< function_tag::assign_bitwise_and, Arg1, Arg2 >
struct  Arageli::binary_function_traits< function_tag::assign_bitwise_xor, Arg1, Arg2 >
struct  Arageli::binary_function_traits< function_tag::assign_shift_left, Arg1, Arg2 >
struct  Arageli::binary_function_traits< function_tag::assign_shift_right, Arg1, Arg2 >
struct  Arageli::binary_function_traits< function_tag::left_assign_plus, Arg1, Arg2 >
struct  Arageli::binary_function_traits< function_tag::left_assign_minus, Arg1, Arg2 >
struct  Arageli::binary_function_traits< function_tag::left_assign_multiplies, Arg1, Arg2 >
struct  Arageli::binary_function_traits< function_tag::left_assign_modulus, Arg1, Arg2 >
struct  Arageli::binary_function_traits< function_tag::left_assign_bitwise_or, Arg1, Arg2 >
struct  Arageli::binary_function_traits< function_tag::left_assign_bitwise_and, Arg1, Arg2 >
struct  Arageli::binary_function_traits< function_tag::left_assign_bitwise_xor, Arg1, Arg2 >
struct  Arageli::binary_function_traits< function_tag::left_assign_shift_left, Arg1, Arg2 >
struct  Arageli::binary_function_traits< function_tag::left_assign_shift_right, Arg1, Arg2 >

Defines

#define ARAGELI_FUNCTION_TAG_AG2EL(NAME, PREFIX)
#define ARAGELI_FUNCTION_TAG_CMPCAT(TAG, CATEGORY)
#define ARAGELI_UNARY_FUNCTION_TRAITS(MNEM, RETTYPE, ALARG, SE)
#define ARAGELI_BINARY_FUNCTION_TRAITS(MNEM, RETTYPE, ALARG1, ALARG2, SE)
#define ARAGELI_TERNARY_FUNCTION_TRAITS(MNEM, RETTYPE, ALARG1, ALARG2, ALARG3, SE)
#define ARAGELI_EACH_CMP_FUNCTION_TRAITS(MNEM, ALARG1, ALARG2, SE)

Typedefs

typedef assign_plus Arageli::function_tag::right_assign_plus
typedef assign_minus Arageli::function_tag::right_assign_minus
typedef assign_multiplies Arageli::function_tag::right_assign_multiplies
typedef assign_divides Arageli::function_tag::right_assign_divides
typedef assign_modulus Arageli::function_tag::right_assign_modulus
typedef assign_bitwise_or Arageli::function_tag::right_assign_bitwise_or
typedef assign_bitwise_and Arageli::function_tag::right_assign_bitwise_and
typedef assign_bitwise_xor Arageli::function_tag::right_assign_bitwise_xor
typedef assign_shift_left Arageli::function_tag::right_assign_shift_left
typedef assign_shift_right Arageli::function_tag::right_assign_shift_right

Functions

 Arageli::ARAGELI_UNARY_FUNCTION_TRAITS (indirection, typename omit_asterisk< Arg >::type, false, false)
 Arageli::ARAGELI_UNARY_FUNCTION_TRAITS (postfix_increment, typename omit_ref< Arg >::type, true, false)
 Arageli::ARAGELI_UNARY_FUNCTION_TRAITS (postfix_decrement, typename omit_ref< Arg >::type, true, false)
 Arageli::ARAGELI_BINARY_FUNCTION_TRAITS (subscript, typename omit_asterisk< Arg1 >::type, false, false, false)


Detailed Description

This file contains some structures to represent additional information about functions and operators. That information likes that: argument types, result type, side effect, etc. That infrormation is used by some parts of the library. Note that here is only general implementation of the structures, it is not specialized for concrete types and makes some assumptions for specialized types. If function for your types doesn't fit to this implementaion you need to implement own specialization of one or all forms of function_traits templates.

Definition in file function_traits.hpp.


Define Documentation

#define ARAGELI_BINARY_FUNCTION_TRAITS ( MNEM,
RETTYPE,
ALARG1,
ALARG2,
SE   ) 

Value:

template <typename Arg1, typename Arg2>                                 \
    struct binary_function_traits<function_tag::MNEM, Arg1, Arg2> :         \
        public binary_function_traits_base                                  \
        <function_tag::MNEM, Arg1, Arg2, RETTYPE, ALARG1, ALARG2, SE>       \
    {};

Definition at line 367 of file function_traits.hpp.

#define ARAGELI_EACH_CMP_FUNCTION_TRAITS ( MNEM,
ALARG1,
ALARG2,
SE   ) 

Value:

template <typename Arg1, typename Arg2>                         \
    struct binary_function_traits<function_tag::MNEM, Arg1, Arg2> : \
        public binary_function_traits_base                          \
        <                                                           \
            function_tag::MNEM, Arg1, Arg2,                         \
            typename type_traits<Arg1>::                            \
                template other_element_type_refcnt<bool, true>::type,   \
            ALARG1, ALARG2, SE                                      \
        >                                                           \
    {};

Definition at line 381 of file function_traits.hpp.

#define ARAGELI_FUNCTION_TAG_AG2EL ( NAME,
PREFIX   ) 

Value:

template <>                                     \
    struct omit_each<PREFIX##_##NAME>               \
    { typedef NAME type; };

Definition at line 219 of file function_traits.hpp.

#define ARAGELI_FUNCTION_TAG_CMPCAT ( TAG,
CATEGORY   ) 

Value:

template <> struct compare_category<TAG>        \
    { typedef CATEGORY type; };

Definition at line 242 of file function_traits.hpp.

#define ARAGELI_TERNARY_FUNCTION_TRAITS ( MNEM,
RETTYPE,
ALARG1,
ALARG2,
ALARG3,
SE   ) 

Value:

template <typename Arg1, typename Arg2, typename Arg3>                          \
    struct ternary_function_traits<function_tag::MNEM, Arg1, Arg2, Arg3> :          \
        public ternary_function_traits_base                                         \
        <function_tag::MNEM, Arg1, Arg2, Arg3, RETTYPE, ALARG1, ALARG2, ALARG3, SE> \
    {};

Definition at line 374 of file function_traits.hpp.

#define ARAGELI_UNARY_FUNCTION_TRAITS ( MNEM,
RETTYPE,
ALARG,
SE   ) 

Value:

template <typename Arg>                                     \
    struct unary_function_traits<function_tag::MNEM, Arg> :     \
        public unary_function_traits_base                       \
        <function_tag::MNEM, Arg, RETTYPE, ALARG, SE>           \
    {};

Definition at line 359 of file function_traits.hpp.


Generated on Thu Aug 31 17:38:17 2006 for Arageli by  doxygen 1.4.7