1 #ifndef color_luv_convert_cmyk
2 #define color_luv_convert_cmyk
3 
4 #include "../../_internal/convert.hpp"
5 
6 #include "../category.hpp"
7 
8 
9 #include "../../cmyk/cmyk.hpp"
10 #include "../../rgb/rgb.hpp"
11 #include "../../xyz/xyz.hpp"
12 
13 
14 namespace color
15  {
16   namespace _internal
17    {
18 
19     template
20      <
21        typename luv_tag_name
22       ,typename cmyk_tag_name
23      >
24      struct convert
25       <
26         ::color::category::luv< luv_tag_name >
27        ,::color::category::cmyk<  cmyk_tag_name >
28       >
29       {
30        public:
31          typedef ::color::category::luv< luv_tag_name >    luv_category_type,  category_left_type;
32          typedef ::color::category::cmyk< cmyk_tag_name >    cmyk_category_type, category_right_type;
33 
34          typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
35 
36          typedef ::color::model< cmyk_category_type >  cmyk_model_type;
37          typedef ::color::model< luv_category_type >  luv_model_type;
38 
39          typedef ::color::rgb< scalar_type >  rgb_model_type;
40          typedef ::color::xyz< scalar_type >  xyz_model_type;
41 
42          typedef ::color::trait::container<category_left_type>     container_left_trait_type;
43          typedef ::color::trait::container<category_right_type>    container_right_trait_type;
44 
45          typedef typename container_left_trait_type::input_type         container_left_input_type;
46          typedef typename container_right_trait_type::model_type  container_right_const_input_type;
47 
processcolor::_internal::convert48          static void process
49           (
50             container_left_input_type         left
51            ,container_right_const_input_type  right
52           )
53           {
54            left = luv_model_type( xyz_model_type( rgb_model_type( cmyk_model_type( right ) ) ) ).container();
55           }
56       };
57 
58    }
59  }
60 
61 #endif
62