1 |
|
/* This is a component of LinuxCNC |
2 |
|
* Copyright 2013 Michael Haberler <git@mah.priv.at> |
3 |
|
* |
4 |
|
* This program is free software; you can redistribute it and/or modify |
5 |
|
* it under the terms of the GNU General Public License as published by |
6 |
|
* the Free Software Foundation; either version 2 of the License, or |
7 |
|
* (at your option) any later version. |
8 |
|
* |
9 |
|
* This program is distributed in the hope that it will be useful, |
10 |
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 |
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 |
|
* GNU General Public License for more details. |
13 |
|
* |
14 |
|
* You should have received a copy of the GNU General Public License |
15 |
|
* along with this program; if not, write to the Free Software |
16 |
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 |
|
*/ |
18 |
|
// Interpreter internals - Python bindings |
19 |
|
// Michael Haberler 7/2011 |
20 |
|
|
21 |
|
// (at least in boost 1.55, return_internal_reference needs a definition |
22 |
|
// of boost::python::detail::get which comes from detail/caller.hpp. |
23 |
|
// At first sniff it's a boost bug but what can you do...) |
24 |
|
#include <boost/python/detail/caller.hpp> |
25 |
|
#include <boost/python/return_internal_reference.hpp> |
26 |
|
namespace bp = boost::python; |
27 |
|
|
28 |
|
#include "rs274ngc.hh" |
29 |
|
#include "interp_internal.hh" |
30 |
|
#include "array1.hh" |
31 |
|
|
32 |
|
namespace pp = pyplusplus::containers::static_sized; |
33 |
|
#include "interp_array_types.hh" |
34 |
|
|
35 |
|
|
36 |
68 |
void export_Arrays() |
37 |
|
{ |
38 |
|
using namespace boost::python; |
39 |
|
using namespace boost; |
40 |
|
|
41 |
68 |
pp::register_array_1< int, ACTIVE_G_CODES> ("ActiveGcodesArray" ); |
42 |
68 |
pp::register_array_1< int, ACTIVE_M_CODES> ("ActiveMcodesArray" ); |
43 |
68 |
pp::register_array_1< double, ACTIVE_SETTINGS> ("ActiveSettingsArray"); |
44 |
|
pp::register_array_1< block, MAX_NESTED_REMAPS, |
45 |
68 |
bp::return_internal_reference< 1, bp::default_call_policies > > ("BlocksArray"); |
46 |
68 |
pp::register_array_1< double, RS274NGC_MAX_PARAMETERS > ("ParametersArray"); |
47 |
|
pp::register_array_1< CANON_TOOL_TABLE, CANON_POCKETS_MAX, |
48 |
68 |
bp::return_internal_reference< 1, bp::default_call_policies > > ("ToolTableArray"); |
49 |
|
pp::register_array_1< context, INTERP_SUB_ROUTINE_LEVELS, |
50 |
68 |
bp::return_internal_reference< 1, bp::default_call_policies > > ("SubcontextArray"); |
51 |
68 |
pp::register_array_1< int, 16> ("GmodesArray"); |
52 |
68 |
pp::register_array_1< int, 11> ("MmodesArray"); |
53 |
68 |
pp::register_array_1< double, INTERP_SUB_PARAMS> ("SubroutineParamsArray"); |
54 |
413 |
} |