"vscode:/vscode.git/clone" did not exist on "d71ba0cb73616c493d35699a8a9283aa64ef0f6b"
reference.rst 2.58 KB
Newer Older
1
2
.. _reference:

Wenzel Jakob's avatar
Wenzel Jakob committed
3
4
5
6
.. warning::

    Please be advised that the reference documentation discussing pybind11
    internals is currently incomplete. Please refer to the previous sections
7
    and the pybind11 header files for the nitty gritty details.
Wenzel Jakob's avatar
Wenzel Jakob committed
8

9
10
11
Reference
#########

Dean Moldovan's avatar
Dean Moldovan committed
12
13
.. _macros:

14
15
16
Macros
======

17
.. doxygendefine:: PYBIND11_MODULE
18
19
20
21
22
23

.. _core_types:

Convenience classes for arbitrary Python types
==============================================

24
25
Common member functions
-----------------------
26

27
28
.. doxygenclass:: object_api
    :members:
29

30
31
Without reference counting
--------------------------
32

33
34
.. doxygenclass:: handle
    :members:
35
36
37
38

With reference counting
-----------------------

39
40
.. doxygenclass:: object
    :members:
41

42
.. doxygenfunction:: reinterpret_borrow
43

44
.. doxygenfunction:: reinterpret_steal
45
46
47
48

Convenience classes for specific Python types
=============================================

49
.. doxygenclass:: module_
50
    :members:
51

52
53
.. doxygengroup:: pytypes
    :members:
54

55
56
57
58
59
60
61
62
63
64
65
Convenience functions converting to Python types
================================================

.. doxygenfunction:: make_tuple(Args&&...)

.. doxygenfunction:: make_iterator(Iterator, Sentinel, Extra &&...)
.. doxygenfunction:: make_iterator(Type &, Extra&&...)

.. doxygenfunction:: make_key_iterator(Iterator, Sentinel, Extra &&...)
.. doxygenfunction:: make_key_iterator(Type &, Extra&&...)

66
67
68
.. doxygenfunction:: make_value_iterator(Iterator, Sentinel, Extra &&...)
.. doxygenfunction:: make_value_iterator(Type &, Extra&&...)

69
70
.. _extras:

71
72
Passing extra arguments to ``def`` or ``class_``
================================================
73

74
75
.. doxygengroup:: annotations
    :members:
76

77
78
79
80
81
82
83
84
85
86
87
Embedding the interpreter
=========================

.. doxygendefine:: PYBIND11_EMBEDDED_MODULE

.. doxygenfunction:: initialize_interpreter

.. doxygenfunction:: finalize_interpreter

.. doxygenclass:: scoped_interpreter

88
89
90
91
92
93
94
95
96
Redirecting C++ streams
=======================

.. doxygenclass:: scoped_ostream_redirect

.. doxygenclass:: scoped_estream_redirect

.. doxygenfunction:: add_ostream_redirect

97
Python built-in functions
98
=========================
99

100
101
.. doxygengroup:: python_builtins
    :members:
102

103
104
105
106
107
Inheritance
===========

See :doc:`/classes` and :doc:`/advanced/classes` for more detail.

108
.. doxygendefine:: PYBIND11_OVERRIDE
109

110
.. doxygendefine:: PYBIND11_OVERRIDE_PURE
111

112
.. doxygendefine:: PYBIND11_OVERRIDE_NAME
113

114
.. doxygendefine:: PYBIND11_OVERRIDE_PURE_NAME
115

116
.. doxygenfunction:: get_override
117

118
119
Exceptions
==========
120

121
122
.. doxygenclass:: error_already_set
    :members:
123

124
125
.. doxygenclass:: builtin_exception
    :members:
126

127
128
Literals
========
Klemens Morgenstern's avatar
Klemens Morgenstern committed
129

130
.. doxygennamespace:: literals