annotate DEPENDENCIES/generic/include/boost/python/long.hpp @ 125:34e428693f5d vext

Vext -> Repoint
author Chris Cannam
date Thu, 14 Jun 2018 11:15:39 +0100
parents 2665513ce2d3
children
rev   line source
Chris@16 1 // Copyright David Abrahams 2002.
Chris@16 2 // Distributed under the Boost Software License, Version 1.0. (See
Chris@16 3 // accompanying file LICENSE_1_0.txt or copy at
Chris@16 4 // http://www.boost.org/LICENSE_1_0.txt)
Chris@16 5 #ifndef LONG_DWA2002627_HPP
Chris@16 6 # define LONG_DWA2002627_HPP
Chris@16 7
Chris@16 8 # include <boost/python/detail/prefix.hpp>
Chris@16 9
Chris@16 10 # include <boost/python/object.hpp>
Chris@16 11 # include <boost/python/converter/pytype_object_mgr_traits.hpp>
Chris@16 12
Chris@16 13 namespace boost { namespace python {
Chris@16 14
Chris@16 15 namespace detail
Chris@16 16 {
Chris@16 17 struct BOOST_PYTHON_DECL long_base : object
Chris@16 18 {
Chris@16 19 protected:
Chris@16 20 long_base(); // new long_
Chris@16 21 explicit long_base(object_cref rhs);
Chris@16 22 explicit long_base(object_cref rhs, object_cref base);
Chris@16 23
Chris@16 24 BOOST_PYTHON_FORWARD_OBJECT_CONSTRUCTORS(long_base, object)
Chris@16 25
Chris@16 26 private:
Chris@16 27 static detail::new_non_null_reference call(object const&);
Chris@16 28 static detail::new_non_null_reference call(object const&, object const&);
Chris@16 29 };
Chris@16 30 }
Chris@16 31
Chris@16 32 class long_ : public detail::long_base
Chris@16 33 {
Chris@16 34 typedef detail::long_base base;
Chris@16 35 public:
Chris@16 36 long_() {} // new long_
Chris@16 37
Chris@16 38 template <class T>
Chris@16 39 explicit long_(T const& rhs)
Chris@16 40 : detail::long_base(object(rhs))
Chris@16 41 {
Chris@16 42 }
Chris@16 43
Chris@16 44 template <class T, class U>
Chris@16 45 explicit long_(T const& rhs, U const& base)
Chris@16 46 : detail::long_base(object(rhs), object(base))
Chris@16 47 {
Chris@16 48 }
Chris@16 49
Chris@16 50 public: // implementation detail -- for internal use only
Chris@16 51 BOOST_PYTHON_FORWARD_OBJECT_CONSTRUCTORS(long_, base)
Chris@16 52 };
Chris@16 53
Chris@16 54 //
Chris@16 55 // Converter Specializations
Chris@16 56 //
Chris@16 57 namespace converter
Chris@16 58 {
Chris@16 59 template <>
Chris@16 60 struct object_manager_traits<long_>
Chris@16 61 : pytype_object_manager_traits<&PyLong_Type,long_>
Chris@16 62 {
Chris@16 63 };
Chris@16 64 }
Chris@16 65
Chris@16 66 }} // namespace boost::python
Chris@16 67
Chris@16 68 #endif // LONG_DWA2002627_HPP