commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r3867 - gnuradio/branches/developers/jcorgan/hier/gnur


From: jcorgan
Subject: [Commit-gnuradio] r3867 - gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime
Date: Thu, 26 Oct 2006 17:46:16 -0600 (MDT)

Author: jcorgan
Date: 2006-10-26 17:46:15 -0600 (Thu, 26 Oct 2006)
New Revision: 3867

Added:
   
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_basic_block.cc
   
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_basic_block.h
   
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_basic_block.i
Modified:
   
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/Makefile.am
   
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_block.h
   
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_block.i
   
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_runtime.h
   
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/runtime.i
Log:
Begin refactoring gr_block into gr_basic_block.


Modified: 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/Makefile.am
===================================================================
--- 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/Makefile.am
 2006-10-26 22:24:30 UTC (rev 3866)
+++ 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/Makefile.am
 2006-10-26 23:46:15 UTC (rev 3867)
@@ -30,6 +30,7 @@
 
 
 libruntime_la_SOURCES =                        \
+       gr_basic_block.cc                       \
        gr_block.cc                             \
        gr_block_detail.cc                      \
        gr_buffer.cc                            \
@@ -60,6 +61,7 @@
        qa_runtime.cc                           
 
 grinclude_HEADERS =                            \
+       gr_basic_block.h                        \
        gr_block.h                              \
        gr_block_detail.h                       \
        gr_buffer.h                             \
@@ -94,6 +96,7 @@
        qa_runtime.h                            
 
 swiginclude_HEADERS =                  \
+       gr_basic_block.i                \
        gr_block.i                      \
        gr_block_detail.i               \
        gr_buffer.i                     \

Added: 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_basic_block.cc
===================================================================
--- 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_basic_block.cc
                           (rev 0)
+++ 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_basic_block.cc
   2006-10-26 23:46:15 UTC (rev 3867)
@@ -0,0 +1,36 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006 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 2, 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.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <gr_basic_block.h>
+#include <stdexcept>
+
+gr_basic_block::gr_basic_block()
+{
+}
+  
+gr_basic_block::~gr_basic_block()
+{
+}


Property changes on: 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_basic_block.cc
___________________________________________________________________
Name: svn:eol-style
   + native

Added: 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_basic_block.h
===================================================================
--- 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_basic_block.h
                            (rev 0)
+++ 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_basic_block.h
    2006-10-26 23:46:15 UTC (rev 3867)
@@ -0,0 +1,40 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006 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 2, 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 INCLUDED_GR_BASIC_BLOCK_H
+#define INCLUDED_GR_BASIC_BLOCK_H
+
+#include <gr_runtime.h>
+#include <string>
+
+class gr_basic_block
+{
+private:
+    
+protected:
+    gr_basic_block();
+
+public:
+    virtual ~gr_basic_block();
+};
+
+#endif /* INCLUDED_GR_BASIC_BLOCK_H */


Property changes on: 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_basic_block.h
___________________________________________________________________
Name: svn:eol-style
   + native

Added: 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_basic_block.i
===================================================================
--- 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_basic_block.i
                            (rev 0)
+++ 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_basic_block.i
    2006-10-26 23:46:15 UTC (rev 3867)
@@ -0,0 +1,44 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006 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 2, 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.
+ */
+
+class gr_basic_block;
+typedef boost::shared_ptr<gr_basic_block> gr_basic_block_sptr;
+%template(gr_basic_block_sptr) boost::shared_ptr<gr_basic_block>;
+
+// support vectors of these...
+namespace std {
+  %template(x_vector_gr_basic_block_sptr) vector<gr_basic_block_sptr>;
+};
+
+class gr_basic_block 
+{
+protected:
+    gr_basic_block();
+
+public:
+    virtual ~gr_basic_block();
+};
+
+%pythoncode %{
+gr_basic_block_sptr.__repr__ = lambda self: "<gr_basic_block %s (%d)>" % 
(self.name(), self.unique_id ())
+gr_basic_block_sptr.block = lambda self: self
+%}


Property changes on: 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_basic_block.i
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_block.h
===================================================================
--- 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_block.h
  2006-10-26 22:24:30 UTC (rev 3866)
+++ 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_block.h
  2006-10-26 23:46:15 UTC (rev 3867)
@@ -23,6 +23,7 @@
 #ifndef INCLUDED_GR_BLOCK_H
 #define INCLUDED_GR_BLOCK_H
 
+#include <gr_basic_block.h>
 #include <gr_runtime.h>
 #include <string>
 
@@ -49,7 +50,7 @@
  * It reads the input items and writes the output items.
  */
 
-class gr_block {
+class gr_block : public gr_basic_block {
 
  public:
   

Modified: 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_block.i
===================================================================
--- 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_block.i
  2006-10-26 22:24:30 UTC (rev 3866)
+++ 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_block.i
  2006-10-26 23:46:15 UTC (rev 3867)
@@ -29,7 +29,7 @@
   %template(x_vector_gr_block_sptr)    vector<gr_block_sptr>;
 };
 
-class gr_block {
+class gr_block : public gr_basic_block {
  protected:
   gr_block (const std::string &name,
             gr_io_signature_sptr input_signature,

Modified: 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_runtime.h
===================================================================
--- 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_runtime.h
        2006-10-26 22:24:30 UTC (rev 3866)
+++ 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/gr_runtime.h
        2006-10-26 23:46:15 UTC (rev 3867)
@@ -29,12 +29,14 @@
  * typedefs for smart pointers we use throughout the runtime system
  */
 
+class gr_basic_block;
 class gr_block;
 class gr_block_detail;
 class gr_io_signature;
 class gr_buffer;
 class gr_buffer_reader;
 
+typedef boost::shared_ptr<gr_basic_block>      gr_basic_block_sptr;
 typedef boost::shared_ptr<gr_block>            gr_block_sptr;
 typedef boost::shared_ptr<gr_block_detail>     gr_block_detail_sptr;
 typedef boost::shared_ptr<gr_io_signature>     gr_io_signature_sptr;

Modified: 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/runtime.i
===================================================================
--- 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/runtime.i
   2006-10-26 22:24:30 UTC (rev 3866)
+++ 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/runtime/runtime.i
   2006-10-26 23:46:15 UTC (rev 3867)
@@ -37,6 +37,7 @@
 
 %include <gr_io_signature.i>
 %include <gr_buffer.i>
+%include <gr_basic_block.i>
 %include <gr_block.i>
 %include <gr_block_detail.i>
 %include <gr_swig_block_magic.i>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]