wrapper of PyObject.
More...
#include <py11/py.hpp>
wrapper of PyObject.
Definition at line 69 of file py.hpp.
py::obj::obj |
( |
PyObject * |
p, |
|
|
bool |
borrowed = false |
|
) |
| |
|
inlinenoexcept |
create from Py functions.
in most of cases, need not to inc ref. please read python doc carefully
Definition at line 132 of file py.hpp.
obj py::obj::a |
( |
const char * |
s | ) |
const |
|
inline |
double py::obj::as_double |
( |
| ) |
const |
|
inline |
as_double from obj.
- Exceptions
-
Definition at line 275 of file py.hpp.
long py::obj::as_long |
( |
| ) |
const |
|
inline |
get long from obj
- Exceptions
-
Definition at line 251 of file py.hpp.
obj py::obj::attr |
( |
const obj & |
o | ) |
const |
|
inline |
get attr.
- Exceptions
-
Definition at line 358 of file py.hpp.
References p().
obj py::obj::attr |
( |
const char * |
s | ) |
const |
|
inline |
get attr.
- Exceptions
-
Definition at line 370 of file py.hpp.
References p().
iter py::obj::begin |
( |
| ) |
const |
|
inline |
get the begin iter.
- Exceptions
-
Definition at line 787 of file py.hpp.
const char* py::obj::c_str |
( |
| ) |
const |
|
inline |
obj py::obj::call |
( |
const obj & |
args | ) |
const |
|
inline |
call with args.
- Exceptions
-
Definition at line 602 of file py.hpp.
obj py::obj::call |
( |
const obj & |
args, |
|
|
const obj & |
kw |
|
) |
| const |
|
inline |
call with args, and key/value pairs.
- Exceptions
-
Definition at line 613 of file py.hpp.
void py::obj::del_attr |
( |
const obj & |
a | ) |
|
|
inline |
del attr.
- Exceptions
-
Definition at line 414 of file py.hpp.
void py::obj::del_attr |
( |
const char * |
a | ) |
|
|
inline |
del attr.
- Exceptions
-
Definition at line 424 of file py.hpp.
void py::obj::del_item |
( |
const obj & |
key | ) |
|
|
inline |
del_item.
- Exceptions
-
Definition at line 699 of file py.hpp.
obj py::obj::dir |
( |
| ) |
const |
|
inline |
py object dir.
- Exceptions
-
Definition at line 720 of file py.hpp.
References p().
bool py::obj::has |
( |
const obj & |
x | ) |
const |
|
inline |
'in' as 'has'.
- Exceptions
-
Definition at line 651 of file py.hpp.
bool py::obj::is_a |
( |
const obj & |
t | ) |
const |
|
inline |
type check
- Exceptions
-
Definition at line 327 of file py.hpp.
template<typename... argT>
obj py::obj::operator() |
( |
argT &&... |
a | ) |
const |
|
inline |
call using operator.
- Exceptions
-
Definition at line 591 of file py.hpp.
References a().
bool py::obj::operator< |
( |
const obj & |
o | ) |
const |
|
inline |
<
- Exceptions
-
Definition at line 436 of file py.hpp.
const obj py::obj::operator[] |
( |
const obj & |
o | ) |
const |
|
inline |
get item.
Warning, a new obj will be got! not a reference to the original one!
- Exceptions
-
Definition at line 677 of file py.hpp.
References p().
obj py::obj::repr |
( |
| ) |
const |
|
inline |
repr.
- Exceptions
-
Definition at line 531 of file py.hpp.
References p().
void py::obj::set_attr |
( |
const obj & |
a, |
|
|
const obj & |
v |
|
) |
| |
|
inline |
set attr.
- Exceptions
-
Definition at line 394 of file py.hpp.
void py::obj::set_attr |
( |
const char * |
a, |
|
|
const obj & |
v |
|
) |
| |
|
inline |
set attr.
- Exceptions
-
Definition at line 404 of file py.hpp.
void py::obj::set_item |
( |
const obj & |
key, |
|
|
const obj & |
value |
|
) |
| |
|
inline |
set_item.
- Exceptions
-
Definition at line 689 of file py.hpp.
long py::obj::size |
( |
| ) |
const |
|
inline |
'len' as 'size'.
- Exceptions
-
Definition at line 626 of file py.hpp.
obj py::obj::to_str |
( |
| ) |
const |
|
inline |
str.
- Exceptions
-
Definition at line 542 of file py.hpp.
References p().
obj py::obj::to_unicode |
( |
| ) |
const |
|
inline |
unicode.
- Exceptions
-
Definition at line 554 of file py.hpp.
References p().
PyObject* py::obj::transfer |
( |
| ) |
|
|
inlinenoexcept |
transfer the ownership of inner object.
- Returns
- the current PyObject*
Definition at line 206 of file py.hpp.
obj py::obj::type |
( |
| ) |
const |
|
inline |
py object type.
- Exceptions
-
Definition at line 312 of file py.hpp.
References p().
The documentation for this class was generated from the following file:
- /NoBackup/git/callpy/include/py11/py.hpp