// (C) Copyright Jonathan Turkanis 2004. // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) // Disclaimer: Not a Boost library. #ifndef BOOST_IDL_IMPLEMENTS_HPP_INCLUDED #define BOOST_IDL_IMPLEMENTS_HPP_INCLUDED #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif #include #include #include #include #include #include #include #include #include #include namespace boost { namespace interfaces { #ifndef BOOST_IDL_NO_IMPLEMENTS //--------------------------------------------// namespace detail { template struct implements_impl { template struct implements_base { typedef typename V::template interface_implemented::type type; }; template struct implements_derived { struct not_done { template struct apply { typedef typename mpl::not_< implements_impl::type > >::type type; }; }; typedef typename mpl::iter_fold_if< Superinterfaces, void, // Ignore mpl::always, // Ignore not_done >::type result; typedef typename mpl::not_< is_same< typename mpl::second::type, typename mpl::end::type > >::type type; }; typedef typename Interface::interface_extends superinterfaces; typedef typename mpl::eval_if< mpl::empty, implements_base, implements_derived >::type type; static const bool value = type::value; }; } // End namespace detail. template struct implements : mpl::and_< is_class, detail::implements_impl > { }; #else // #ifndef BOOST_IDL_NO_IMPLEMENTS //-----------------------------------// template struct implements : mpl::false_ { }; #endif // #ifndef BOOST_IDL_NO_IMPLEMENTS //----------------------------------// } } // End namespaces interfaces, boost. #endif // #ifndef BOOST_IDL_IMPLEMENTS_HPP_INCLUDED