::color::operation::functor
template< typename category_name >
struct generic_unary_functor
{
public:
typedef category_name category_type;
typedef ::color::trait::index< category_type > index_trait_type;
typedef ::color::trait::container< category_type > container_trait_type;
typedef ::color::model< category_type > model_type;
typedef model_type result_type;
typedef model_type left_type, first_argument_type;
typedef model_type right_type, second_argument_type;
typedef typename index_trait_type::instance_type index_type;
typedef ::color::operation::functor::generic_binary_functor< category_type > this_type;
public:
model_type operator()( model_type const& right )const;
model_type & operator()( model_type & result, model_type const& right )const;
public:
static model_type process( model_type const& right );
static model_type & process( model_type & result, model_type const& right );
};
template< typename category_name >
struct generic_binary_functor
{
public:
typedef category_name category_type;
typedef ::color::trait::index< category_type > index_trait_type;
typedef ::color::trait::container< category_type > container_trait_type;
typedef ::color::model< category_type > model_type;
typedef model_type result_type;
typedef model_type left_type, first_argument_type;
typedef model_type right_type, second_argument_type;
typedef typename index_trait_type::instance_type index_type;
typedef ::color::operation::functor::generic_binary_functor< category_type > this_type;
public:
model_type operator()( model_type const& left, model_type const&right )const;
model_type& operator()( model_type & result, model_type const& left, model_type const&right )const;
public:
static model_type accumulate( model_type &result, model_type const& right );
static model_type process( model_type const& left, model_type const& right );
static model_type & process( model_type & result, model_type const& left, model_type const&right );
};
typedef ::color::rgb<double> color_t;
color_t a{ constant::orange_t{} }, b{ constant::lime_t{} }, r{ constant::blue_t{}
::color::operation::functor::addition<color_t::category_type>{}( r, a );
::color::operation::functor::addition<color_t::category_type>{}( r, a, b );
TODO
TODO
TODO
TODO
TODO
TODO