Merged branch 'msgq' from http://gnuradio.org/git/jblum.git
[debian/gnuradio] / gnuradio-core / src / lib / runtime / gr_hier_block2.i
index f9a126fe28b511d8be73b7566c9eaef3563ab97e..a62f50e84bf749fa7e4027389bf8f12d79c419d8 100644 (file)
@@ -6,7 +6,7 @@
  * 
  * 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)
+ * 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,
@@ -31,23 +31,30 @@ typedef boost::shared_ptr<gr_hier_block2> gr_hier_block2_sptr;
 %rename(hier_block2_swig) gr_make_hier_block2;
 gr_hier_block2_sptr gr_make_hier_block2(const std::string name,
                                         gr_io_signature_sptr input_signature,
-                                        gr_io_signature_sptr output_signature);
+                                        gr_io_signature_sptr output_signature)
+  throw (std::runtime_error);
 
 class gr_hier_block2 : public gr_basic_block
 {
 private:
-    gr_hier_block2(const std::string name,
-                   gr_io_signature_sptr input_signature,
-                   gr_io_signature_sptr output_signature);
-
+  gr_hier_block2(const std::string name,
+                gr_io_signature_sptr input_signature,
+                gr_io_signature_sptr output_signature);
+  
 public:
-    ~gr_hier_block2 ();
-
-    // Add a named block to the container
-    void connect(gr_basic_block_sptr src, int src_port,
-                 gr_basic_block_sptr dst, int dst_port)
-        throw (std::invalid_argument);
-    void disconnect(gr_basic_block_sptr src, int src_port,
-                    gr_basic_block_sptr dst, int dst_port)
-        throw (std::invalid_argument);
+  ~gr_hier_block2 ();
+  
+  void connect(gr_basic_block_sptr block)
+    throw (std::invalid_argument);
+  void connect(gr_basic_block_sptr src, int src_port,
+              gr_basic_block_sptr dst, int dst_port)
+    throw (std::invalid_argument);
+  void disconnect(gr_basic_block_sptr block)
+    throw (std::invalid_argument);
+  void disconnect(gr_basic_block_sptr src, int src_port,
+                 gr_basic_block_sptr dst, int dst_port)
+    throw (std::invalid_argument);
+  void disconnect_all();
+  void lock();
+  void unlock();
 };