1
/* This file is part of MAUS: http://micewww.pp.rl.ac.uk:8080/projects/maus
3
* MAUS is free software: you can redistribute it and/or modify
4
* it under the terms of the GNU General Public License as published by
5
* the Free Software Foundation, either version 3 of the License, or
6
* (at your option) any later version.
8
* MAUS is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
13
* You should have received a copy of the GNU General Public License
14
* along with MAUS. If not, see <http://www.gnu.org/licenses/>.
25
/* @brief Defines some interfaces available in Python from C
27
* The interface between Python and C in MAUS is usually done using text files
28
* (e.g. json). In a few places we need to make some function calls available
29
* to python. Those function calls are defined here.
32
// Nb: Following tested in tests/py_unit/test_error_handler.py
34
/* @brief Initialise the libMausCpp module
36
* Called by "import libMausCpp" - here we just define the list of functions
37
* available in libMausCpp.
39
PyMODINIT_FUNC initlibMausCpp(void);
42
// Nb: Following tested in tests/py_unit/test_error_handler.py and
43
// tests/cpp_unit/CppErrorHandlerTest.cc
45
/* @brief Call back to make Python ErrorHandler by the CppErrorHandler
47
* Tell C which python function to call in the event of an error by calling the
48
* SetHandleExceptionFunction. Aim is to use the same python code to manage
49
* errors arising from both C and Python; argument is a function with callsign
52
* def HandleExceptionStrings(doc, caller, error_message)
54
* See also: src/common_py/ErrorHandler, src/common_cpp/CppErrorHandler
56
static PyObject* CppErrorHandler_SetHandleExceptionFunction
57
(PyObject *dummy, PyObject *args);