3
0
mirror of https://github.com/triqs/dft_tools synced 2024-12-25 05:43:40 +01:00

Correction.

- forgot the doc file.
- minor correction for wrapping application
This commit is contained in:
Olivier Parcollet 2014-05-31 18:51:50 +02:00
parent 4e9460bc1c
commit 4f51c1e043
7 changed files with 46 additions and 6 deletions

View File

@ -0,0 +1,7 @@
The cfunction class
-----------------------
.. autoclass:: pytriqs.wrap_generator.wrap_generator.cfunction
:members:
:undoc-members:

View File

@ -0,0 +1,7 @@
The class_ class
-----------------------
.. autoclass:: pytriqs.wrap_generator.wrap_generator.class_
:members:
:undoc-members:

View File

@ -0,0 +1,20 @@
.. index:: wrapper
.. module:: pytriqs.wrap_generator.wrap_generator
.. _wrapper:
C++/Python wrapper generator
=======================================
Reference doc. Intro. to be written.
.. toctree::
:maxdepth: 1
module
class
cfunction
example

View File

@ -0,0 +1,9 @@
The module_ class
-----------------------
.. autoclass:: pytriqs.wrap_generator.wrap_generator.module_
:members:
:undoc-members:

View File

@ -470,6 +470,5 @@ module.add_function(name = "make_gf_from_inverse_fourier", signature="gf_view<re
## Code generation ## Code generation
######################## ########################
if __name__ == '__main__' : module.generate_code()
module.generate_code()

View File

@ -28,7 +28,5 @@ for name, doc in [ ("c","annihilation operator"), ("c_dag","creation operator")]
]: ]:
module.add_function(name = name, signature="many_body_operator<double>(%s)"%sign, doc=doc) module.add_function(name = name, signature="many_body_operator<double>(%s)"%sign, doc=doc)
# to generate the module code module.generate_code()
if __name__ == '__main__' :
module.generate_code()

View File

@ -449,7 +449,7 @@ class class_ :
otherwise the behaviour is undefined. otherwise the behaviour is undefined.
""" """
f = cfunction(signature, calling_pattern = calling_pattern, no_self_c = no_self_c, is_constructor = False, f = cfunction(signature, calling_pattern = calling_pattern, no_self_c = no_self_c, is_constructor = False,
is_method = True, is_static = is_static, release_GIL_and_enable_signal = release_GIL_and_enable_signal, doc = doc, c_name = c_name) is_method = True, is_static = is_static, release_GIL_and_enable_signal = release_GIL_and_enable_signal, doc = doc, c_name = c_name or name)
name = name or f.c_name name = name or f.c_name
if name not in self.methods : if name not in self.methods :
self.methods[name] = pyfunction(name = name, is_method = True, is_static = is_static, doc = doc, python_precall = python_precall, python_postcall = python_postcall) self.methods[name] = pyfunction(name = name, is_method = True, is_static = is_static, doc = doc, python_precall = python_precall, python_postcall = python_postcall)