gr_hier_block2_detail.h

Go to the documentation of this file.
00001 /*
00002  * Copyright 2006,2007 Free Software Foundation, Inc.
00003  * 
00004  * This file is part of GNU Radio
00005  * 
00006  * GNU Radio is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; either version 3, or (at your option)
00009  * any later version.
00010  * 
00011  * GNU Radio is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  * 
00016  * You should have received a copy of the GNU General Public License
00017  * along with GNU Radio; see the file COPYING.  If not, write to
00018  * the Free Software Foundation, Inc., 51 Franklin Street,
00019  * Boston, MA 02110-1301, USA.
00020  */
00021 #ifndef INCLUDED_GR_HIER_BLOCK2_DETAIL_H
00022 #define INCLUDED_GR_HIER_BLOCK2_DETAIL_H
00023 
00024 #include <gr_hier_block2.h>
00025 #include <gr_flat_flowgraph.h>
00026 #include <boost/utility.hpp>
00027 
00028 class gr_hier_block2_detail : boost::noncopyable
00029 {
00030 public:
00031   gr_hier_block2_detail(gr_hier_block2 *owner);
00032   ~gr_hier_block2_detail();
00033 
00034   void connect(gr_basic_block_sptr block);
00035   void connect(gr_basic_block_sptr src, int src_port, 
00036                gr_basic_block_sptr dst, int dst_port);
00037   void disconnect(gr_basic_block_sptr block);
00038   void disconnect(gr_basic_block_sptr, int src_port, 
00039                   gr_basic_block_sptr, int dst_port);
00040   void disconnect_all();
00041   void lock();
00042   void unlock();
00043   void flatten_aux(gr_flat_flowgraph_sptr sfg) const;
00044 
00045 private:
00046   
00047   // Private implementation data
00048   gr_hier_block2 *d_owner;
00049   gr_hier_block2_detail *d_parent_detail;
00050   gr_flowgraph_sptr d_fg;
00051   gr_endpoint_vector_t d_inputs;
00052   gr_endpoint_vector_t d_outputs;
00053   gr_basic_block_vector_t d_blocks;
00054   
00055   void connect_input(int my_port, int port, gr_basic_block_sptr block);
00056   void connect_output(int my_port, int port, gr_basic_block_sptr block);
00057   void disconnect_input(int my_port, int port, gr_basic_block_sptr block);
00058   void disconnect_output(int my_port, int port, gr_basic_block_sptr block);
00059   gr_endpoint resolve_port(int port, bool is_input);
00060   gr_endpoint resolve_endpoint(const gr_endpoint &endp, bool is_input) const;
00061 };
00062 
00063 #endif /* INCLUDED_GR_HIER_BLOCK2_DETAIL_H */

Generated on Thu Mar 5 09:01:11 2009 for GNU Radio 3.1.3 by  doxygen 1.5.8