2019-07-19 09:10:38 -05:00
|
|
|
***************************************
|
|
|
|
API documentation and generated content
|
|
|
|
***************************************
|
2015-04-22 15:39:19 -05:00
|
|
|
|
2017-03-15 12:29:04 -05:00
|
|
|
.. contents:: Table of Contents
|
|
|
|
|
2019-07-19 09:10:38 -05:00
|
|
|
:mod:`test_py_module`
|
|
|
|
=====================
|
|
|
|
|
2023-08-28 10:16:30 -05:00
|
|
|
.. automodule:: test_py_module.test
|
|
|
|
:members:
|
|
|
|
:private-members:
|
|
|
|
:special-members:
|
2017-03-15 12:13:46 -05:00
|
|
|
|
2019-07-19 09:10:38 -05:00
|
|
|
|
|
|
|
C++ API
|
|
|
|
=======
|
|
|
|
|
|
|
|
.. cpp:type:: MyType
|
|
|
|
|
|
|
|
Some type
|
|
|
|
|
|
|
|
.. cpp:function:: const MyType Foo(const MyType bar)
|
|
|
|
|
|
|
|
Some function type thing
|
|
|
|
|
|
|
|
.. cpp:class:: template<typename T, std::size_t N> std::array
|
|
|
|
|
|
|
|
Some cpp class
|
|
|
|
|
2019-07-25 20:27:22 -05:00
|
|
|
.. cpp:member:: float Sphinx::version
|
|
|
|
|
|
|
|
The description of Sphinx::version.
|
|
|
|
|
|
|
|
.. cpp:var:: int version
|
|
|
|
|
|
|
|
The description of version.
|
|
|
|
|
|
|
|
.. cpp:type:: std::vector<int> List
|
|
|
|
|
|
|
|
The description of List type.
|
|
|
|
|
|
|
|
.. cpp:enum:: MyEnum
|
|
|
|
|
|
|
|
An unscoped enum.
|
|
|
|
|
|
|
|
.. cpp:enumerator:: A
|
|
|
|
|
|
|
|
.. cpp:enum-class:: MyScopedEnum
|
|
|
|
|
|
|
|
A scoped enum.
|
|
|
|
|
|
|
|
.. cpp:enumerator:: B
|
|
|
|
|
|
|
|
.. cpp:enum-struct:: protected MyScopedVisibilityEnum : std::underlying_type<MySpecificEnum>::type
|
|
|
|
|
|
|
|
A scoped enum with non-default visibility, and with a specified underlying type.
|
|
|
|
|
|
|
|
.. cpp:enumerator:: B
|
|
|
|
|
|
|
|
|
|
|
|
JavaScript API
|
|
|
|
==============
|
|
|
|
|
|
|
|
.. Copied from sphinx-doc/sphinx/tests/roots
|
|
|
|
|
|
|
|
.. js:module:: module_a.submodule
|
|
|
|
|
|
|
|
* Link to :js:class:`ModTopLevel`
|
|
|
|
|
|
|
|
.. js:class:: ModTopLevel
|
|
|
|
|
|
|
|
* Link to :js:meth:`mod_child_1`
|
|
|
|
* Link to :js:meth:`ModTopLevel.mod_child_1`
|
|
|
|
|
|
|
|
.. js:method:: ModTopLevel.mod_child_1
|
|
|
|
|
|
|
|
* Link to :js:meth:`mod_child_2`
|
|
|
|
|
|
|
|
.. js:method:: ModTopLevel.mod_child_2
|
|
|
|
|
|
|
|
* Link to :js:meth:`module_a.submodule.ModTopLevel.mod_child_1`
|
|
|
|
|
|
|
|
.. js:module:: module_b.submodule
|
|
|
|
|
|
|
|
* Link to :js:class:`ModTopLevel`
|
|
|
|
|
|
|
|
.. js:class:: ModNested
|
|
|
|
|
|
|
|
.. js:method:: nested_child_1
|
|
|
|
|
|
|
|
* Link to :js:meth:`nested_child_2`
|
|
|
|
|
|
|
|
.. js:method:: nested_child_2
|
|
|
|
|
|
|
|
* Link to :js:meth:`nested_child_1`
|
|
|
|
|
2019-07-19 09:10:38 -05:00
|
|
|
|
2018-03-01 09:15:53 -06:00
|
|
|
Generated Index
|
|
|
|
===============
|
|
|
|
|
2023-04-22 13:58:10 -05:00
|
|
|
Part of the sphinx build process is to generate an index file: :ref:`genindex`.
|
2018-03-01 09:15:53 -06:00
|
|
|
|
2017-03-15 12:13:46 -05:00
|
|
|
|
|
|
|
Optional parameter args
|
|
|
|
=======================
|
|
|
|
|
|
|
|
At this point optional parameters `cannot be generated from code`_.
|
|
|
|
However, some projects will manually do it, like so:
|
|
|
|
|
|
|
|
This example comes from `django-payments module docs`_.
|
|
|
|
|
|
|
|
.. class:: payments.dotpay.DotpayProvider(seller_id, pin[, channel=0[, lock=False], lang='pl'])
|
|
|
|
|
|
|
|
This backend implements payments using a popular Polish gateway, `Dotpay.pl <http://www.dotpay.pl>`_.
|
|
|
|
|
|
|
|
Due to API limitations there is no support for transferring purchased items.
|
|
|
|
|
|
|
|
|
|
|
|
:param seller_id: Seller ID assigned by Dotpay
|
|
|
|
:param pin: PIN assigned by Dotpay
|
|
|
|
:param channel: Default payment channel (consult reference guide)
|
|
|
|
:param lang: UI language
|
|
|
|
:param lock: Whether to disable channels other than the default selected above
|
|
|
|
|
|
|
|
.. _cannot be generated from code: https://groups.google.com/forum/#!topic/sphinx-users/_qfsVT5Vxpw
|
|
|
|
.. _django-payments module docs: http://django-payments.readthedocs.org/en/latest/modules.html#payments.authorizenet.AuthorizeNetProvide
|
|
|
|
|
|
|
|
|
|
|
|
Data
|
|
|
|
====
|
|
|
|
|
|
|
|
.. data:: Data_item_1
|
|
|
|
Data_item_2
|
|
|
|
Data_item_3
|
|
|
|
|
|
|
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce congue elit eu hendrerit mattis.
|
|
|
|
|
|
|
|
Some data link :data:`Data_item_1`.
|
2022-11-04 13:59:17 -05:00
|
|
|
|
|
|
|
|
|
|
|
Sphinx Extensions
|
|
|
|
=================
|
|
|
|
|
|
|
|
sphinx.ext.autosummary
|
|
|
|
----------------------
|
|
|
|
|
2023-08-28 10:16:30 -05:00
|
|
|
.. autosummary::
|
2022-11-04 13:59:17 -05:00
|
|
|
|
2023-08-28 10:16:30 -05:00
|
|
|
test_py_module.test.add_numbers
|
|
|
|
test_py_module.test.subtract_numbers
|
|
|
|
test_py_module.test.Foo
|