Modifying the unittest output. XML files are no longer written outside of the build...
[debian/gnuradio] / gnuradio-core / src / lib / runtime / gr_hier_block2_detail.h
index 15c8548c67494df4eecbc2b52acc12e4d00990c8..6f5384e5a425d370757cb2e9215051532786805f 100644 (file)
@@ -1,11 +1,12 @@
+/* -*- c++ -*- */
 /*
- * Copyright 2006,2007 Free Software Foundation, Inc.
+ * Copyright 2006,2007,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 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,
 #define INCLUDED_GR_HIER_BLOCK2_DETAIL_H
 
 #include <gr_hier_block2.h>
-#include <gr_simple_flowgraph_detail.h>
+#include <gr_flat_flowgraph.h>
 #include <boost/utility.hpp>
 
+/*!
+ * \ingroup internal
+ */
 class gr_hier_block2_detail : boost::noncopyable
 {
-private:
-    friend class gr_hier_block2;
-    friend class gr_runtime_impl;
-    
-    // Constructor--it's private, only friends can instantiate
-    gr_hier_block2_detail(gr_hier_block2 *owner);
+public:
+  gr_hier_block2_detail(gr_hier_block2 *owner);
+  ~gr_hier_block2_detail();
 
-    // Private implementation data
-    gr_hier_block2 *d_owner;
-    gr_simple_flowgraph_sptr d_fg;
-    gr_endpoint_vector_t d_inputs;
-    gr_endpoint_vector_t d_outputs;
-        
-    // Private implementation methods
-    void connect(gr_basic_block_sptr src, int src_port, 
-                 gr_basic_block_sptr dst, int dst_port);
-    void disconnect(gr_basic_block_sptr, int src_port, 
-                    gr_basic_block_sptr, int dst_port);
-    void connect_input(int my_port, int port, gr_basic_block_sptr block);
-    void connect_output(int my_port, int port, gr_basic_block_sptr block);
-    void disconnect_input(int my_port, int port, gr_basic_block_sptr block);
-    void disconnect_output(int my_port, int port, gr_basic_block_sptr block);
-    void flatten(gr_simple_flowgraph_sptr sfg);
-    gr_endpoint resolve_port(int port, bool is_input);
-    gr_endpoint resolve_endpoint(const gr_endpoint &endp, bool is_input);
+  void connect(gr_basic_block_sptr block);
+  void connect(gr_basic_block_sptr src, int src_port, 
+              gr_basic_block_sptr dst, int dst_port);
+  void disconnect(gr_basic_block_sptr block);
+  void disconnect(gr_basic_block_sptr, int src_port, 
+                 gr_basic_block_sptr, int dst_port);
+  void disconnect_all();
+  void lock();
+  void unlock();
+  void flatten_aux(gr_flat_flowgraph_sptr sfg) const;
 
-public:
-    ~gr_hier_block2_detail();
+private:
+  
+  // Private implementation data
+  gr_hier_block2 *d_owner;
+  gr_hier_block2_detail *d_parent_detail;
+  gr_flowgraph_sptr d_fg;
+  std::vector<gr_endpoint_vector_t> d_inputs; // Multiple internal endpoints per external input
+  gr_endpoint_vector_t d_outputs;             // Single internal endpoint per external output
+  gr_basic_block_vector_t d_blocks;
+  
+  void connect_input(int my_port, int port, gr_basic_block_sptr block);
+  void connect_output(int my_port, int port, gr_basic_block_sptr block);
+  void disconnect_input(int my_port, int port, gr_basic_block_sptr block);
+  void disconnect_output(int my_port, int port, gr_basic_block_sptr block);
+
+  gr_endpoint_vector_t resolve_port(int port, bool is_input);
+  gr_endpoint_vector_t resolve_endpoint(const gr_endpoint &endp, bool is_input) const;
 };
 
 #endif /* INCLUDED_GR_HIER_BLOCK2_DETAIL_H */