xref: /petsc/src/binding/petsc4py/docs/source/_templates/autosummary/class.rst (revision 5a48edb989d3ea10d6aff6c0e26d581c18691deb)
1{{ fullname | escape | underline}}
2
3{%- if autotype is defined %}
4{%- set objtype = autotype.get(name) or objtype %}
5{%- endif %}
6
7.. auto{{ objtype }}:: {{ module}}.{{ objname }}
8   :show-inheritance:
9
10   {%- for item in ['__new__', '__init__'] %}
11     {%- if item in members and item not in inherited_members %}
12     {%- endif %}
13   {%- endfor %}
14
15   {%- for item in ['__new__', '__init__'] %}
16     {%- if item in methods %}
17       {%- set dummy = methods.remove(item) %}
18     {%- endif %}
19   {%- endfor %}
20
21   {%- for item in inherited_members %}
22     {%- if item in methods %}
23       {%- set dummy = methods.remove(item) %}
24     {%- endif %}
25     {%- if item in attributes %}
26       {%- set dummy = attributes.remove(item) %}
27     {%- endif %}
28   {%- endfor %}
29
30   {%- set enumerations = [] %}
31   {%- for item in members %}
32     {%- if item not in inherited_members and item not in all_methods and item not in all_attributes %}
33       {%- set dummy = enumerations.append(item) %}
34     {%- endif %}
35   {%- endfor %}
36
37   {% block enumerations_documentation %}
38   {%- if enumerations %}
39   .. rubric:: Enumerations
40   .. autosummary::
41      :toctree:
42   {%+ for item in enumerations %}
43      ~{{ fullname }}.{{ item }}
44   {%- endfor %}
45   {%- endif %}
46   {%- endblock %}
47
48   {% block methods_summary %}
49   {%- if methods %}
50   .. rubric:: Methods Summary
51   .. autosummary::
52   {%+ for item in methods %}
53      ~{{ fullname }}.{{ item }}
54   {%- endfor %}
55   {%- endif %}
56   {%- endblock %}
57
58   {% block attributes_summary %}
59   {%- if attributes %}
60   .. rubric:: Attributes Summary
61   .. autosummary::
62   {%+ for item in attributes %}
63      ~{{ fullname }}.{{ item }}
64   {%- endfor %}
65   {%- endif %}
66   {%- endblock %}
67
68   {% block methods_documentation %}
69   {%- if methods %}
70   .. rubric:: Methods Documentation
71   {%+ for item in methods %}
72   .. automethod:: {{ item }}
73   {%- endfor %}
74   {%- endif %}
75   {%- endblock %}
76
77   {% block attributes_documentation %}
78   {%- if attributes %}
79   .. rubric:: Attributes Documentation
80   {%+ for item in attributes %}
81   .. autoattribute:: {{ item }}
82   {%- endfor %}
83   {%- endif %}
84   {%- endblock %}
85{# #}
86