File: module.cpp

package info (click to toggle)
apbs 3.4.1-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 199,188 kB
  • sloc: ansic: 284,988; cpp: 60,416; fortran: 44,896; xml: 13,895; sh: 13,838; python: 8,105; yacc: 2,922; makefile: 1,428; f90: 989; objc: 448; lex: 294; awk: 266; sed: 205; java: 134; csh: 79
file content (41 lines) | stat: -rw-r--r-- 988 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#include <pybind11/pybind11.h>

#ifdef __GNUC__
#pragma GCC diagnostic ignored "-Wunused-function"
#endif
#include "bind_nosh.hpp"
#include "bind_vatom.hpp"
#include "bind_valist.hpp"
#include "bind_constants.hpp"

/**
 * @file tools/python-pybind/module.cpp
 * @author Asher Mancinelli <asher.mancinelli@pnnl.gov>
 *
 * @brief Creates python module and passes to each binding function.
 *
 * @note Keep all binding functions in their own header/impl pair. No raw
 * functions or binding should live in this file; this is for creating the
 * module and passing to binding functions only.
 */

namespace py = pybind11;

PYBIND11_MODULE(apbs, m) {
  m.doc() = R"pbdoc(APBS Python Bindings

    .. note:: When the C code would return an int to represent an error code, these
      bindings will return a `None` value. For example,

    .. code:: python

      from apbs import NOsh
      nosh = NOsh()

    )pbdoc";

  bind_valist(m);
  bind_nosh(m);
  bind_vatom(m);
  bind_constants(m);
}