utilmm::unary_compose< UnaryFun1, UnaryFun2 > Struct Template Reference

Unary functors composition. More...

#include <unary_compose.hh>

List of all members.

Public Member Functions

UnaryFun1::result_type operator() (arg_param x) const
 Call operator.
UnaryFun1::result_type operator() (arg_param x) const
 Call operator.
 unary_compose (UnaryFun1 const &one, UnaryFun2 const &two)
 Constructor.
 unary_compose (UnaryFun1 const &one, UnaryFun2 const &two)
 Constructor.

Private Types

typedef arg_traits< typename
UnaryFun2::argument_type >
::type 
arg_param
typedef arg_traits< typename
UnaryFun2::argument_type >
::type 
arg_param

Private Attributes

UnaryFun1 fun_1
UnaryFun2 fun_2

Related Functions

(Note that these are not member functions.)



template<class Fun1 , class Fun2 >
unary_compose< Fun1, Fun2 > compose1 (Fun1 const &f, Fun2 const &g)
 Composition function.

Detailed Description

template<class UnaryFun1, class UnaryFun2>
struct utilmm::unary_compose< UnaryFun1, UnaryFun2 >

Unary functors composition.

This class helps programmers to compose two std::unary_function in one

Parameters:
UnaryFun1 The first unary function
UnaryFun2 The second unary function

The resulting class is a functor corresponding to UnaryFun1(UnaryFun2(x))

Precondition:
The result_type of UnaryFun2 must be default convertible to the argument_type of UnaryFun1
Author:
Frédéric Py <fpy@laas.fr>
See also:
utilmm::binary_compose_2

Definition at line 31 of file install/include/utilmm/functional/unary_compose.hh.


Member Typedef Documentation

template<class UnaryFun1, class UnaryFun2>
typedef arg_traits<typename UnaryFun2::argument_type>::type utilmm::unary_compose< UnaryFun1, UnaryFun2 >::arg_param [private]

Definition at line 39 of file utilmm/functional/unary_compose.hh.

template<class UnaryFun1, class UnaryFun2>
typedef arg_traits<typename UnaryFun2::argument_type>::type utilmm::unary_compose< UnaryFun1, UnaryFun2 >::arg_param [private]

Constructor & Destructor Documentation

template<class UnaryFun1, class UnaryFun2>
utilmm::unary_compose< UnaryFun1, UnaryFun2 >::unary_compose ( UnaryFun1 const &  one,
UnaryFun2 const &  two 
) [inline]

Constructor.

Create a new instance having the two functors instances to compose.

Parameters:
one The first functor
two The second functor
Postcondition:
newly created instance will have exactly the same behavior as one(two(x)).
See also:
utilmm::compose1

Definition at line 55 of file install/include/utilmm/functional/unary_compose.hh.

template<class UnaryFun1, class UnaryFun2>
utilmm::unary_compose< UnaryFun1, UnaryFun2 >::unary_compose ( UnaryFun1 const &  one,
UnaryFun2 const &  two 
) [inline]

Constructor.

Create a new instance having the two functors instances to compose.

Parameters:
one The first functor
two The second functor
Postcondition:
newly created instance will have exactly the same behavior as one(two(x)).
See also:
utilmm::compose1

Definition at line 55 of file utilmm/functional/unary_compose.hh.


Member Function Documentation

template<class UnaryFun1, class UnaryFun2>
UnaryFun1::result_type utilmm::unary_compose< UnaryFun1, UnaryFun2 >::operator() ( arg_param  x  )  const [inline]

Call operator.

Compute the result of the composition for a given argument

Parameters:
x The argument
Returns:
The result of the operation

Definition at line 66 of file utilmm/functional/unary_compose.hh.

template<class UnaryFun1, class UnaryFun2>
UnaryFun1::result_type utilmm::unary_compose< UnaryFun1, UnaryFun2 >::operator() ( arg_param  x  )  const [inline]

Call operator.

Compute the result of the composition for a given argument

Parameters:
x The argument
Returns:
The result of the operation

Definition at line 66 of file install/include/utilmm/functional/unary_compose.hh.


Friends And Related Function Documentation

template<class Fun1 , class Fun2 >
unary_compose< Fun1, Fun2 > compose1 ( Fun1 const &  f,
Fun2 const &  g 
) [related]

Composition function.

This function create a new unary_compose instance based on two given function. It only ease the declaration of unary_compose instances.

Parameters:
f The first function
g The second function
Returns:
a functor corresponding to f(g(x))
See also:
unary_compose::unary_compose

Definition at line 88 of file install/include/utilmm/functional/unary_compose.hh.


Member Data Documentation

template<class UnaryFun1, class UnaryFun2>
UnaryFun1 utilmm::unary_compose< UnaryFun1, UnaryFun2 >::fun_1 [private]
template<class UnaryFun1, class UnaryFun2>
UnaryFun2 utilmm::unary_compose< UnaryFun1, UnaryFun2 >::fun_2 [private]

The documentation for this struct was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


utilmm
Author(s): Sylvain Joyeux/sylvain.joyeux@m4x.org
autogenerated on Fri Jan 11 10:07:43 2013