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