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