1 #ifndef color_xyy_convert_rgb
2 #define color_xyy_convert_rgb
3 
4 #include "../../_internal/convert.hpp"
5 
6 #include "../category.hpp"
7 
8 
9 
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 xyy_tag_name
22       ,typename rgb_tag_name
23      >
24      struct convert
25       <
26         ::color::category::xyy<  xyy_tag_name >
27        ,::color::category::rgb<  rgb_tag_name >
28       >
29       {
30        public:
31          typedef ::color::category::xyy<  xyy_tag_name > xyy_category_type, category_left_type;
32          typedef ::color::category::rgb<  rgb_tag_name > rgb_category_type, category_right_type;
33 
34          typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
35 
36          typedef ::color::model<   xyy_category_type >      xyy_model_type;
37          typedef ::color::model<   rgb_category_type >      rgb_model_type;
38 
39          typedef ::color::xyz<   scalar_type >      xyz_model_type;
40 
41          typedef ::color::trait::container<category_left_type>     container_left_trait_type;
42          typedef ::color::trait::container<category_right_type>    container_right_trait_type;
43 
44          typedef typename container_left_trait_type::input_type         container_left_input_type;
45          typedef typename container_right_trait_type::model_type  container_right_const_input_type;
46 
processcolor::_internal::convert47          static void process
48           (
49             container_left_input_type         left
50            ,container_right_const_input_type  right
51           )
52           {
53            left = xyy_model_type( xyz_model_type( rgb_model_type( right ) ) ).container();
54           }
55       };
56 
57    }
58  }
59 
60 #endif
61