1 #ifndef color_YPbPr_convert_lms
2 #define color_YPbPr_convert_lms
3 
4 #include "../../_internal/convert.hpp"
5 
6 #include "../category.hpp"
7 
8 #include "../../lms/lms.hpp"
9 #include "../../xyz/xyz.hpp"
10 #include "../../rgb/rgb.hpp"
11 
12 
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   lms_tag_name, ::color::constant::lms::reference_enum     lms_reference_number
25      >
26      struct convert
27       <
28         ::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number >
29        ,::color::category::lms<     lms_tag_name,   lms_reference_number >
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::lms<     lms_tag_name,   lms_reference_number >    lms_category_type, category_right_type;
35 
36          typedef typename ::color::trait::scalar<category_left_type>::instance_type scalar_type;
37 
38          typedef ::color::model< YPbPr_category_type > YPbPr_model_type;
39          typedef ::color::model<   lms_category_type >   lms_model_type;
40 
41          typedef ::color::rgb< scalar_type >  rgb_model_type;
42          typedef ::color::xyz< scalar_type >  xyz_model_type;
43 
44          typedef ::color::trait::container<category_left_type>     container_left_trait_type;
45          typedef ::color::trait::container<category_right_type>    container_right_trait_type;
46 
47          typedef typename container_left_trait_type::input_type         container_left_input_type;
48          typedef typename container_right_trait_type::model_type  container_right_const_input_type;
49 
processcolor::_internal::convert50          static void process
51           (
52             container_left_input_type         left
53            ,container_right_const_input_type  right
54           )
55           {
56            left = YPbPr_model_type( rgb_model_type( xyz_model_type( lms_model_type( right ) ) ) ).container();
57           }
58       };
59 
60    }
61  }
62 
63 #endif
64