// (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_CONST_VIEW_PP_INCLUDED #define BOOST_IDL_CONST_VIEW_PP_INCLUDED #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif #include #include #include #include #include #include #include #include #include #include #include // mpl::true_. namespace boost { namespace interfaces { template class const_view : public Interface::interface_generator::template apply< const_view, mpl::int_<1>, mpl::int_ >::type { public: friend class access; typedef typename Interface::interface_generator interface_generator; BOOST_IDL_CTOR_DEFAULT(const_view) const_view(const Interface& i) : BOOST_IDL_MEMBER_PTR(access::get_interface_pointer(i)), BOOST_IDL_MEMBER_TABLE(access::get_interface_table(i)) { } template const_view( const Subinterface& i, typename enable_if< is_base_and_derived >::type* = 0 ) : BOOST_IDL_MEMBER_PTR(access::get_interface_pointer(i)), BOOST_IDL_MEMBER_TABLE( access::get_interface_table(i) + detail::offset_of::value ) { } template const_view( const T& t, typename disable_if< is_interface >::type* = 0) : BOOST_IDL_MEMBER_PTR(&t), BOOST_IDL_MEMBER_TABLE(detail::initialize_table(t)) { } BOOST_IDL_CTOR_FROM_OBJECT(const_view, T) BOOST_IDL_CORE_INTERFACE_SUPPORT(const_view, 1) }; template struct is_interface< const_view > : mpl::true_ { }; template struct remove_qualifiers< const_view > : remove_qualifiers { }; } } // End namespaces interfaces, boost. #endif // #ifndef BOOST_IDL_CONST_VIEW_PP_INCLUDED