Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/boost/python/base_type_traits.hpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // Copyright David Abrahams 2002.
0002 // Distributed under the Boost Software License, Version 1.0. (See
0003 // accompanying file LICENSE_1_0.txt or copy at
0004 // http://www.boost.org/LICENSE_1_0.txt)
0005 #ifndef BASE_TYPE_TRAITS_DWA2002614_HPP
0006 # define BASE_TYPE_TRAITS_DWA2002614_HPP
0007 
0008 # include <boost/python/detail/prefix.hpp>
0009 
0010 namespace boost { namespace python { 
0011 
0012 namespace detail
0013 {
0014   struct unspecialized {};
0015 }
0016 
0017 // Derive from unspecialized so we can detect whether traits are
0018 // specialized
0019 template <class T> struct base_type_traits
0020   : detail::unspecialized
0021 {};
0022 
0023 template <>
0024 struct base_type_traits<PyObject>
0025 {
0026     typedef PyObject type;
0027 };
0028 
0029 template <>
0030 struct base_type_traits<PyTypeObject>
0031 {
0032     typedef PyObject type;
0033 };
0034 
0035 template <>
0036 struct base_type_traits<PyMethodObject>
0037 {
0038     typedef PyObject type;
0039 };
0040 
0041 }} // namespace boost::python
0042 
0043 #endif // BASE_TYPE_TRAITS_DWA2002614_HPP