00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 #ifndef MLN_FUN_META_BLUE_HH
00027 # define MLN_FUN_META_BLUE_HH
00028 
00032 
00033 # include <mln/fun/meta/impl.hh>
00034 # include <mln/value/rgb.hh>
00035 
00036 namespace mln
00037 {
00038 
00039   namespace meta
00040   {
00041 
00042     template <class T>
00043     struct blue : impl< blue<T> >
00044     {
00045       typedef T value;
00046     };
00047 
00048   } 
00049 
00050 
00051   template <unsigned n>
00052   struct function< meta::blue< value::rgb<n> > >
00053     : public Function_v2v<function< meta::blue < value::rgb<n> > > >
00054   {
00055     typedef value::rgb<n> value;
00056 
00057     typedef typename value::blue_t result;
00058     result read(const value& c);
00059 
00060     typedef result& lresult;
00061     lresult write(value& c);
00062   };
00063 
00064 
00065 # ifndef MLN_INCLUDE_ONLY
00066 
00067 
00068   template <unsigned n>
00069   inline
00070   typename function< meta::blue< value::rgb<n> > >::result
00071   function< meta::blue< value::rgb<n> > >::read(const value& c)
00072   {
00073     return c.blue();
00074   }
00075 
00076   template <unsigned n>
00077   inline
00078   typename function< meta::blue< value::rgb<n> > >::lresult
00079   function< meta::blue< value::rgb<n> > >::write(value& c)
00080   {
00081     return c.blue();
00082   }
00083 
00084 
00085 # endif // ! MLN_INCLUDE_ONLY
00086 
00087 
00088 } 
00089 
00090 #endif // ! MLN_FUN_META_BLUE_HH