Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > updates > by-pkgid > 6e7a2755bd78c9deedab199b86e675f3 > files > 4353

gnuradio-doc-3.2.2-9.fc14.x86_64.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>GNU Radio 3.2.2 C++ API: gr_flowgraph.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.3 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">GNU Radio 3.2.2 C++ API</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('gr__flowgraph_8h.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<h1>gr_flowgraph.h</h1>  </div>
</div>
<div class="contents">
<a href="gr__flowgraph_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* -*- c++ -*- */</span>
<a name="l00002"></a>00002 <span class="comment">/*</span>
<a name="l00003"></a>00003 <span class="comment"> * Copyright 2006,2007 Free Software Foundation, Inc.</span>
<a name="l00004"></a>00004 <span class="comment"> * </span>
<a name="l00005"></a>00005 <span class="comment"> * This file is part of GNU Radio</span>
<a name="l00006"></a>00006 <span class="comment"> * </span>
<a name="l00007"></a>00007 <span class="comment"> * GNU Radio is free software; you can redistribute it and/or modify</span>
<a name="l00008"></a>00008 <span class="comment"> * it under the terms of the GNU General Public License as published by</span>
<a name="l00009"></a>00009 <span class="comment"> * the Free Software Foundation; either version 3, or (at your option)</span>
<a name="l00010"></a>00010 <span class="comment"> * any later version.</span>
<a name="l00011"></a>00011 <span class="comment"> * </span>
<a name="l00012"></a>00012 <span class="comment"> * GNU Radio is distributed in the hope that it will be useful,</span>
<a name="l00013"></a>00013 <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00014"></a>00014 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span>
<a name="l00015"></a>00015 <span class="comment"> * GNU General Public License for more details.</span>
<a name="l00016"></a>00016 <span class="comment"> * </span>
<a name="l00017"></a>00017 <span class="comment"> * You should have received a copy of the GNU General Public License</span>
<a name="l00018"></a>00018 <span class="comment"> * along with GNU Radio; see the file COPYING.  If not, write to</span>
<a name="l00019"></a>00019 <span class="comment"> * the Free Software Foundation, Inc., 51 Franklin Street,</span>
<a name="l00020"></a>00020 <span class="comment"> * Boston, MA 02110-1301, USA.</span>
<a name="l00021"></a>00021 <span class="comment"> */</span>
<a name="l00022"></a>00022 
<a name="l00023"></a>00023 <span class="preprocessor">#ifndef INCLUDED_GR_FLOWGRAPH_H</span>
<a name="l00024"></a>00024 <span class="preprocessor"></span><span class="preprocessor">#define INCLUDED_GR_FLOWGRAPH_H</span>
<a name="l00025"></a>00025 <span class="preprocessor"></span>
<a name="l00026"></a>00026 <span class="preprocessor">#include &lt;<a class="code" href="gr__basic__block_8h.html">gr_basic_block.h</a>&gt;</span>
<a name="l00027"></a>00027 <span class="preprocessor">#include &lt;iostream&gt;</span>
<a name="l00028"></a>00028 <span class="comment"></span>
<a name="l00029"></a>00029 <span class="comment">/*!</span>
<a name="l00030"></a>00030 <span class="comment"> * \brief Class representing a specific input or output graph endpoint</span>
<a name="l00031"></a>00031 <span class="comment"> * \ingroup internal</span>
<a name="l00032"></a>00032 <span class="comment"> */</span>
<a name="l00033"></a><a class="code" href="classgr__endpoint.html">00033</a> <span class="keyword">class </span><a class="code" href="classgr__endpoint.html" title="Class representing a specific input or output graph endpoint.">gr_endpoint</a>
<a name="l00034"></a>00034 {
<a name="l00035"></a>00035 <span class="keyword">private</span>:
<a name="l00036"></a>00036   <a class="code" href="classboost_1_1shared__ptr.html">gr_basic_block_sptr</a> d_basic_block;
<a name="l00037"></a>00037   <span class="keywordtype">int</span> d_port;
<a name="l00038"></a>00038 
<a name="l00039"></a>00039 <span class="keyword">public</span>:
<a name="l00040"></a><a class="code" href="classgr__endpoint.html#af248ee135cf45918c78d8e5b1d1e214c">00040</a>   <a class="code" href="classgr__endpoint.html#af248ee135cf45918c78d8e5b1d1e214c">gr_endpoint</a>() : d_basic_block(), d_port(0) { }
<a name="l00041"></a><a class="code" href="classgr__endpoint.html#aeac66cfca038dfee21eaa96d6d099746">00041</a>   <a class="code" href="classgr__endpoint.html#aeac66cfca038dfee21eaa96d6d099746">gr_endpoint</a>(<a class="code" href="classboost_1_1shared__ptr.html">gr_basic_block_sptr</a> <a class="code" href="classgr__endpoint.html#a4c93735b0fa242c803270dcbffbbe1c9">block</a>, <span class="keywordtype">int</span> <a class="code" href="classgr__endpoint.html#a489b2dc68ca529be2fbcffa94dbaa42b">port</a>) { d_basic_block = <a class="code" href="classgr__endpoint.html#a4c93735b0fa242c803270dcbffbbe1c9">block</a>; d_port = <a class="code" href="classgr__endpoint.html#a489b2dc68ca529be2fbcffa94dbaa42b">port</a>; }
<a name="l00042"></a><a class="code" href="classgr__endpoint.html#a4c93735b0fa242c803270dcbffbbe1c9">00042</a>   <a class="code" href="classboost_1_1shared__ptr.html">gr_basic_block_sptr</a> <a class="code" href="classgr__endpoint.html#a4c93735b0fa242c803270dcbffbbe1c9">block</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> d_basic_block; }
<a name="l00043"></a><a class="code" href="classgr__endpoint.html#a489b2dc68ca529be2fbcffa94dbaa42b">00043</a>   <span class="keywordtype">int</span> <a class="code" href="classgr__endpoint.html#a489b2dc68ca529be2fbcffa94dbaa42b">port</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> d_port; }
<a name="l00044"></a>00044 
<a name="l00045"></a>00045   <span class="keywordtype">bool</span> <a class="code" href="classgr__endpoint.html#ad3cdff47bb17116f5979e0e4301ac67c">operator==</a>(<span class="keyword">const</span> <a class="code" href="classgr__endpoint.html" title="Class representing a specific input or output graph endpoint.">gr_endpoint</a> &amp;other) <span class="keyword">const</span>;
<a name="l00046"></a>00046 };    
<a name="l00047"></a>00047 
<a name="l00048"></a><a class="code" href="classgr__endpoint.html#ad3cdff47bb17116f5979e0e4301ac67c">00048</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classgr__endpoint.html#ad3cdff47bb17116f5979e0e4301ac67c">gr_endpoint::operator==</a>(<span class="keyword">const</span> <a class="code" href="classgr__endpoint.html" title="Class representing a specific input or output graph endpoint.">gr_endpoint</a> &amp;other)<span class="keyword"> const</span>
<a name="l00049"></a>00049 <span class="keyword"></span>{
<a name="l00050"></a>00050   <span class="keywordflow">return</span> (d_basic_block == other.d_basic_block &amp;&amp; 
<a name="l00051"></a>00051           d_port == other.d_port);
<a name="l00052"></a>00052 }
<a name="l00053"></a>00053 
<a name="l00054"></a>00054 <span class="comment">// Hold vectors of gr_endpoint objects</span>
<a name="l00055"></a><a class="code" href="gr__flowgraph_8h.html#a6f26386672ac464784d9dcada5a1b5ed">00055</a> <span class="keyword">typedef</span> <a class="code" href="classstd_1_1vector.html">std::vector&lt;gr_endpoint&gt;</a> <a class="code" href="gr__flowgraph_8h.html#a6f26386672ac464784d9dcada5a1b5ed">gr_endpoint_vector_t</a>;
<a name="l00056"></a><a class="code" href="gr__flowgraph_8h.html#acf26a1a1437235f841c4a3e3b02de1cf">00056</a> <span class="keyword">typedef</span> <a class="code" href="classstd_1_1vector.html" title="vector documentation stub">std::vector&lt;gr_endpoint&gt;::iterator</a> <a class="code" href="gr__flowgraph_8h.html#acf26a1a1437235f841c4a3e3b02de1cf">gr_endpoint_viter_t</a>;
<a name="l00057"></a>00057 <span class="comment"></span>
<a name="l00058"></a>00058 <span class="comment">/*!</span>
<a name="l00059"></a>00059 <span class="comment"> *\brief Class representing a connection between to graph endpoints</span>
<a name="l00060"></a>00060 <span class="comment"> *</span>
<a name="l00061"></a>00061 <span class="comment"> */</span>
<a name="l00062"></a><a class="code" href="classgr__edge.html">00062</a> <span class="keyword">class </span><a class="code" href="classgr__edge.html" title="Class representing a connection between to graph endpoints.">gr_edge</a>
<a name="l00063"></a>00063 {
<a name="l00064"></a>00064 <span class="keyword">public</span>:
<a name="l00065"></a><a class="code" href="classgr__edge.html#a41ee973bc27369dc8d07193ba13c3fb2">00065</a>   <a class="code" href="classgr__edge.html#a41ee973bc27369dc8d07193ba13c3fb2">gr_edge</a>() : d_src(), d_dst() { };
<a name="l00066"></a><a class="code" href="classgr__edge.html#a7729fa9d896b7e0133573d18038a1a46">00066</a>   <a class="code" href="classgr__edge.html#a7729fa9d896b7e0133573d18038a1a46">gr_edge</a>(<span class="keyword">const</span> <a class="code" href="classgr__endpoint.html" title="Class representing a specific input or output graph endpoint.">gr_endpoint</a> &amp;<a class="code" href="classgr__edge.html#a9ee22c06242b3ec3b8a8e5696be43854">src</a>, <span class="keyword">const</span> <a class="code" href="classgr__endpoint.html" title="Class representing a specific input or output graph endpoint.">gr_endpoint</a> &amp;<a class="code" href="classgr__edge.html#a531c6445e6e881887209a0c4141cd67d">dst</a>) : d_src(src), d_dst(dst) { }
<a name="l00067"></a>00067   <a class="code" href="classgr__edge.html#a73dde3232c3dd2442a3525ce6bd8c2ca">~gr_edge</a>();
<a name="l00068"></a>00068 
<a name="l00069"></a><a class="code" href="classgr__edge.html#a9ee22c06242b3ec3b8a8e5696be43854">00069</a>   <span class="keyword">const</span> <a class="code" href="classgr__endpoint.html" title="Class representing a specific input or output graph endpoint.">gr_endpoint</a> &amp;<a class="code" href="classgr__edge.html#a9ee22c06242b3ec3b8a8e5696be43854">src</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> d_src; }
<a name="l00070"></a><a class="code" href="classgr__edge.html#a531c6445e6e881887209a0c4141cd67d">00070</a>   <span class="keyword">const</span> <a class="code" href="classgr__endpoint.html" title="Class representing a specific input or output graph endpoint.">gr_endpoint</a> &amp;<a class="code" href="classgr__edge.html#a531c6445e6e881887209a0c4141cd67d">dst</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> d_dst; }
<a name="l00071"></a>00071 
<a name="l00072"></a>00072 <span class="keyword">private</span>:
<a name="l00073"></a>00073   <a class="code" href="classgr__endpoint.html" title="Class representing a specific input or output graph endpoint.">gr_endpoint</a> d_src;
<a name="l00074"></a>00074   <a class="code" href="classgr__endpoint.html" title="Class representing a specific input or output graph endpoint.">gr_endpoint</a> d_dst;
<a name="l00075"></a>00075 };
<a name="l00076"></a>00076 
<a name="l00077"></a>00077 <span class="comment">// Hold vectors of gr_edge objects</span>
<a name="l00078"></a><a class="code" href="gr__flowgraph_8h.html#ad5acafbb1e25f4751d2b6f89af02d416">00078</a> <span class="keyword">typedef</span> <a class="code" href="classstd_1_1vector.html">std::vector&lt;gr_edge&gt;</a> <a class="code" href="gr__flowgraph_8h.html#ad5acafbb1e25f4751d2b6f89af02d416">gr_edge_vector_t</a>;
<a name="l00079"></a><a class="code" href="gr__flowgraph_8h.html#ad44b48ccbec559db79e223f9c794a831">00079</a> <span class="keyword">typedef</span> <a class="code" href="classstd_1_1vector.html" title="vector documentation stub">std::vector&lt;gr_edge&gt;::iterator</a> <a class="code" href="gr__flowgraph_8h.html#ad44b48ccbec559db79e223f9c794a831">gr_edge_viter_t</a>;
<a name="l00080"></a>00080 
<a name="l00081"></a>00081 
<a name="l00082"></a>00082 <span class="comment">// Create a shared pointer to a heap allocated flowgraph</span>
<a name="l00083"></a>00083 <span class="comment">// (types defined in gr_runtime_types.h)</span>
<a name="l00084"></a>00084 <a class="code" href="classboost_1_1shared__ptr.html">gr_flowgraph_sptr</a> <a class="code" href="gr__flowgraph_8h.html#a97c7a81a255c020f96ae65b198b63f98">gr_make_flowgraph</a>();
<a name="l00085"></a>00085 <span class="comment"></span>
<a name="l00086"></a>00086 <span class="comment">/*!</span>
<a name="l00087"></a>00087 <span class="comment"> * \brief Class representing a directed, acyclic graph of basic blocks</span>
<a name="l00088"></a>00088 <span class="comment"> * \ingroup internal</span>
<a name="l00089"></a>00089 <span class="comment"> */</span>
<a name="l00090"></a><a class="code" href="classgr__flowgraph.html">00090</a> <span class="keyword">class </span><a class="code" href="classgr__flowgraph.html" title="Class representing a directed, acyclic graph of basic blocks.">gr_flowgraph</a>
<a name="l00091"></a>00091 {
<a name="l00092"></a>00092 <span class="keyword">public</span>:
<a name="l00093"></a>00093   <span class="keyword">friend</span> <a class="code" href="classboost_1_1shared__ptr.html">gr_flowgraph_sptr</a> <a class="code" href="classgr__flowgraph.html#a97c7a81a255c020f96ae65b198b63f98">gr_make_flowgraph</a>();
<a name="l00094"></a>00094 
<a name="l00095"></a>00095   <span class="comment">// Destruct an arbitrary flowgraph</span>
<a name="l00096"></a>00096   <a class="code" href="classgr__flowgraph.html#a441e3e63b9924e17ea8f8f15c6756bf4">~gr_flowgraph</a>();
<a name="l00097"></a>00097 
<a name="l00098"></a>00098   <span class="comment">// Connect two endpoints</span>
<a name="l00099"></a>00099   <span class="keywordtype">void</span> <a class="code" href="classgr__flowgraph.html#a2a58b539977bb51ceea6af598499089d">connect</a>(<span class="keyword">const</span> <a class="code" href="classgr__endpoint.html" title="Class representing a specific input or output graph endpoint.">gr_endpoint</a> &amp;src, <span class="keyword">const</span> <a class="code" href="classgr__endpoint.html" title="Class representing a specific input or output graph endpoint.">gr_endpoint</a> &amp;dst);
<a name="l00100"></a>00100 
<a name="l00101"></a>00101   <span class="comment">// Disconnect two endpoints</span>
<a name="l00102"></a>00102   <span class="keywordtype">void</span> <a class="code" href="classgr__flowgraph.html#abcc73eaef7cb9175536d6935941867c5">disconnect</a>(<span class="keyword">const</span> <a class="code" href="classgr__endpoint.html" title="Class representing a specific input or output graph endpoint.">gr_endpoint</a> &amp;src, <span class="keyword">const</span> <a class="code" href="classgr__endpoint.html" title="Class representing a specific input or output graph endpoint.">gr_endpoint</a> &amp;dst);
<a name="l00103"></a>00103 
<a name="l00104"></a>00104   <span class="comment">// Connect an output port to an input port (convenience)</span>
<a name="l00105"></a>00105   <span class="keywordtype">void</span> <a class="code" href="classgr__flowgraph.html#a2a58b539977bb51ceea6af598499089d">connect</a>(<a class="code" href="classboost_1_1shared__ptr.html">gr_basic_block_sptr</a> src_block, <span class="keywordtype">int</span> src_port,
<a name="l00106"></a>00106                <a class="code" href="classboost_1_1shared__ptr.html">gr_basic_block_sptr</a> dst_block, <span class="keywordtype">int</span> dst_port);
<a name="l00107"></a>00107 
<a name="l00108"></a>00108   <span class="comment">// Disconnect an input port from an output port (convenience)</span>
<a name="l00109"></a>00109   <span class="keywordtype">void</span> <a class="code" href="classgr__flowgraph.html#abcc73eaef7cb9175536d6935941867c5">disconnect</a>(<a class="code" href="classboost_1_1shared__ptr.html">gr_basic_block_sptr</a> src_block, <span class="keywordtype">int</span> src_port,
<a name="l00110"></a>00110                   <a class="code" href="classboost_1_1shared__ptr.html">gr_basic_block_sptr</a> dst_block, <span class="keywordtype">int</span> dst_port);
<a name="l00111"></a>00111 
<a name="l00112"></a>00112   <span class="comment">// Validate connectivity, raise exception if invalid</span>
<a name="l00113"></a>00113   <span class="keywordtype">void</span> <a class="code" href="classgr__flowgraph.html#ac04a1dbcbeae9ad6fa0d155a8904d4b9">validate</a>();
<a name="l00114"></a>00114 
<a name="l00115"></a>00115   <span class="comment">// Clear existing flowgraph</span>
<a name="l00116"></a>00116   <span class="keywordtype">void</span> <a class="code" href="classgr__flowgraph.html#af431ea386d78baac02b5693a004ffa5f">clear</a>();
<a name="l00117"></a>00117 
<a name="l00118"></a>00118   <span class="comment">// Return vector of edges</span>
<a name="l00119"></a><a class="code" href="classgr__flowgraph.html#a607f86008328257d033f488d977107d9">00119</a>   <span class="keyword">const</span> <a class="code" href="classstd_1_1vector.html">gr_edge_vector_t</a> &amp;<a class="code" href="classgr__flowgraph.html#a607f86008328257d033f488d977107d9">edges</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classgr__flowgraph.html#a24608051d1b70218b1fdb34140884e28">d_edges</a>; }
<a name="l00120"></a>00120 
<a name="l00121"></a>00121   <span class="comment">// Return vector of connected blocks</span>
<a name="l00122"></a>00122   <a class="code" href="classstd_1_1vector.html">gr_basic_block_vector_t</a> <a class="code" href="classgr__flowgraph.html#ab5e0e1d3d12c5de8feccaf3f2f47f169">calc_used_blocks</a>();
<a name="l00123"></a>00123 
<a name="l00124"></a>00124   <span class="comment">// Return toplogically sorted vector of blocks.  All the sources come first.</span>
<a name="l00125"></a>00125   <a class="code" href="classstd_1_1vector.html">gr_basic_block_vector_t</a> <a class="code" href="classgr__flowgraph.html#a422d6c8230c1cb99f5545824c97b2b8e">topological_sort</a>(<a class="code" href="classstd_1_1vector.html">gr_basic_block_vector_t</a> &amp;blocks);
<a name="l00126"></a>00126 
<a name="l00127"></a>00127   <span class="comment">// Return vector of vectors of disjointly connected blocks, topologically</span>
<a name="l00128"></a>00128   <span class="comment">// sorted.</span>
<a name="l00129"></a>00129   <a class="code" href="classstd_1_1vector.html" title="vector documentation stub">std::vector&lt;gr_basic_block_vector_t&gt;</a> <a class="code" href="classgr__flowgraph.html#a72649f415e048692e55ef393bd222bd9">partition</a>();
<a name="l00130"></a>00130 
<a name="l00131"></a>00131 <span class="keyword">protected</span>:
<a name="l00132"></a><a class="code" href="classgr__flowgraph.html#a606da901c4629ed160d50a7ea93509a6">00132</a>   <a class="code" href="classstd_1_1vector.html">gr_basic_block_vector_t</a> <a class="code" href="classgr__flowgraph.html#a606da901c4629ed160d50a7ea93509a6">d_blocks</a>;
<a name="l00133"></a><a class="code" href="classgr__flowgraph.html#a24608051d1b70218b1fdb34140884e28">00133</a>   <a class="code" href="classstd_1_1vector.html">gr_edge_vector_t</a> <a class="code" href="classgr__flowgraph.html#a24608051d1b70218b1fdb34140884e28">d_edges</a>;
<a name="l00134"></a>00134 
<a name="l00135"></a>00135   <a class="code" href="classgr__flowgraph.html#a11dbfecc14ba155052ce237bbacd82ab">gr_flowgraph</a>();
<a name="l00136"></a>00136   <a class="code" href="classstd_1_1vector.html">std::vector&lt;int&gt;</a> <a class="code" href="classgr__flowgraph.html#a8ffcf4194a363c5fc47853d7ea76d6cf">calc_used_ports</a>(<a class="code" href="classboost_1_1shared__ptr.html">gr_basic_block_sptr</a> block, <span class="keywordtype">bool</span> check_inputs); 
<a name="l00137"></a>00137   <a class="code" href="classstd_1_1vector.html">gr_basic_block_vector_t</a> <a class="code" href="classgr__flowgraph.html#a62be405a8a481477805dc621bb177284">calc_downstream_blocks</a>(<a class="code" href="classboost_1_1shared__ptr.html">gr_basic_block_sptr</a> block, <span class="keywordtype">int</span> port);
<a name="l00138"></a>00138   <a class="code" href="classstd_1_1vector.html">gr_edge_vector_t</a> <a class="code" href="classgr__flowgraph.html#a4fff60729268d4d5182a4b0f29170197">calc_upstream_edges</a>(<a class="code" href="classboost_1_1shared__ptr.html">gr_basic_block_sptr</a> block);
<a name="l00139"></a>00139   <span class="keywordtype">bool</span> <a class="code" href="classgr__flowgraph.html#afdbec401b594aa8c0af58a7a3f1ab5c4">has_block_p</a>(<a class="code" href="classboost_1_1shared__ptr.html">gr_basic_block_sptr</a> block);
<a name="l00140"></a>00140   <a class="code" href="classgr__edge.html" title="Class representing a connection between to graph endpoints.">gr_edge</a> <a class="code" href="classgr__flowgraph.html#aa2e4fcd7e5c86edfc3d3850e8dd07d9b">calc_upstream_edge</a>(<a class="code" href="classboost_1_1shared__ptr.html">gr_basic_block_sptr</a> block, <span class="keywordtype">int</span> port);
<a name="l00141"></a>00141 
<a name="l00142"></a>00142 <span class="keyword">private</span>:
<a name="l00143"></a>00143 
<a name="l00144"></a>00144   <span class="keywordtype">void</span> check_valid_port(<a class="code" href="classboost_1_1shared__ptr.html">gr_io_signature_sptr</a> sig, <span class="keywordtype">int</span> port);
<a name="l00145"></a>00145   <span class="keywordtype">void</span> check_dst_not_used(<span class="keyword">const</span> <a class="code" href="classgr__endpoint.html" title="Class representing a specific input or output graph endpoint.">gr_endpoint</a> &amp;dst);
<a name="l00146"></a>00146   <span class="keywordtype">void</span> check_type_match(<span class="keyword">const</span> <a class="code" href="classgr__endpoint.html" title="Class representing a specific input or output graph endpoint.">gr_endpoint</a> &amp;src, <span class="keyword">const</span> <a class="code" href="classgr__endpoint.html" title="Class representing a specific input or output graph endpoint.">gr_endpoint</a> &amp;dst);
<a name="l00147"></a>00147   <a class="code" href="classstd_1_1vector.html">gr_edge_vector_t</a> calc_connections(<a class="code" href="classboost_1_1shared__ptr.html">gr_basic_block_sptr</a> block, <span class="keywordtype">bool</span> check_inputs); <span class="comment">// false=use outputs</span>
<a name="l00148"></a>00148   <span class="keywordtype">void</span> check_contiguity(<a class="code" href="classboost_1_1shared__ptr.html">gr_basic_block_sptr</a> block, <span class="keyword">const</span> <a class="code" href="classstd_1_1vector.html">std::vector&lt;int&gt;</a> &amp;used_ports, <span class="keywordtype">bool</span> check_inputs);
<a name="l00149"></a>00149 
<a name="l00150"></a>00150   <a class="code" href="classstd_1_1vector.html">gr_basic_block_vector_t</a> <a class="code" href="classgr__flowgraph.html#a62be405a8a481477805dc621bb177284">calc_downstream_blocks</a>(<a class="code" href="classboost_1_1shared__ptr.html">gr_basic_block_sptr</a> block);
<a name="l00151"></a>00151   <a class="code" href="classstd_1_1vector.html">gr_basic_block_vector_t</a> calc_reachable_blocks(<a class="code" href="classboost_1_1shared__ptr.html">gr_basic_block_sptr</a> block, <a class="code" href="classstd_1_1vector.html">gr_basic_block_vector_t</a> &amp;blocks);
<a name="l00152"></a>00152   <span class="keywordtype">void</span> reachable_dfs_visit(<a class="code" href="classboost_1_1shared__ptr.html">gr_basic_block_sptr</a> block, <a class="code" href="classstd_1_1vector.html">gr_basic_block_vector_t</a> &amp;blocks);
<a name="l00153"></a>00153   <a class="code" href="classstd_1_1vector.html">gr_basic_block_vector_t</a> calc_adjacent_blocks(<a class="code" href="classboost_1_1shared__ptr.html">gr_basic_block_sptr</a> block, <a class="code" href="classstd_1_1vector.html">gr_basic_block_vector_t</a> &amp;blocks);
<a name="l00154"></a>00154   <a class="code" href="classstd_1_1vector.html">gr_basic_block_vector_t</a> sort_sources_first(<a class="code" href="classstd_1_1vector.html">gr_basic_block_vector_t</a> &amp;blocks);
<a name="l00155"></a>00155   <span class="keywordtype">bool</span> source_p(<a class="code" href="classboost_1_1shared__ptr.html">gr_basic_block_sptr</a> block);
<a name="l00156"></a>00156   <span class="keywordtype">void</span> topological_dfs_visit(<a class="code" href="classboost_1_1shared__ptr.html">gr_basic_block_sptr</a> block, <a class="code" href="classstd_1_1vector.html">gr_basic_block_vector_t</a> &amp;output);
<a name="l00157"></a>00157 };
<a name="l00158"></a>00158 
<a name="l00159"></a>00159 <span class="comment">// Convenience functions</span>
<a name="l00160"></a>00160 <span class="keyword">inline</span>
<a name="l00161"></a><a class="code" href="classgr__flowgraph.html#afef8c6206921cdb502159b1cfc57f7fe">00161</a> <span class="keywordtype">void</span> <a class="code" href="classgr__flowgraph.html#a2a58b539977bb51ceea6af598499089d">gr_flowgraph::connect</a>(<a class="code" href="classboost_1_1shared__ptr.html">gr_basic_block_sptr</a> src_block, <span class="keywordtype">int</span> src_port,
<a name="l00162"></a>00162                       <a class="code" href="classboost_1_1shared__ptr.html">gr_basic_block_sptr</a> dst_block, <span class="keywordtype">int</span> dst_port)
<a name="l00163"></a>00163 {
<a name="l00164"></a>00164   <a class="code" href="classgr__flowgraph.html#a2a58b539977bb51ceea6af598499089d">connect</a>(<a class="code" href="classgr__endpoint.html" title="Class representing a specific input or output graph endpoint.">gr_endpoint</a>(src_block, src_port),
<a name="l00165"></a>00165           <a class="code" href="classgr__endpoint.html" title="Class representing a specific input or output graph endpoint.">gr_endpoint</a>(dst_block, dst_port));
<a name="l00166"></a>00166 }
<a name="l00167"></a>00167 
<a name="l00168"></a>00168 <span class="keyword">inline</span>
<a name="l00169"></a><a class="code" href="classgr__flowgraph.html#aeec7ca27ceab439babb7addebb6921b5">00169</a> <span class="keywordtype">void</span> <a class="code" href="classgr__flowgraph.html#abcc73eaef7cb9175536d6935941867c5">gr_flowgraph::disconnect</a>(<a class="code" href="classboost_1_1shared__ptr.html">gr_basic_block_sptr</a> src_block, <span class="keywordtype">int</span> src_port,
<a name="l00170"></a>00170                          <a class="code" href="classboost_1_1shared__ptr.html">gr_basic_block_sptr</a> dst_block, <span class="keywordtype">int</span> dst_port)
<a name="l00171"></a>00171 {
<a name="l00172"></a>00172   <a class="code" href="classgr__flowgraph.html#abcc73eaef7cb9175536d6935941867c5">disconnect</a>(<a class="code" href="classgr__endpoint.html" title="Class representing a specific input or output graph endpoint.">gr_endpoint</a>(src_block, src_port),
<a name="l00173"></a>00173              <a class="code" href="classgr__endpoint.html" title="Class representing a specific input or output graph endpoint.">gr_endpoint</a>(dst_block, dst_port));
<a name="l00174"></a>00174 }
<a name="l00175"></a>00175 
<a name="l00176"></a>00176 <span class="keyword">inline</span> std::ostream&amp;
<a name="l00177"></a><a class="code" href="gr__flowgraph_8h.html#a1ed89b7886059e6b5dc0e323f7cc6be4">00177</a> <a class="code" href="gr__basic__block_8h.html#acb2f610728a7f3cbd51a9a2eb60f059e">operator &lt;&lt;</a>(std::ostream &amp;os, <span class="keyword">const</span> <a class="code" href="classgr__endpoint.html" title="Class representing a specific input or output graph endpoint.">gr_endpoint</a> endp)
<a name="l00178"></a>00178 {
<a name="l00179"></a>00179   os &lt;&lt; endp.<a class="code" href="classgr__endpoint.html#a4c93735b0fa242c803270dcbffbbe1c9">block</a>() &lt;&lt; <span class="stringliteral">&quot;:&quot;</span> &lt;&lt; endp.<a class="code" href="classgr__endpoint.html#a489b2dc68ca529be2fbcffa94dbaa42b">port</a>();
<a name="l00180"></a>00180   <span class="keywordflow">return</span> os;
<a name="l00181"></a>00181 }
<a name="l00182"></a>00182 
<a name="l00183"></a>00183 <span class="keyword">inline</span> std::ostream&amp;
<a name="l00184"></a><a class="code" href="gr__flowgraph_8h.html#a38500da45b60ec5cf7495c787d9559c9">00184</a> <a class="code" href="gr__basic__block_8h.html#acb2f610728a7f3cbd51a9a2eb60f059e">operator &lt;&lt;</a>(std::ostream &amp;os, <span class="keyword">const</span> <a class="code" href="classgr__edge.html" title="Class representing a connection between to graph endpoints.">gr_edge</a> edge)
<a name="l00185"></a>00185 {
<a name="l00186"></a>00186   os &lt;&lt; edge.<a class="code" href="classgr__edge.html#a9ee22c06242b3ec3b8a8e5696be43854">src</a>() &lt;&lt; <span class="stringliteral">&quot;-&gt;&quot;</span> &lt;&lt; edge.<a class="code" href="classgr__edge.html#a531c6445e6e881887209a0c4141cd67d">dst</a>();
<a name="l00187"></a>00187   <span class="keywordflow">return</span> os;
<a name="l00188"></a>00188 }
<a name="l00189"></a>00189 
<a name="l00190"></a>00190 <span class="preprocessor">#endif </span><span class="comment">/* INCLUDED_GR_FLOWGRAPH_H */</span>
</pre></div></div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="gr__flowgraph_8h.html">gr_flowgraph.h</a>      </li>
      <li class="footer">Generated on Thu Feb 17 2011 for GNU Radio 3.2.2 C++ API by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
    </ul>
  </div>

</body>
</html>