Warning, file /include/boost/python/ptr.hpp was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 #ifndef BOOST_PYTHON_PTR_HPP
0002 # define BOOST_PYTHON_PTR_HPP
0003
0004 # include <boost/python/detail/prefix.hpp>
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 # include <boost/config.hpp>
0015 # include <boost/mpl/bool.hpp>
0016
0017 namespace boost { namespace python {
0018
0019 template<class Ptr> class pointer_wrapper
0020 {
0021 public:
0022 typedef Ptr type;
0023
0024 explicit pointer_wrapper(Ptr x): p_(x) {}
0025 operator Ptr() const { return p_; }
0026 Ptr get() const { return p_; }
0027 private:
0028 Ptr p_;
0029 };
0030
0031 template<class T>
0032 inline pointer_wrapper<T> ptr(T t)
0033 {
0034 return pointer_wrapper<T>(t);
0035 }
0036
0037 template<typename T>
0038 class is_pointer_wrapper
0039 : public mpl::false_
0040 {
0041 };
0042
0043 template<typename T>
0044 class is_pointer_wrapper<pointer_wrapper<T> >
0045 : public mpl::true_
0046 {
0047 };
0048
0049 template<typename T>
0050 class unwrap_pointer
0051 {
0052 public:
0053 typedef T type;
0054 };
0055
0056 template<typename T>
0057 class unwrap_pointer<pointer_wrapper<T> >
0058 {
0059 public:
0060 typedef T type;
0061 };
0062
0063 }}
0064
0065 #endif