1 #ifndef color_YDbDr_convert_hsv
2 #define color_YDbDr_convert_hsv
3 
4 #include "../../_internal/convert.hpp"
5 
6 #include "../category.hpp"
7 
8 
9 #include "../../hsv/hsv.hpp"
10 #include "../../rgb/rgb.hpp"
11 
12 namespace color
13  {
14   namespace _internal
15    {
16 
17     template< typename YDbDr_tag_name, typename hsv_tag_name >
18      struct convert
19       <
20         ::color::category::YDbDr<  YDbDr_tag_name >
21        ,::color::category::hsv<  hsv_tag_name >
22       >
23       {
24        public:
25          typedef ::color::category::YDbDr< YDbDr_tag_name >    YDbDr_category_type, category_left_type;
26          typedef ::color::category::hsv< hsv_tag_name >    hsv_category_type, category_right_type;
27 
28          typedef typename ::color::trait::scalar< category_left_type >::instance_type  scalar_type;
29 
30          typedef ::color::model< YDbDr_category_type >  YDbDr_model_type;
31          typedef ::color::model< hsv_category_type >  hsv_model_type;
32 
33          typedef ::color::rgb< scalar_type >  rgb_model_type;
34 
35          typedef ::color::trait::container<category_left_type>     container_left_trait_type;
36          typedef ::color::trait::container<category_right_type>    container_right_trait_type;
37 
38          typedef typename container_left_trait_type::input_type         container_left_input_type;
39          typedef typename container_right_trait_type::model_type  container_right_const_input_type;
40 
processcolor::_internal::convert41          static void process
42           (
43             container_left_input_type         left
44            ,container_right_const_input_type  right
45           )
46           {
47            left = YDbDr_model_type( rgb_model_type( hsv_model_type( right ) ) ).container();
48           }
49         };
50 
51    }
52  }
53 
54 #endif
55