| 1 |
/* -*- C -*- */ |
| 2 |
// Copyright (C) 2010 Johan Hake |
| 3 |
// Licensed under the GNU LGPL Version 2.1. |
| 4 |
// |
| 5 |
// First added: 2010-08-06 |
| 6 |
// Last changed: 2010-08-11 |
| 7 |
// |
| 8 |
// =========================================================================== |
| 9 |
// Main SWIG directive file for GAMer |
| 10 |
// =========================================================================== |
| 11 |
|
| 12 |
%module (package="gamer") cgamer |
| 13 |
|
| 14 |
// Code included verbatim into the header section of the generated wrapper code |
| 15 |
%{ |
| 16 |
#include <gamer/gamer.h> |
| 17 |
#define PY_ARRAY_UNIQUE_SYMBOL PyDOLFIN |
| 18 |
#include <numpy/arrayobject.h> |
| 19 |
%} |
| 20 |
|
| 21 |
|
| 22 |
// Code included verbatim into the generated wrapper where the Python module |
| 23 |
// gets initialized |
| 24 |
%init%{ |
| 25 |
import_array(); |
| 26 |
%} |
| 27 |
|
| 28 |
// Include general SWIG directives |
| 29 |
%include <exception.i> |
| 30 |
|
| 31 |
// Generate docstrings |
| 32 |
%feature("autodoc", "0"); |
| 33 |
|
| 34 |
// Include gamer typemaps |
| 35 |
%include "gamer_typemaps.i" |
| 36 |
|
| 37 |
// Apply SWIG directives before reading the header files |
| 38 |
%include "pre.i" |
| 39 |
|
| 40 |
// Include the interface of GAMer |
| 41 |
%include "biom.i" |
| 42 |
|
| 43 |
// Apply SWIG directives after reading the header files |
| 44 |
%include "post.i" |
| 45 |
|