object_call.hpp 810 B

1234567891011121314151617181920212223
  1. # if !defined(BOOST_PYTHON_SYNOPSIS)
  2. # // Copyright David Abrahams 2002.
  3. # // Distributed under the Boost Software License, Version 1.0. (See
  4. # // accompanying file LICENSE_1_0.txt or copy at
  5. # // http://www.boost.org/LICENSE_1_0.txt)
  6. # if !defined(BOOST_PP_IS_ITERATING)
  7. # error Boost.Python - do not include this file!
  8. # endif
  9. # define N BOOST_PP_ITERATION()
  10. template <BOOST_PP_ENUM_PARAMS_Z(1, N, class A)>
  11. typename detail::dependent<object, A0>::type
  12. operator()(BOOST_PP_ENUM_BINARY_PARAMS_Z(1, N, A, const& a)) const
  13. {
  14. typedef typename detail::dependent<object, A0>::type obj;
  15. U const& self = *static_cast<U const*>(this);
  16. return call<obj>(get_managed_object(self, tag), BOOST_PP_ENUM_PARAMS_Z(1, N, a));
  17. }
  18. # undef N
  19. # endif // BOOST_PYTHON_SYNOPSIS