FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
python/include/boost/python/detail/wrapper_base.hpp at python313 · boostorg/python · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
boostorg
/
python
Public
Notifications
You must be signed in to change notification settings
Fork
223
Star
537
Code
Issues
173
Pull requests
34
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
python
/
include
/
boost
/
python
/
detail
/
wrapper_base.hpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
89 lines (68 loc) · 2.02 KB
Breadcrumbs
python
/
include
/
boost
/
python
/
detail
/
wrapper_base.hpp
Copy path
File metadata and controls
89 lines (68 loc) · 2.02 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
//
Copyright David Abrahams 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)
#
ifndef
WRAPPER_BASE_DWA2004722_HPP
#
define
WRAPPER_BASE_DWA2004722_HPP
#
include
<
boost/python/detail/prefix.hpp
>
#
include
<
boost/python/detail/type_traits.hpp
>
namespace
boost
{
namespace
python
{
class
override
;
namespace
detail
{
class
wrapper_base
;
namespace
wrapper_base_
//
ADL disabler
{
inline
PyObject*
get_owner
(wrapper_base
const
volatile
& w);
inline
PyObject*
owner_impl
(
void
const
volatile
*
/*
x
*/
, detail::false_)
{
return
0
;
}
template
<
class
T
>
inline
PyObject*
owner_impl
(T
const
volatile
* x, detail::true_);
template
<
class
T
>
inline
PyObject*
owner
(T
const
volatile
* x)
{
return
wrapper_base_::owner_impl
(x,is_polymorphic<T>());
}
}
class
BOOST_PYTHON_DECL
wrapper_base
{
friend
void
initialize_wrapper
(PyObject* self, wrapper_base* w);
friend
PyObject*
wrapper_base_::get_owner
(wrapper_base
const
volatile
& w);
protected:
wrapper_base
() : m_self(
0
) {}
override
get_override
(
char
const
* name, PyTypeObject* class_object)
const
;
private:
void
detach
();
private:
PyObject* m_self;
};
namespace
wrapper_base_
//
ADL disabler
{
template
<
class
T
>
inline
PyObject*
owner_impl
(T
const
volatile
* x, detail::true_)
{
if
(wrapper_base
const
volatile
* w =
dynamic_cast
<wrapper_base
const
volatile
*>(x))
{
return
wrapper_base_::get_owner
(*w);
}
return
0
;
}
inline
PyObject*
get_owner
(wrapper_base
const
volatile
& w)
{
return
w.
m_self
;
}
}
inline
void
initialize_wrapper
(PyObject* self, wrapper_base* w)
{
w->
m_self
= self;
}
inline
void
initialize_wrapper
(PyObject*
/*
self
*/
, ...) {}
}
//
namespace detail
}}
//
namespace boost::python
#
endif
//
WRAPPER_BASE_DWA2004722_HPP
Back
|
FazBrowse Home
|
New Git URL