Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:36:54

0001 //
0002 // Copyright 2005-2007 Adobe Systems Incorporated
0003 //
0004 // Distributed under the Boost Software License, Version 1.0
0005 // See accompanying file LICENSE_1_0.txt or copy at
0006 // http://www.boost.org/LICENSE_1_0.txt
0007 //
0008 #ifndef BOOST_GIL_CONCEPTS_COLOR_HPP
0009 #define BOOST_GIL_CONCEPTS_COLOR_HPP
0010 
0011 #include <boost/gil/concepts/concept_check.hpp>
0012 
0013 #include <type_traits>
0014 
0015 #if defined(BOOST_CLANG)
0016 #pragma clang diagnostic push
0017 #pragma clang diagnostic ignored "-Wunknown-pragmas"
0018 #pragma clang diagnostic ignored "-Wunused-local-typedefs"
0019 #endif
0020 
0021 #if defined(BOOST_GCC) && (BOOST_GCC >= 40900)
0022 #pragma GCC diagnostic push
0023 #pragma GCC diagnostic ignored "-Wunused-local-typedefs"
0024 #endif
0025 
0026 namespace boost { namespace gil {
0027 
0028 /// \ingroup ColorSpaceAndLayoutConcept
0029 /// \brief Color space type concept
0030 /// \code
0031 /// concept ColorSpaceConcept<MPLRandomAccessSequence CS>
0032 /// {
0033 ///    // Boost.MP11-compatible list, whose elements are color tags.
0034 /// };
0035 /// \endcode
0036 template <typename CS>
0037 struct ColorSpaceConcept
0038 {
0039     void constraints()
0040     {
0041         // Boost.MP11-compatible list, whose elements are color tags
0042 
0043         // TODO: Is this incomplete?
0044     }
0045 };
0046 
0047 // Models ColorSpaceConcept
0048 template <typename CS1, typename CS2>
0049 struct color_spaces_are_compatible : std::is_same<CS1, CS2> {};
0050 
0051 /// \ingroup ColorSpaceAndLayoutConcept
0052 /// \brief Two color spaces are compatible if they are the same
0053 /// \code
0054 /// concept ColorSpacesCompatibleConcept<ColorSpaceConcept CS1, ColorSpaceConcept CS2>
0055 /// {
0056 ///     where SameType<CS1, CS2>;
0057 /// };
0058 /// \endcode
0059 template <typename CS1, typename CS2>
0060 struct ColorSpacesCompatibleConcept
0061 {
0062     void constraints()
0063     {
0064         static_assert(color_spaces_are_compatible<CS1, CS2>::value, "");
0065     }
0066 };
0067 
0068 /// \ingroup ColorSpaceAndLayoutConcept
0069 /// \brief Channel mapping concept
0070 /// \code
0071 /// concept ChannelMappingConcept<MPLRandomAccessSequence CM>
0072 /// {
0073 ///     // Boost.MP11-compatible list, whose elements
0074 ///     // model MPLIntegralConstant representing a permutation
0075 /// };
0076 /// \endcode
0077 template <typename CM>
0078 struct ChannelMappingConcept
0079 {
0080     void constraints()
0081     {
0082         // Boost.MP11-compatible list, whose elements model
0083         // MPLIntegralConstant representing a permutation.
0084 
0085         // TODO: Is this incomplete?
0086     }
0087 };
0088 
0089 }} // namespace boost::gil
0090 
0091 #if defined(BOOST_CLANG)
0092 #pragma clang diagnostic pop
0093 #endif
0094 
0095 #if defined(BOOST_GCC) && (BOOST_GCC >= 40900)
0096 #pragma GCC diagnostic pop
0097 #endif
0098 
0099 #endif