Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 07118dbc7175a4a7d1e779ad4c1549db > files > 61

flowcanvas-devel-0.6.4-1.fc14.1.i686.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>FlowCanvas: /builddir/build/BUILD/flowcanvas-0.6.4/flowcanvas/Module.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<h1>/builddir/build/BUILD/flowcanvas-0.6.4/flowcanvas/Module.hpp</h1>  </div>
</div>
<div class="contents">
<a href="Module_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* This file is part of FlowCanvas.</span>
<a name="l00002"></a>00002 <span class="comment"> * Copyright (C) 2007-2009 David Robillard &lt;http://drobilla.net&gt;</span>
<a name="l00003"></a>00003 <span class="comment"> *</span>
<a name="l00004"></a>00004 <span class="comment"> * FlowCanvas is free software; you can redistribute it and/or modify it under the</span>
<a name="l00005"></a>00005 <span class="comment"> * terms of the GNU General Public License as published by the Free Software</span>
<a name="l00006"></a>00006 <span class="comment"> * Foundation; either version 2 of the License, or (at your option) any later</span>
<a name="l00007"></a>00007 <span class="comment"> * version.</span>
<a name="l00008"></a>00008 <span class="comment"> *</span>
<a name="l00009"></a>00009 <span class="comment"> * FlowCanvas is distributed in the hope that it will be useful, but WITHOUT ANY</span>
<a name="l00010"></a>00010 <span class="comment"> * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS</span>
<a name="l00011"></a>00011 <span class="comment"> * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for details.</span>
<a name="l00012"></a>00012 <span class="comment"> *</span>
<a name="l00013"></a>00013 <span class="comment"> * You should have received a copy of the GNU General Public License along</span>
<a name="l00014"></a>00014 <span class="comment"> * with this program; if not, write to the Free Software Foundation, Inc.,</span>
<a name="l00015"></a>00015 <span class="comment"> * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA</span>
<a name="l00016"></a>00016 <span class="comment"> */</span>
<a name="l00017"></a>00017 
<a name="l00018"></a>00018 <span class="preprocessor">#ifndef FLOWCANVAS_MODULE_HPP</span>
<a name="l00019"></a>00019 <span class="preprocessor"></span><span class="preprocessor">#define FLOWCANVAS_MODULE_HPP</span>
<a name="l00020"></a>00020 <span class="preprocessor"></span>
<a name="l00021"></a>00021 <span class="preprocessor">#include &lt;string&gt;</span>
<a name="l00022"></a>00022 <span class="preprocessor">#include &lt;algorithm&gt;</span>
<a name="l00023"></a>00023 <span class="preprocessor">#include &lt;boost/shared_ptr.hpp&gt;</span>
<a name="l00024"></a>00024 <span class="preprocessor">#include &lt;libgnomecanvasmm.h&gt;</span>
<a name="l00025"></a>00025 <span class="preprocessor">#include &quot;<a class="code" href="Port_8hpp.html">flowcanvas/Port.hpp</a>&quot;</span>
<a name="l00026"></a>00026 <span class="preprocessor">#include &quot;<a class="code" href="Item_8hpp.html">flowcanvas/Item.hpp</a>&quot;</span>
<a name="l00027"></a>00027 
<a name="l00028"></a>00028 <span class="keyword">namespace </span>FlowCanvas {
<a name="l00029"></a>00029 
<a name="l00030"></a>00030 <span class="keyword">class </span>Canvas;
<a name="l00031"></a>00031 
<a name="l00032"></a>00032 
<a name="l00037"></a><a class="code" href="classFlowCanvas_1_1Module.html">00037</a> <span class="keyword">class </span><a class="code" href="classFlowCanvas_1_1Module.html" title="A named block (possibly) containing input and output ports.">Module</a> : <span class="keyword">public</span> <a class="code" href="classFlowCanvas_1_1Item.html" title="An item on the canvas.">Item</a>
<a name="l00038"></a>00038 {
<a name="l00039"></a>00039 <span class="keyword">public</span>:
<a name="l00040"></a>00040     <a class="code" href="classFlowCanvas_1_1Module.html#ae631151f14cb5ce7f2055fcb7887cf63">Module</a>(boost::shared_ptr&lt;Canvas&gt; <a class="code" href="classFlowCanvas_1_1Item.html#a0298abb7a7d9523f34052a7a32f8e160">canvas</a>,
<a name="l00041"></a>00041            <span class="keyword">const</span> std::string&amp;        <a class="code" href="classFlowCanvas_1_1Item.html#a3709fbc5c09c131283214abaae4827c2">name</a>,
<a name="l00042"></a>00042            <span class="keywordtype">double</span>                    x = 0,
<a name="l00043"></a>00043            <span class="keywordtype">double</span>                    y = 0,
<a name="l00044"></a>00044            <span class="keywordtype">bool</span>                      show_title = <span class="keyword">true</span>,
<a name="l00045"></a>00045            <span class="keywordtype">bool</span>                      <a class="code" href="classFlowCanvas_1_1Module.html#a12fc00455335223024822d4aaf8fabc9">show_port_labels</a> = <span class="keyword">true</span>);
<a name="l00046"></a>00046 
<a name="l00047"></a>00047     <span class="keyword">virtual</span> <a class="code" href="classFlowCanvas_1_1Module.html#ae1b5a057173db8166db2aa103eef2f39">~Module</a>();
<a name="l00048"></a>00048 
<a name="l00049"></a><a class="code" href="classFlowCanvas_1_1Module.html#a9aa54528c0e9b108452d42a283042fdf">00049</a>     <span class="keyword">const</span> <a class="code" href="namespaceFlowCanvas.html#a1a09529491924cbb61508cc9c63ea0a5">PortVector</a>&amp; <a class="code" href="classFlowCanvas_1_1Module.html#a9aa54528c0e9b108452d42a283042fdf">ports</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classFlowCanvas_1_1Module.html#ae33d8299a8a3b9607617c510628e930a">_ports</a>; }
<a name="l00050"></a><a class="code" href="classFlowCanvas_1_1Module.html#afd2dbbf0009bb5ee884fe9f88fc16446">00050</a>     <a class="code" href="namespaceFlowCanvas.html#a1a09529491924cbb61508cc9c63ea0a5">PortVector</a>&amp;       <a class="code" href="classFlowCanvas_1_1Module.html#afd2dbbf0009bb5ee884fe9f88fc16446">ports</a>()       { <span class="keywordflow">return</span> <a class="code" href="classFlowCanvas_1_1Module.html#ae33d8299a8a3b9607617c510628e930a">_ports</a>; }
<a name="l00051"></a>00051 
<a name="l00052"></a>00052     <span class="keyword">inline</span> boost::shared_ptr&lt;Port&gt; <a class="code" href="classFlowCanvas_1_1Module.html#a0dc5e1bdc29bd606c12b60781820c27e" title="Find a port on this module.">get_port</a>(<span class="keyword">const</span> std::string&amp; name) <span class="keyword">const</span>;
<a name="l00053"></a>00053 
<a name="l00054"></a>00054     <span class="keywordtype">void</span>                    <a class="code" href="classFlowCanvas_1_1Module.html#ae6b369a3f223f1371188fe2909882ae8">add_port</a>(boost::shared_ptr&lt;Port&gt; port);
<a name="l00055"></a>00055     <span class="keywordtype">void</span>                    <a class="code" href="classFlowCanvas_1_1Module.html#a210825e18c0733a0b29bf0eccbb5461c">remove_port</a>(boost::shared_ptr&lt;Port&gt; port);
<a name="l00056"></a>00056     boost::shared_ptr&lt;Port&gt; <a class="code" href="classFlowCanvas_1_1Module.html#abe980286d8be89cdb0a2c185ac3e503a">port_at</a>(<span class="keywordtype">double</span> x, <span class="keywordtype">double</span> y);
<a name="l00057"></a>00057 
<a name="l00058"></a>00058     <span class="keywordtype">void</span> <a class="code" href="classFlowCanvas_1_1Module.html#a966f954faa8f59ddf34f12578b4619a2">zoom</a>(<span class="keywordtype">double</span> z);
<a name="l00059"></a>00059     <span class="keywordtype">void</span> <a class="code" href="classFlowCanvas_1_1Module.html#a6e717ec724b22e0b5f2e5d1efb2d14f6">resize</a>();
<a name="l00060"></a>00060 
<a name="l00061"></a><a class="code" href="classFlowCanvas_1_1Module.html#a12fc00455335223024822d4aaf8fabc9">00061</a>     <span class="keywordtype">bool</span> <a class="code" href="classFlowCanvas_1_1Module.html#a12fc00455335223024822d4aaf8fabc9">show_port_labels</a>(<span class="keywordtype">bool</span> b) { <span class="keywordflow">return</span> <a class="code" href="classFlowCanvas_1_1Module.html#ae70dfdf2347fbc2ff09769f8fea49ab7">_show_port_labels</a>; }
<a name="l00062"></a>00062     <span class="keywordtype">void</span> <a class="code" href="classFlowCanvas_1_1Module.html#a623d7fc652dea372a8f567a9dbc88291">set_show_port_labels</a>(<span class="keywordtype">bool</span> b);
<a name="l00063"></a>00063 
<a name="l00064"></a>00064     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classFlowCanvas_1_1Module.html#a7968cf9fcfafd0c872ffcff17d671d57">move</a>(<span class="keywordtype">double</span> dx, <span class="keywordtype">double</span> dy);
<a name="l00065"></a>00065     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classFlowCanvas_1_1Module.html#a679ec56ebe235ef96307d0d2cd3658af">move_to</a>(<span class="keywordtype">double</span> x, <span class="keywordtype">double</span> y);
<a name="l00066"></a>00066 
<a name="l00067"></a>00067     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classFlowCanvas_1_1Module.html#a55f7ca3a8a6dc4a829bef8b2a3aa2564">set_name</a>(<span class="keyword">const</span> std::string&amp; n);
<a name="l00068"></a>00068 
<a name="l00069"></a><a class="code" href="classFlowCanvas_1_1Module.html#aba6aca69508b829591d8e920c23effea">00069</a>     <span class="keywordtype">double</span> <a class="code" href="classFlowCanvas_1_1Module.html#aba6aca69508b829591d8e920c23effea">border_width</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classFlowCanvas_1_1Module.html#a133070436aec248c15ae398d1055c255">_border_width</a>; }
<a name="l00070"></a>00070     <span class="keywordtype">void</span>   <a class="code" href="classFlowCanvas_1_1Module.html#a06a9662dd66bbcd30a785ed0c1337d6c">set_border_width</a>(<span class="keywordtype">double</span> w);
<a name="l00071"></a>00071 
<a name="l00072"></a>00072     <span class="keywordtype">void</span> <a class="code" href="classFlowCanvas_1_1Module.html#a5b7720246a8136256a766a34ba61a226">select_tick</a>();
<a name="l00073"></a>00073     <span class="keywordtype">void</span> <a class="code" href="classFlowCanvas_1_1Module.html#a96921e54784d816e8450d91bc04ae029">set_selected</a>(<span class="keywordtype">bool</span> b);
<a name="l00074"></a>00074 
<a name="l00075"></a>00075     <span class="keywordtype">void</span> <a class="code" href="classFlowCanvas_1_1Module.html#a9dee24df2a6442cec83ceae84c385b9e">set_highlighted</a>(<span class="keywordtype">bool</span> b);
<a name="l00076"></a>00076     <span class="keywordtype">void</span> <a class="code" href="classFlowCanvas_1_1Module.html#a808bc45299f8d00cf0c146f21a7b371a">set_border_color</a>(uint32_t c);
<a name="l00077"></a>00077     <span class="keywordtype">void</span> <a class="code" href="classFlowCanvas_1_1Module.html#a98d77137ecccef1c1c183058b8d8b589">set_base_color</a>(uint32_t c);
<a name="l00078"></a>00078     <span class="keywordtype">void</span> <a class="code" href="classFlowCanvas_1_1Module.html#a477d0484756025780de4bb03ed01e838">set_default_base_color</a>();
<a name="l00079"></a>00079     <span class="keywordtype">void</span> <a class="code" href="classFlowCanvas_1_1Module.html#acc77734d5817dec4f8742701e17a0307">set_stacked_border</a>(<span class="keywordtype">bool</span> b);
<a name="l00080"></a>00080     <span class="keywordtype">void</span> <a class="code" href="classFlowCanvas_1_1Module.html#a2e95f7e2aa4327edac2b310442868173">set_icon</a>(<span class="keyword">const</span> Glib::RefPtr&lt;Gdk::Pixbuf&gt;&amp; icon);
<a name="l00081"></a>00081 
<a name="l00082"></a><a class="code" href="classFlowCanvas_1_1Module.html#a2b5e82a87faf1a46ad835afa9d8dcba2">00082</a>     <span class="keywordtype">size_t</span> <a class="code" href="classFlowCanvas_1_1Module.html#a2b5e82a87faf1a46ad835afa9d8dcba2">num_ports</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classFlowCanvas_1_1Module.html#ae33d8299a8a3b9607617c510628e930a">_ports</a>.size(); }
<a name="l00083"></a>00083 
<a name="l00084"></a>00084     <span class="keywordtype">double</span> <a class="code" href="classFlowCanvas_1_1Module.html#a8d3a81825fc24bbaf23126b06b69a92f">empty_port_breadth</a>() <span class="keyword">const</span>;
<a name="l00085"></a>00085     <span class="keywordtype">double</span> <a class="code" href="classFlowCanvas_1_1Module.html#a1ea0a9cd7eaf21c97371dde50b5c7c79">empty_port_depth</a>() <span class="keyword">const</span>;
<a name="l00086"></a>00086 
<a name="l00087"></a>00087 <span class="keyword">protected</span>:
<a name="l00088"></a>00088     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classFlowCanvas_1_1Module.html#a38c5da99175878473a36cc4a76a3bf73">on_event</a>(GdkEvent* ev);
<a name="l00089"></a>00089 
<a name="l00090"></a>00090     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classFlowCanvas_1_1Module.html#a2988958b4097b9502e37933eee5ea051">set_width</a>(<span class="keywordtype">double</span> w);
<a name="l00091"></a>00091     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classFlowCanvas_1_1Module.html#a6624a55eec88f78b25aa500fcf7a387a">set_height</a>(<span class="keywordtype">double</span> h);
<a name="l00092"></a>00092 
<a name="l00093"></a>00093     <span class="keywordtype">void</span> <a class="code" href="classFlowCanvas_1_1Module.html#a4f7ee0dbb0d6d79d74f600a289f2d9b4">fit_canvas</a>();
<a name="l00094"></a>00094     <span class="keywordtype">void</span> <a class="code" href="classFlowCanvas_1_1Module.html#a59316d74ad3a085f0afadee2e2297e3d">measure_ports</a>();
<a name="l00095"></a>00095     <span class="keywordtype">void</span> <a class="code" href="classFlowCanvas_1_1Module.html#a0941919695739cc5e09e5cf1bfee54ac">resize_horiz</a>();
<a name="l00096"></a>00096     <span class="keywordtype">void</span> <a class="code" href="classFlowCanvas_1_1Module.html#a230f0e05ec913171009fab313ea10db6">resize_vert</a>();
<a name="l00097"></a>00097 
<a name="l00098"></a><a class="code" href="classFlowCanvas_1_1Module.html#a9e1ca8b63eaf7f478b778ca1417b1bdc">00098</a>     <span class="keywordtype">void</span> <a class="code" href="classFlowCanvas_1_1Module.html#a9e1ca8b63eaf7f478b778ca1417b1bdc">port_renamed</a>() { <a class="code" href="classFlowCanvas_1_1Module.html#a2fdbd18e40aab2faab8ff05f22b18041">_port_renamed</a> = <span class="keyword">true</span>; }
<a name="l00099"></a>00099 
<a name="l00100"></a>00100     <span class="keywordtype">void</span> <a class="code" href="classFlowCanvas_1_1Module.html#a127ac93fb4132117238e97527e326e05">embed</a>(Gtk::Container* widget);
<a name="l00101"></a>00101 
<a name="l00102"></a><a class="code" href="classFlowCanvas_1_1Module.html#a133070436aec248c15ae398d1055c255">00102</a>     <span class="keywordtype">double</span> <a class="code" href="classFlowCanvas_1_1Module.html#a133070436aec248c15ae398d1055c255">_border_width</a>;
<a name="l00103"></a><a class="code" href="classFlowCanvas_1_1Module.html#a18b10689637d351b725a02e5a6471ff2">00103</a>     <span class="keywordtype">bool</span>   <a class="code" href="classFlowCanvas_1_1Module.html#a18b10689637d351b725a02e5a6471ff2">_title_visible</a>;
<a name="l00104"></a><a class="code" href="classFlowCanvas_1_1Module.html#a8c17d01f0e485cc9f42ec781f5b75126">00104</a>     <span class="keywordtype">double</span> <a class="code" href="classFlowCanvas_1_1Module.html#a8c17d01f0e485cc9f42ec781f5b75126">_embed_width</a>;
<a name="l00105"></a><a class="code" href="classFlowCanvas_1_1Module.html#a7482b6af54943af39ce3f9fc89c874f6">00105</a>     <span class="keywordtype">double</span> <a class="code" href="classFlowCanvas_1_1Module.html#a7482b6af54943af39ce3f9fc89c874f6">_embed_height</a>;
<a name="l00106"></a><a class="code" href="classFlowCanvas_1_1Module.html#afc9707d8f6808d7a88c84f5e35432002">00106</a>     <span class="keywordtype">double</span> <a class="code" href="classFlowCanvas_1_1Module.html#afc9707d8f6808d7a88c84f5e35432002">_icon_size</a>;
<a name="l00107"></a><a class="code" href="classFlowCanvas_1_1Module.html#a2fdbd18e40aab2faab8ff05f22b18041">00107</a>     <span class="keywordtype">bool</span>   <a class="code" href="classFlowCanvas_1_1Module.html#a2fdbd18e40aab2faab8ff05f22b18041">_port_renamed</a>;
<a name="l00108"></a><a class="code" href="classFlowCanvas_1_1Module.html#af66b147bb79b86078e7be263b6e3cc5e">00108</a>     <span class="keywordtype">double</span> <a class="code" href="classFlowCanvas_1_1Module.html#af66b147bb79b86078e7be263b6e3cc5e">_widest_input</a>;
<a name="l00109"></a><a class="code" href="classFlowCanvas_1_1Module.html#aa6d26c781f0b92a9cab7fec9ec783af4">00109</a>     <span class="keywordtype">double</span> <a class="code" href="classFlowCanvas_1_1Module.html#aa6d26c781f0b92a9cab7fec9ec783af4">_widest_output</a>;
<a name="l00110"></a><a class="code" href="classFlowCanvas_1_1Module.html#ae70dfdf2347fbc2ff09769f8fea49ab7">00110</a>     <span class="keywordtype">bool</span>   <a class="code" href="classFlowCanvas_1_1Module.html#ae70dfdf2347fbc2ff09769f8fea49ab7">_show_port_labels</a>;
<a name="l00111"></a><a class="code" href="classFlowCanvas_1_1Module.html#abc39372ae5b9264fe94158136154992c">00111</a>     <span class="keywordtype">double</span> <a class="code" href="classFlowCanvas_1_1Module.html#abc39372ae5b9264fe94158136154992c">_title_width</a>;
<a name="l00112"></a><a class="code" href="classFlowCanvas_1_1Module.html#a973e7ce0cd6ed8cbe21ea487a8d04824">00112</a>     <span class="keywordtype">double</span> <a class="code" href="classFlowCanvas_1_1Module.html#a973e7ce0cd6ed8cbe21ea487a8d04824">_title_height</a>;
<a name="l00113"></a>00113 
<a name="l00114"></a><a class="code" href="classFlowCanvas_1_1Module.html#ae33d8299a8a3b9607617c510628e930a">00114</a>     <a class="code" href="namespaceFlowCanvas.html#a1a09529491924cbb61508cc9c63ea0a5">PortVector</a> <a class="code" href="classFlowCanvas_1_1Module.html#ae33d8299a8a3b9607617c510628e930a">_ports</a>;
<a name="l00115"></a>00115 
<a name="l00116"></a><a class="code" href="classFlowCanvas_1_1Module.html#a8799ca58c4bec2dcfe414ce105c92642">00116</a>     Gnome::Canvas::Rect    <a class="code" href="classFlowCanvas_1_1Module.html#a8799ca58c4bec2dcfe414ce105c92642">_module_box</a>;
<a name="l00117"></a><a class="code" href="classFlowCanvas_1_1Module.html#a3dc8b06e60c421454534c657199c5243">00117</a>     Gnome::Canvas::Text    <a class="code" href="classFlowCanvas_1_1Module.html#a3dc8b06e60c421454534c657199c5243">_canvas_title</a>;
<a name="l00118"></a><a class="code" href="classFlowCanvas_1_1Module.html#a5dd926141c226ed45a2e342f4fb39260">00118</a>     Gnome::Canvas::Rect*   <a class="code" href="classFlowCanvas_1_1Module.html#a5dd926141c226ed45a2e342f4fb39260">_stacked_border</a>;
<a name="l00119"></a><a class="code" href="classFlowCanvas_1_1Module.html#aa9a5c39e14c916e3187db3b13bf76580">00119</a>     Gnome::Canvas::Pixbuf* <a class="code" href="classFlowCanvas_1_1Module.html#aa9a5c39e14c916e3187db3b13bf76580">_icon_box</a>;
<a name="l00120"></a><a class="code" href="classFlowCanvas_1_1Module.html#a279c86076878fedd94eeab21ae01d092">00120</a>     Gtk::Container*        <a class="code" href="classFlowCanvas_1_1Module.html#a279c86076878fedd94eeab21ae01d092">_embed_container</a>;
<a name="l00121"></a><a class="code" href="classFlowCanvas_1_1Module.html#a4091b404959330adba535758e9f0380d">00121</a>     Gnome::Canvas::Widget* <a class="code" href="classFlowCanvas_1_1Module.html#a4091b404959330adba535758e9f0380d">_embed_item</a>;
<a name="l00122"></a>00122 
<a name="l00123"></a>00123 <span class="keyword">private</span>:
<a name="l00124"></a><a class="code" href="classFlowCanvas_1_1Module.html#a9816083e25bae0b2f472e19382136687">00124</a>     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classFlowCanvas_1_1Canvas.html" title="The &amp;#39;master&amp;#39; canvas widget which contains all other objects.">Canvas</a>;
<a name="l00125"></a>00125 
<a name="l00126"></a>00126     <span class="keyword">struct </span>PortComparator {
<a name="l00127"></a>00127         PortComparator(<span class="keyword">const</span> std::string&amp; name) : <a class="code" href="classFlowCanvas_1_1Item.html#af5987a9ca3b4e49445d996d3db4ee645">_name</a>(name) {}
<a name="l00128"></a>00128         <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator()(<span class="keyword">const</span> boost::shared_ptr&lt;Port&gt; port)
<a name="l00129"></a>00129             { <span class="keywordflow">return</span> (port &amp;&amp; port-&gt;name() == <a class="code" href="classFlowCanvas_1_1Item.html#af5987a9ca3b4e49445d996d3db4ee645">_name</a>); }
<a name="l00130"></a>00130         <span class="keyword">const</span> std::string&amp; <a class="code" href="classFlowCanvas_1_1Item.html#af5987a9ca3b4e49445d996d3db4ee645">_name</a>;
<a name="l00131"></a>00131     };
<a name="l00132"></a>00132 
<a name="l00133"></a>00133     <span class="keywordtype">void</span> embed_size_request(Gtk::Requisition* req, <span class="keywordtype">bool</span> force);
<a name="l00134"></a>00134 };
<a name="l00135"></a>00135 
<a name="l00136"></a>00136 
<a name="l00137"></a>00137 
<a name="l00138"></a>00138 <span class="comment">// Performance critical functions:</span>
<a name="l00139"></a>00139 
<a name="l00140"></a>00140 
<a name="l00142"></a>00142 <span class="keyword">inline</span> boost::shared_ptr&lt;Port&gt;
<a name="l00143"></a><a class="code" href="classFlowCanvas_1_1Module.html#a0dc5e1bdc29bd606c12b60781820c27e">00143</a> <a class="code" href="classFlowCanvas_1_1Module.html#a0dc5e1bdc29bd606c12b60781820c27e" title="Find a port on this module.">Module::get_port</a>(<span class="keyword">const</span> std::string&amp; port_name)<span class="keyword"> const</span>
<a name="l00144"></a>00144 <span class="keyword"></span>{
<a name="l00145"></a>00145     PortComparator comp(port_name);
<a name="l00146"></a>00146     PortVector::const_iterator i = std::find_if(<a class="code" href="classFlowCanvas_1_1Module.html#ae33d8299a8a3b9607617c510628e930a">_ports</a>.begin(), <a class="code" href="classFlowCanvas_1_1Module.html#ae33d8299a8a3b9607617c510628e930a">_ports</a>.end(), comp);
<a name="l00147"></a>00147     <span class="keywordflow">return</span> (i != <a class="code" href="classFlowCanvas_1_1Module.html#ae33d8299a8a3b9607617c510628e930a">_ports</a>.end()) ? *i : boost::shared_ptr&lt;Port&gt;();
<a name="l00148"></a>00148 }
<a name="l00149"></a>00149 
<a name="l00150"></a>00150 
<a name="l00151"></a>00151 } <span class="comment">// namespace FlowCanvas</span>
<a name="l00152"></a>00152 
<a name="l00153"></a>00153 <span class="preprocessor">#endif // FLOWCANVAS_MODULE_HPP</span>
</pre></div></div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Sep 30 2010 for FlowCanvas by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>