summaryrefslogtreecommitdiff
path: root/gnuradio-core/src/lib
diff options
context:
space:
mode:
authorjcorgan2009-02-10 04:53:37 +0000
committerjcorgan2009-02-10 04:53:37 +0000
commit7783dc88c6acf839b59c7c3358094f85e0012ada (patch)
tree42b3ed5759abef32e75b28d9936aa660cc47ab68 /gnuradio-core/src/lib
parent417a36b82e23fa681e361541c1824ba4de811a7a (diff)
downloadgnuradio-7783dc88c6acf839b59c7c3358094f85e0012ada.tar.gz
gnuradio-7783dc88c6acf839b59c7c3358094f85e0012ada.tar.bz2
gnuradio-7783dc88c6acf839b59c7c3358094f85e0012ada.zip
Merged r10385:10413 from michaelld/swig_tweaks into trunk. Passes distcheck.
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10414 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gnuradio-core/src/lib')
-rw-r--r--gnuradio-core/src/lib/runtime/Makefile.am3
-rw-r--r--gnuradio-core/src/lib/swig/Makefile.am12
-rw-r--r--gnuradio-core/src/lib/swig/atsc.i136
-rw-r--r--gnuradio-core/src/lib/swig/gnuradio.i24
-rw-r--r--gnuradio-core/src/lib/swig/gr_shared_ptr.i (renamed from gnuradio-core/src/lib/swig/shared_ptr.i)0
-rw-r--r--gnuradio-core/src/lib/swig/gr_swig_block_magic.i (renamed from gnuradio-core/src/lib/runtime/gr_swig_block_magic.i)0
-rw-r--r--gnuradio-core/src/lib/swig/sw_filter.i11
-rw-r--r--gnuradio-core/src/lib/swig/sw_general.i11
-rw-r--r--gnuradio-core/src/lib/swig/sw_gengen.i11
-rw-r--r--gnuradio-core/src/lib/swig/sw_io.i11
-rw-r--r--gnuradio-core/src/lib/swig/sw_runtime.i32
11 files changed, 62 insertions, 189 deletions
diff --git a/gnuradio-core/src/lib/runtime/Makefile.am b/gnuradio-core/src/lib/runtime/Makefile.am
index b21b32412..cc8da49de 100644
--- a/gnuradio-core/src/lib/runtime/Makefile.am
+++ b/gnuradio-core/src/lib/runtime/Makefile.am
@@ -1,5 +1,5 @@
#
-# Copyright 2003,2004,2007,2008 Free Software Foundation, Inc.
+# Copyright 2003,2004,2007,2008,2009 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -152,7 +152,6 @@ swiginclude_HEADERS = \
gr_sync_block.i \
gr_sync_decimator.i \
gr_sync_interpolator.i \
- gr_swig_block_magic.i \
gr_top_block.i \
runtime.i
diff --git a/gnuradio-core/src/lib/swig/Makefile.am b/gnuradio-core/src/lib/swig/Makefile.am
index d468b41a9..98c032199 100644
--- a/gnuradio-core/src/lib/swig/Makefile.am
+++ b/gnuradio-core/src/lib/swig/Makefile.am
@@ -35,11 +35,13 @@ EXTRA_DIST = gen-swig-bug-fix
LOCAL_IFILES = \
gnuradio.i \
- shared_ptr.i \
+ gr_swig_block_magic.i \
+ gr_shared_ptr.i \
sw_general.i \
sw_gengen.i \
sw_filter.i \
- sw_io.i
+ sw_io.i \
+ sw_runtime.i
ALL_IFILES = \
$(LOCAL_IFILES)
@@ -99,7 +101,7 @@ _gnuradio_swig_py_io_la_CXXFLAGS = @swig_CXXFLAGS@
# ----------------------------------------------------------------
-# Part 1: gnuradio.i -> gnuradio_swig_py_runtime
+# Part 1: sw_runtime.i -> gnuradio_swig_py_runtime
#
# We continue to call this gnuradio.i to avoid having to touch
# lots of code in other modules
@@ -123,8 +125,8 @@ _gnuradio_swig_py_runtime_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
gnuradio_swig_py_runtime.py gnuradio_swig_py_runtime.h: gnuradio_swig_py_runtime.cc
-gnuradio_swig_py_runtime.cc : $(srcdir)/gnuradio.i
- if $(SWIG) $(STD_SWIG_PYTHON_ARGS) -MMD -MF gnuradio_swig_py_runtime.Td -module gnuradio_swig_py_runtime -o gnuradio_swig_py_runtime.cc $(srcdir)/gnuradio.i ;\
+gnuradio_swig_py_runtime.cc : $(srcdir)/sw_runtime.i
+ if $(SWIG) $(STD_SWIG_PYTHON_ARGS) -MMD -MF gnuradio_swig_py_runtime.Td -module gnuradio_swig_py_runtime -o gnuradio_swig_py_runtime.cc $(srcdir)/sw_runtime.i ;\
then if test $(host_os) = mingw32; \
then sed 's,\\\\,/,g' <gnuradio_swig_py_runtime.Td >gnuradio_swig_py_runtime.d; rm -f gnuradio_swig_py_runtime.Td; \
else mv -f gnuradio_swig_py_runtime.Td gnuradio_swig_py_runtime.d; fi \
diff --git a/gnuradio-core/src/lib/swig/atsc.i b/gnuradio-core/src/lib/swig/atsc.i
deleted file mode 100644
index 67f6ac6b3..000000000
--- a/gnuradio-core/src/lib/swig/atsc.i
+++ /dev/null
@@ -1,136 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2003 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-%{
-#include <atsc_types.h>
-#include <atsc_consts.h>
-#include <GrAtscRandomizer.h>
-#include <GrAtscRSEncoder.h>
-#include <GrAtscInterleaver.h>
-#include <GrAtscTrellisEncoder.h>
-#include <GrAtscFieldSyncMux.h>
-#include <GrAtscSymbolMapper.h>
-#include <GrAtscConvert2xTo20.h>
-#include <GrWeaverModHead.h>
-#include <GrWeaverModTail.h>
-
-%}
-
-// from atsc_types.h
-class plinfo;
-class atsc_mpeg_packet;
-class atsc_mpeg_packet_no_sync;
-class atsc_mpeg_packet_rs_encoded;
-class atsc_data_segment;
-class atsc_soft_data_segment;
-
-%include <atsc_consts.h>
-
-
-// leave out the VrHistoryProc and pretend we're directly derived from VrSigProc
-
-// %template(VrHistoryProc_1) VrHistoryProc<atsc_mpeg_packet,atsc_mpeg_packet_no_sync>;
-
-class GrAtscRandomizer : public VrSigProc
-// class GrAtscRandomizer : public VrHistoryProc<atsc_mpeg_packet, atsc_mpeg_packet_no_sync>
-{
-public:
- GrAtscRandomizer ();
- ~GrAtscRandomizer ();
-};
-
-class GrAtscRSEncoder : public VrSigProc
-{
-public:
- GrAtscRSEncoder ();
- ~GrAtscRSEncoder ();
-};
-
-class GrAtscInterleaver : public VrSigProc
-{
-public:
- GrAtscInterleaver ();
- ~GrAtscInterleaver ();
-};
-
-class GrAtscTrellisEncoder : public VrSigProc
-{
-public:
- GrAtscTrellisEncoder ();
- ~GrAtscTrellisEncoder ();
-};
-
-class GrAtscFieldSyncMux : public VrSigProc
-{
-public:
- GrAtscFieldSyncMux ();
- ~GrAtscFieldSyncMux ();
-};
-
-template<class oType>
-class GrAtscSymbolMapper : public VrSigProc
-{
-public:
- GrAtscSymbolMapper ();
- ~GrAtscSymbolMapper ();
-};
-
-%template(GrAtscSymbolMapperF) GrAtscSymbolMapper<float>;
-
-template<class iType, class oType>
-class GrWeaverModHead : public VrSigProc
-{
-public:
- GrWeaverModHead (int interp_factor);
- ~GrWeaverModHead ();
-};
-
-%template(GrWeaverModHeadFF) GrWeaverModHead<float,float>;
-
-template<class iType, class oType>
-class GrWeaverModTail : public VrSigProc {
-public:
- GrWeaverModTail (float freq, float gain);
- ~GrWeaverModTail ();
-
- //! frequency is in Hz
- void set_freq (float frequency);
- void set_gain (float g);
-};
-
-%template(GrWeaverModTailFS) GrWeaverModTail<float,short>;
-
-class GrAtscConvert2xTo20 : public VrSigProc
-{
-public:
- GrAtscConvert2xTo20 ();
- ~GrAtscConvert2xTo20 ();
-};
-
-
-#if 0 // FIXME
-%template(VrSource_mpeg_packet) VrSource<atsc_mpeg_packet>;
-%template(VrFileSource_mpeg_packet) VrFileSource<atsc_mpeg_packet>;
-
-%template(VrSink_mpeg_packet) VrSink<atsc_mpeg_packet>;
-%template(VrFileSink_mpeg_packet) VrFileSink<atsc_mpeg_packet>;
-#endif
diff --git a/gnuradio-core/src/lib/swig/gnuradio.i b/gnuradio-core/src/lib/swig/gnuradio.i
index aa5174a59..7d0241f1c 100644
--- a/gnuradio-core/src/lib/swig/gnuradio.i
+++ b/gnuradio-core/src/lib/swig/gnuradio.i
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2003,2004 Free Software Foundation, Inc.
+ * Copyright 2003,2004,2009 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -25,23 +25,21 @@
// SWIG interface definition
////////////////////////////////////////////////////////////////////////
-
-#ifndef SWIGIMPORTED
-%module(directors="1") gnuradio_swig_py_runtime
-#endif
-
////////////////////////////////////////////////////////////////////////
// Headers
-
%{
+#include "gnuradio_swig_bug_workaround.h" // mandatory bug fix
#include <gr_types.h>
#include <stddef.h> // size_t
%}
%feature("autodoc","1");
-%include <shared_ptr.i>
+// local file
+%include <gr_shared_ptr.i>
+
+// non-local SWIG files
%include <stl.i>
%include <std_complex.i>
%include <std_except.i>
@@ -81,11 +79,9 @@ namespace std {
////////////////////////////////////////////////////////////////////////
-%include <runtime.i>
- // %include <general.i>
- // %include <filter.i>
- // %include <io.i>
-
-// %include <atsc.i>
+#ifndef SW_RUNTIME
+// import runtime.i for all but sw_runtime, since it needs to %include
+%import <runtime.i>
+#endif
////////////////////////////////////////////////////////////////////////
diff --git a/gnuradio-core/src/lib/swig/shared_ptr.i b/gnuradio-core/src/lib/swig/gr_shared_ptr.i
index 9663033ae..9663033ae 100644
--- a/gnuradio-core/src/lib/swig/shared_ptr.i
+++ b/gnuradio-core/src/lib/swig/gr_shared_ptr.i
diff --git a/gnuradio-core/src/lib/runtime/gr_swig_block_magic.i b/gnuradio-core/src/lib/swig/gr_swig_block_magic.i
index 083d60689..083d60689 100644
--- a/gnuradio-core/src/lib/runtime/gr_swig_block_magic.i
+++ b/gnuradio-core/src/lib/swig/gr_swig_block_magic.i
diff --git a/gnuradio-core/src/lib/swig/sw_filter.i b/gnuradio-core/src/lib/swig/sw_filter.i
index d28bddd40..6396a97d0 100644
--- a/gnuradio-core/src/lib/swig/sw_filter.i
+++ b/gnuradio-core/src/lib/swig/sw_filter.i
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2006 Free Software Foundation, Inc.
+ * Copyright 2006,2009 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -23,13 +23,8 @@
%module(directors="1") gnuradio_swig_py_filter
#endif
+ //%feature("autodoc", "1"); // generate python docstrings
-%feature("autodoc", "1"); // generate python docstrings
-
-%import "gnuradio.i" // the common stuff
-
-%{
-#include "gnuradio_swig_bug_workaround.h" // mandatory bug fix
-%}
+%include "gnuradio.i" // the common stuff
%include "filter.i"
diff --git a/gnuradio-core/src/lib/swig/sw_general.i b/gnuradio-core/src/lib/swig/sw_general.i
index 200e6fed9..3ab1b056a 100644
--- a/gnuradio-core/src/lib/swig/sw_general.i
+++ b/gnuradio-core/src/lib/swig/sw_general.i
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2006 Free Software Foundation, Inc.
+ * Copyright 2006,2009 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -23,13 +23,8 @@
%module(directors="1") gnuradio_swig_py_general
#endif
+ //%feature("autodoc", "1"); // generate python docstrings
-%feature("autodoc", "1"); // generate python docstrings
-
-%import "gnuradio.i" // the common stuff
-
-%{
-#include "gnuradio_swig_bug_workaround.h" // mandatory bug fix
-%}
+%include "gnuradio.i" // the common stuff
%include "general.i"
diff --git a/gnuradio-core/src/lib/swig/sw_gengen.i b/gnuradio-core/src/lib/swig/sw_gengen.i
index b885500b7..95e85cf6b 100644
--- a/gnuradio-core/src/lib/swig/sw_gengen.i
+++ b/gnuradio-core/src/lib/swig/sw_gengen.i
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2006 Free Software Foundation, Inc.
+ * Copyright 2006,2009 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -23,13 +23,8 @@
%module(directors="1") gnuradio_swig_py_gengen
#endif
+ //%feature("autodoc", "1"); // generate python docstrings
-%feature("autodoc", "1"); // generate python docstrings
-
-%import "gnuradio.i" // the common stuff
-
-%{
-#include "gnuradio_swig_bug_workaround.h" // mandatory bug fix
-%}
+%include "gnuradio.i" // the common stuff
%include "gengen.i"
diff --git a/gnuradio-core/src/lib/swig/sw_io.i b/gnuradio-core/src/lib/swig/sw_io.i
index acbe1adbe..9318f5d86 100644
--- a/gnuradio-core/src/lib/swig/sw_io.i
+++ b/gnuradio-core/src/lib/swig/sw_io.i
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2006 Free Software Foundation, Inc.
+ * Copyright 2006,2009 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -23,13 +23,8 @@
%module(directors="1") gnuradio_swig_py_io
#endif
+ //%feature("autodoc", "1"); // generate python docstrings
-%feature("autodoc", "1"); // generate python docstrings
-
-%import "gnuradio.i" // the common stuff
-
-%{
-#include "gnuradio_swig_bug_workaround.h" // mandatory bug fix
-%}
+%include "gnuradio.i" // the common stuff
%include "io.i"
diff --git a/gnuradio-core/src/lib/swig/sw_runtime.i b/gnuradio-core/src/lib/swig/sw_runtime.i
new file mode 100644
index 000000000..8f444f9c5
--- /dev/null
+++ b/gnuradio-core/src/lib/swig/sw_runtime.i
@@ -0,0 +1,32 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2009 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef SWIGIMPORTED
+%module(directors="1") gnuradio_swig_py_runtime
+#endif
+
+ //%feature("autodoc", "1"); // generate python docstrings
+
+#define SW_RUNTIME
+%include "gnuradio.i" // the common stuff
+
+%include "runtime.i"