Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 29c369053a983cc5d8c880dc6e0a2237 > files > 773

libdtn-devel-2.6.0-2mdv2009.1.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>DTN Reference Implementation: BundleList.h 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.5.8 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="main.html"><span>Main&nbsp;Page</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="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
    </ul>
  </div>
<h1>BundleList.h</h1><a href="bundling_2BundleList_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> *    Copyright 2004-2006 Intel Corporation</span>
<a name="l00003"></a>00003 <span class="comment"> * </span>
<a name="l00004"></a>00004 <span class="comment"> *    Licensed under the Apache License, Version 2.0 (the "License");</span>
<a name="l00005"></a>00005 <span class="comment"> *    you may not use this file except in compliance with the License.</span>
<a name="l00006"></a>00006 <span class="comment"> *    You may obtain a copy of the License at</span>
<a name="l00007"></a>00007 <span class="comment"> * </span>
<a name="l00008"></a>00008 <span class="comment"> *        http://www.apache.org/licenses/LICENSE-2.0</span>
<a name="l00009"></a>00009 <span class="comment"> * </span>
<a name="l00010"></a>00010 <span class="comment"> *    Unless required by applicable law or agreed to in writing, software</span>
<a name="l00011"></a>00011 <span class="comment"> *    distributed under the License is distributed on an "AS IS" BASIS,</span>
<a name="l00012"></a>00012 <span class="comment"> *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span>
<a name="l00013"></a>00013 <span class="comment"> *    See the License for the specific language governing permissions and</span>
<a name="l00014"></a>00014 <span class="comment"> *    limitations under the License.</span>
<a name="l00015"></a>00015 <span class="comment"> */</span>
<a name="l00016"></a>00016 
<a name="l00017"></a>00017 <span class="preprocessor">#ifndef _BUNDLE_LIST_H_</span>
<a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor">#define _BUNDLE_LIST_H_</span>
<a name="l00019"></a>00019 <span class="preprocessor"></span>
<a name="l00020"></a>00020 <span class="preprocessor">#include &lt;list&gt;</span>
<a name="l00021"></a>00021 <span class="preprocessor">#include &lt;oasys/compat/inttypes.h&gt;</span>
<a name="l00022"></a>00022 <span class="preprocessor">#include &lt;oasys/thread/Notifier.h&gt;</span>
<a name="l00023"></a>00023 
<a name="l00024"></a>00024 <span class="preprocessor">#include "<a class="code" href="BundleRef_8h.html">BundleRef.h</a>"</span>
<a name="l00025"></a>00025 <span class="preprocessor">#include "<a class="code" href="EndpointID_8h.html">naming/EndpointID.h</a>"</span>
<a name="l00026"></a>00026 <span class="preprocessor">#include "<a class="code" href="GbofId_8h.html">GbofId.h</a>"</span>
<a name="l00027"></a>00027 
<a name="l00028"></a><a class="code" href="namespaceoasys.html">00028</a> <span class="keyword">namespace </span>oasys {
<a name="l00029"></a>00029 <span class="keyword">class </span>SpinLock;
<a name="l00030"></a>00030 }
<a name="l00031"></a>00031 
<a name="l00032"></a>00032 <span class="keyword">namespace </span>dtn {
<a name="l00033"></a>00033 
<a name="l00034"></a>00034 <span class="keyword">class </span>Bundle;
<a name="l00035"></a>00035 <span class="keyword">class </span>BundleTimestamp;
<a name="l00036"></a>00036 
<a name="l00067"></a><a class="code" href="classdtn_1_1BundleList.html">00067</a> <span class="keyword">class </span><a class="code" href="classdtn_1_1BundleList.html" title="List structure for handling bundles.">BundleList</a> : <span class="keyword">public</span> oasys::<a class="code" href="classoasys_1_1Logger.html">Logger</a> {
<a name="l00068"></a>00068 <span class="keyword">private</span>:
<a name="l00073"></a><a class="code" href="classdtn_1_1BundleList.html#95d1259601419d0c4147ac12d4f1f736">00073</a>     <span class="keyword">typedef</span> std::list&lt;Bundle*&gt; <a class="code" href="classdtn_1_1BundleList.html#95d1259601419d0c4147ac12d4f1f736" title="Type for the list itself (private since it&amp;#39;s irrelevant to the outside).">List</a>;
<a name="l00074"></a>00074 
<a name="l00075"></a>00075 <span class="keyword">public</span>:
<a name="l00081"></a><a class="code" href="classdtn_1_1BundleList.html#1d52b8d6bb7d8a07e5d4f5fc4b5b61d2">00081</a>     <span class="keyword">typedef</span> List::iterator <a class="code" href="classdtn_1_1BundleList.html#1d52b8d6bb7d8a07e5d4f5fc4b5b61d2" title="Type for an iterator, which just wraps an stl iterator.">iterator</a>;
<a name="l00082"></a>00082 
<a name="l00086"></a>00086     <a class="code" href="classdtn_1_1BundleList.html#0ea669c5b8ab3dc87d18e1e8b9bf70ff" title="Constructor.">BundleList</a>(<span class="keyword">const</span> std::string&amp; <a class="code" href="classdtn_1_1BundleList.html#fe57f15c8a9270d90861739598390c78" title="Return the identifier name of this list.">name</a>, oasys::SpinLock* <a class="code" href="classdtn_1_1BundleList.html#0d0c9f789f0f7f7d1cda3b4ecf32d2bc" title="Return the internal lock on this list.">lock</a> = NULL);
<a name="l00087"></a>00087 
<a name="l00091"></a>00091     <span class="keyword">virtual</span> <a class="code" href="classdtn_1_1BundleList.html#aa529667435de9a1477d192630f75ab7" title="Destructor -- clears the list.">~BundleList</a>();
<a name="l00092"></a>00092 
<a name="l00098"></a>00098     <a class="code" href="namespacedtn.html#87094f3b26b9f1d469e616d311ae57b1" title="Class definition for a Bundle reference.">BundleRef</a> <a class="code" href="classdtn_1_1BundleList.html#3ff5877316c9c9c08b161b977e48b701" title="Peek at the first bundle on the list.">front</a>() <span class="keyword">const</span>;
<a name="l00099"></a>00099 
<a name="l00105"></a>00105     <a class="code" href="namespacedtn.html#87094f3b26b9f1d469e616d311ae57b1" title="Class definition for a Bundle reference.">BundleRef</a> <a class="code" href="classdtn_1_1BundleList.html#873df4500212eae079e89fdbfe855e92" title="Peek at the last bundle on the list.">back</a>() <span class="keyword">const</span>;
<a name="l00106"></a>00106 
<a name="l00110"></a>00110     <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1BundleList.html#6a51b84005fdf2d5c89ed5231de61cf8" title="Add a new bundle to the front of the list.">push_front</a>(<a class="code" href="classdtn_1_1Bundle.html" title="The internal representation of a bundle.">Bundle</a>* bundle);
<a name="l00111"></a>00111 
<a name="l00115"></a><a class="code" href="classdtn_1_1BundleList.html#ad10fc07ec2026eca6ad87f434ba2f18">00115</a>     <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1BundleList.html#6a51b84005fdf2d5c89ed5231de61cf8" title="Add a new bundle to the front of the list.">push_front</a>(<span class="keyword">const</span> <a class="code" href="namespacedtn.html#87094f3b26b9f1d469e616d311ae57b1" title="Class definition for a Bundle reference.">BundleRef</a>&amp; bundle)
<a name="l00116"></a>00116     {
<a name="l00117"></a>00117         <span class="keywordflow">return</span> <a class="code" href="classdtn_1_1BundleList.html#6a51b84005fdf2d5c89ed5231de61cf8" title="Add a new bundle to the front of the list.">push_front</a>(bundle.object());
<a name="l00118"></a>00118     }
<a name="l00119"></a>00119 
<a name="l00123"></a>00123     <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1BundleList.html#9f3efd0593739e89ed478fd4bbccd3e0" title="Add a new bundle to the back of the list.">push_back</a>(<a class="code" href="classdtn_1_1Bundle.html" title="The internal representation of a bundle.">Bundle</a>* bundle);
<a name="l00124"></a>00124 
<a name="l00128"></a><a class="code" href="classdtn_1_1BundleList.html#c57c60f97ecf647fe5f5e33308636c1c">00128</a>     <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1BundleList.html#9f3efd0593739e89ed478fd4bbccd3e0" title="Add a new bundle to the back of the list.">push_back</a>(<span class="keyword">const</span> <a class="code" href="namespacedtn.html#87094f3b26b9f1d469e616d311ae57b1" title="Class definition for a Bundle reference.">BundleRef</a>&amp; bundle)
<a name="l00129"></a>00129     {
<a name="l00130"></a>00130         <span class="keywordflow">return</span> <a class="code" href="classdtn_1_1BundleList.html#9f3efd0593739e89ed478fd4bbccd3e0" title="Add a new bundle to the back of the list.">push_back</a>(bundle.object());
<a name="l00131"></a>00131     }
<a name="l00132"></a>00132 
<a name="l00136"></a><a class="code" href="classdtn_1_1BundleList.html#d2d5945081bd01b79d0cc2763f777f9c">00136</a>     <span class="keyword">typedef</span> <span class="keyword">enum</span> {
<a name="l00137"></a><a class="code" href="classdtn_1_1BundleList.html#d2d5945081bd01b79d0cc2763f777f9c3d4fdc077df1797183a86a4fa1b5897d">00137</a>         <a class="code" href="classdtn_1_1BundleList.html#d2d5945081bd01b79d0cc2763f777f9c3d4fdc077df1797183a86a4fa1b5897d" title="Sort by bundle priority.">SORT_PRIORITY</a> = 0x1,    
<a name="l00138"></a><a class="code" href="classdtn_1_1BundleList.html#d2d5945081bd01b79d0cc2763f777f9cb2a2c26a05eb8ccc46223f08f368e744">00138</a>         <a class="code" href="classdtn_1_1BundleList.html#d2d5945081bd01b79d0cc2763f777f9cb2a2c26a05eb8ccc46223f08f368e744" title="Sort by fragment offset.">SORT_FRAG_OFFSET</a>        
<a name="l00139"></a>00139     } <a class="code" href="classdtn_1_1BundleList.html#d2d5945081bd01b79d0cc2763f777f9c" title="Type codes for sorted insertion.">sort_order_t</a>;
<a name="l00140"></a>00140         
<a name="l00144"></a>00144     <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1BundleList.html#b9b4a6a57883a5df56779c5ee633434f" title="Insert the given bundle sorted by the given sort method.">insert_sorted</a>(<a class="code" href="classdtn_1_1Bundle.html" title="The internal representation of a bundle.">Bundle</a>* bundle, <a class="code" href="classdtn_1_1BundleList.html#d2d5945081bd01b79d0cc2763f777f9c" title="Type codes for sorted insertion.">sort_order_t</a> sort_order);
<a name="l00145"></a>00145 
<a name="l00150"></a>00150     <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1BundleList.html#ed4600017614f1193d4781e1a1a34301" title="As a testing hook, insert the given bundle into a random location in the list.">insert_random</a>(<a class="code" href="classdtn_1_1Bundle.html" title="The internal representation of a bundle.">Bundle</a>* bundle);
<a name="l00151"></a>00151     
<a name="l00162"></a>00162     <a class="code" href="namespacedtn.html#87094f3b26b9f1d469e616d311ae57b1" title="Class definition for a Bundle reference.">BundleRef</a> <a class="code" href="classdtn_1_1BundleList.html#265a9efd0831be3094f815eed22aec42" title="Remove (and return) a reference to the first bundle on the list.">pop_front</a>(<span class="keywordtype">bool</span> used_notifier = <span class="keyword">false</span>);
<a name="l00163"></a>00163 
<a name="l00177"></a>00177     <a class="code" href="namespacedtn.html#87094f3b26b9f1d469e616d311ae57b1" title="Class definition for a Bundle reference.">BundleRef</a> <a class="code" href="classdtn_1_1BundleList.html#3429d8c70e63925609713c6d6fbd51fe" title="Remove (and return) the last bundle on the list.">pop_back</a>(<span class="keywordtype">bool</span> used_notifier = <span class="keyword">false</span>);
<a name="l00178"></a>00178 
<a name="l00186"></a>00186     <span class="keywordtype">bool</span> <a class="code" href="classdtn_1_1BundleList.html#b0171458e14d67307b74f98447062d68" title="Remove the given bundle from the list.">erase</a>(<a class="code" href="classdtn_1_1Bundle.html" title="The internal representation of a bundle.">Bundle</a>* bundle, <span class="keywordtype">bool</span> used_notifier = <span class="keyword">false</span>);
<a name="l00187"></a>00187 
<a name="l00188"></a><a class="code" href="classdtn_1_1BundleList.html#0cdc33c3f76b2ac3756d763fde42bd7e">00188</a>     <span class="keywordtype">bool</span> <a class="code" href="classdtn_1_1BundleList.html#0cdc33c3f76b2ac3756d763fde42bd7e">erase</a>(<span class="keyword">const</span> <a class="code" href="namespacedtn.html#87094f3b26b9f1d469e616d311ae57b1" title="Class definition for a Bundle reference.">BundleRef</a>&amp; bundle, <span class="keywordtype">bool</span> used_notifier = <span class="keyword">false</span>) {
<a name="l00189"></a>00189         <span class="keywordflow">return</span> <a class="code" href="classdtn_1_1BundleList.html#b0171458e14d67307b74f98447062d68" title="Remove the given bundle from the list.">erase</a>(bundle.object(), used_notifier);
<a name="l00190"></a>00190     }
<a name="l00191"></a>00191 
<a name="l00195"></a>00195     <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1BundleList.html#b0171458e14d67307b74f98447062d68" title="Remove the given bundle from the list.">erase</a>(<a class="code" href="classdtn_1_1BundleList.html#1d52b8d6bb7d8a07e5d4f5fc4b5b61d2" title="Type for an iterator, which just wraps an stl iterator.">iterator</a>&amp; iter, <span class="keywordtype">bool</span> used_notifier = <span class="keyword">false</span>);
<a name="l00196"></a>00196     
<a name="l00202"></a>00202     <span class="keywordtype">bool</span> <a class="code" href="classdtn_1_1BundleList.html#6398bb64194aa88b63e7d0e89e141883" title="Search the list for the given bundle.">contains</a>(<a class="code" href="classdtn_1_1Bundle.html" title="The internal representation of a bundle.">Bundle</a>* bundle) <span class="keyword">const</span>;
<a name="l00203"></a>00203 
<a name="l00209"></a><a class="code" href="classdtn_1_1BundleList.html#395f46f3d1551dc142e687d39d44058b">00209</a>     <span class="keywordtype">bool</span> <a class="code" href="classdtn_1_1BundleList.html#6398bb64194aa88b63e7d0e89e141883" title="Search the list for the given bundle.">contains</a>(<span class="keyword">const</span> <a class="code" href="namespacedtn.html#87094f3b26b9f1d469e616d311ae57b1" title="Class definition for a Bundle reference.">BundleRef</a>&amp; bundle)<span class="keyword"> const</span>
<a name="l00210"></a>00210 <span class="keyword">    </span>{
<a name="l00211"></a>00211         <span class="keywordflow">return</span> <a class="code" href="classdtn_1_1BundleList.html#6398bb64194aa88b63e7d0e89e141883" title="Search the list for the given bundle.">contains</a>(bundle.object());
<a name="l00212"></a>00212     }
<a name="l00213"></a>00213     
<a name="l00220"></a>00220     <a class="code" href="namespacedtn.html#87094f3b26b9f1d469e616d311ae57b1" title="Class definition for a Bundle reference.">BundleRef</a> <a class="code" href="classdtn_1_1BundleList.html#2958520b5b132bb3ed3f3e26c1eb295e" title="Search the list for a bundle with the given id.">find</a>(u_int32_t bundleid) <span class="keyword">const</span>;
<a name="l00221"></a>00221 
<a name="l00229"></a>00229     <a class="code" href="namespacedtn.html#87094f3b26b9f1d469e616d311ae57b1" title="Class definition for a Bundle reference.">BundleRef</a> <a class="code" href="classdtn_1_1BundleList.html#2958520b5b132bb3ed3f3e26c1eb295e" title="Search the list for a bundle with the given id.">find</a>(<span class="keyword">const</span> <a class="code" href="classdtn_1_1EndpointID.html">EndpointID</a>&amp; source_eid,
<a name="l00230"></a>00230                    <span class="keyword">const</span> <a class="code" href="structdtn_1_1BundleTimestamp.html" title="Simple struct definition for bundle creation timestamps.">BundleTimestamp</a>&amp; creation_ts) <span class="keyword">const</span>;
<a name="l00231"></a>00231 
<a name="l00237"></a>00237     <a class="code" href="namespacedtn.html#87094f3b26b9f1d469e616d311ae57b1" title="Class definition for a Bundle reference.">BundleRef</a> <a class="code" href="classdtn_1_1BundleList.html#2958520b5b132bb3ed3f3e26c1eb295e" title="Search the list for a bundle with the given id.">find</a>(<a class="code" href="classdtn_1_1GbofId.html" title="Class definition for a GBOF ID (Global Bundle Or Fragment ID).">GbofId</a>&amp; gbof_id) <span class="keyword">const</span>;
<a name="l00238"></a>00238     
<a name="l00245"></a>00245     <a class="code" href="namespacedtn.html#87094f3b26b9f1d469e616d311ae57b1" title="Class definition for a Bundle reference.">BundleRef</a> <a class="code" href="classdtn_1_1BundleList.html#2958520b5b132bb3ed3f3e26c1eb295e" title="Search the list for a bundle with the given id.">find</a>(<span class="keyword">const</span> <a class="code" href="classdtn_1_1GbofId.html" title="Class definition for a GBOF ID (Global Bundle Or Fragment ID).">GbofId</a>&amp; gbof_id,
<a name="l00246"></a>00246                    <span class="keyword">const</span> <a class="code" href="structdtn_1_1BundleTimestamp.html" title="Simple struct definition for bundle creation timestamps.">BundleTimestamp</a>&amp; extended_id) <span class="keyword">const</span>;
<a name="l00247"></a>00247 
<a name="l00251"></a>00251     <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1BundleList.html#af966a2b08526b4fee25b8890f7e5dcd" title="Move all bundles from this list to another.">move_contents</a>(<a class="code" href="classdtn_1_1BundleList.html" title="List structure for handling bundles.">BundleList</a>* other);
<a name="l00252"></a>00252 
<a name="l00256"></a>00256     <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1BundleList.html#3dfbaddbb0847b93c86e50190d173f63" title="Clear out the list.">clear</a>();
<a name="l00257"></a>00257 
<a name="l00261"></a>00261     <span class="keywordtype">size_t</span> <a class="code" href="classdtn_1_1BundleList.html#3c50c6f421631a4dd72b7b77b0660bc3" title="Return the size of the list.">size</a>() <span class="keyword">const</span>;
<a name="l00262"></a>00262 
<a name="l00266"></a>00266     <span class="keywordtype">bool</span> <a class="code" href="classdtn_1_1BundleList.html#3ca5e173510164b46c8de9a95147f20d" title="Return whether or not the list is empty.">empty</a>() <span class="keyword">const</span>;
<a name="l00267"></a>00267 
<a name="l00273"></a>00273     <a class="code" href="classdtn_1_1BundleList.html#1d52b8d6bb7d8a07e5d4f5fc4b5b61d2" title="Type for an iterator, which just wraps an stl iterator.">iterator</a> <a class="code" href="classdtn_1_1BundleList.html#24cd371acd62f2f9725ff3f92b55badf" title="Iterator used to iterate through the list.">begin</a>() <span class="keyword">const</span>;
<a name="l00274"></a>00274     
<a name="l00280"></a>00280     <a class="code" href="classdtn_1_1BundleList.html#1d52b8d6bb7d8a07e5d4f5fc4b5b61d2" title="Type for an iterator, which just wraps an stl iterator.">iterator</a> <a class="code" href="classdtn_1_1BundleList.html#19f95941fe436d25ba49ae0b2d8bf2c1" title="Iterator used to mark the end of the list.">end</a>() <span class="keyword">const</span>;
<a name="l00281"></a>00281 
<a name="l00285"></a><a class="code" href="classdtn_1_1BundleList.html#0d0c9f789f0f7f7d1cda3b4ecf32d2bc">00285</a>     oasys::SpinLock* <a class="code" href="classdtn_1_1BundleList.html#0d0c9f789f0f7f7d1cda3b4ecf32d2bc" title="Return the internal lock on this list.">lock</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classdtn_1_1BundleList.html#be75dd18cbd95df447ff602cedd3ba0b" title="lock for notifier">lock_</a>; }
<a name="l00286"></a>00286 
<a name="l00290"></a><a class="code" href="classdtn_1_1BundleList.html#fe57f15c8a9270d90861739598390c78">00290</a>     <span class="keyword">const</span> std::string&amp; <a class="code" href="classdtn_1_1BundleList.html#fe57f15c8a9270d90861739598390c78" title="Return the identifier name of this list.">name</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classdtn_1_1BundleList.html#2a113958b7214c732602d956bc99a2f9" title="name of the list">name_</a>; }
<a name="l00291"></a>00291 
<a name="l00295"></a>00295     <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1BundleList.html#463faba73c168a921d04e6e9d0aac756" title="Set the name (useful for classes that are unserialized).">set_name</a>(<span class="keyword">const</span> std::string&amp; <a class="code" href="classdtn_1_1BundleList.html#fe57f15c8a9270d90861739598390c78" title="Return the identifier name of this list.">name</a>);
<a name="l00296"></a>00296     
<a name="l00297"></a>00297 <span class="keyword">private</span>:
<a name="l00301"></a>00301     <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1BundleList.html#9c3bcf8d558346d1224b25869251f2ef" title="Helper routine to add a bundle at the indicated position.">add_bundle</a>(<a class="code" href="classdtn_1_1Bundle.html" title="The internal representation of a bundle.">Bundle</a>* bundle, <span class="keyword">const</span> <a class="code" href="classdtn_1_1BundleList.html#1d52b8d6bb7d8a07e5d4f5fc4b5b61d2" title="Type for an iterator, which just wraps an stl iterator.">iterator</a>&amp; pos);
<a name="l00302"></a>00302     
<a name="l00313"></a>00313     <a class="code" href="classdtn_1_1Bundle.html" title="The internal representation of a bundle.">Bundle</a>* <a class="code" href="classdtn_1_1BundleList.html#706792027fe0123f940bf2dadb842eb0" title="Helper routine to remove a bundle from the indicated position.">del_bundle</a>(<span class="keyword">const</span> <a class="code" href="classdtn_1_1BundleList.html#1d52b8d6bb7d8a07e5d4f5fc4b5b61d2" title="Type for an iterator, which just wraps an stl iterator.">iterator</a>&amp; pos, <span class="keywordtype">bool</span> used_notifier);
<a name="l00314"></a>00314     
<a name="l00315"></a><a class="code" href="classdtn_1_1BundleList.html#2a113958b7214c732602d956bc99a2f9">00315</a>     std::string      <a class="code" href="classdtn_1_1BundleList.html#2a113958b7214c732602d956bc99a2f9" title="name of the list">name_</a>;     
<a name="l00316"></a><a class="code" href="classdtn_1_1BundleList.html#2fa0c115e2436adbe8e03795c1fa2723">00316</a>     <a class="code" href="classdtn_1_1BundleList.html#95d1259601419d0c4147ac12d4f1f736" title="Type for the list itself (private since it&amp;#39;s irrelevant to the outside).">List</a>             <a class="code" href="classdtn_1_1BundleList.html#2fa0c115e2436adbe8e03795c1fa2723" title="underlying list data structure">list_</a>;     
<a name="l00317"></a>00317     
<a name="l00318"></a>00318 <span class="keyword">protected</span>:
<a name="l00319"></a><a class="code" href="classdtn_1_1BundleList.html#be75dd18cbd95df447ff602cedd3ba0b">00319</a>     oasys::SpinLock* <a class="code" href="classdtn_1_1BundleList.html#be75dd18cbd95df447ff602cedd3ba0b" title="lock for notifier">lock_</a>;     
<a name="l00320"></a><a class="code" href="classdtn_1_1BundleList.html#b42f8cdc7fa16407d38975d514009861">00320</a>     <span class="keywordtype">bool</span>             <a class="code" href="classdtn_1_1BundleList.html#b42f8cdc7fa16407d38975d514009861" title="bit to define lock ownership">own_lock_</a>; 
<a name="l00321"></a><a class="code" href="classdtn_1_1BundleList.html#bf8997bf56c3876e1bc96e8b2ce895e8">00321</a>     oasys::Notifier* <a class="code" href="classdtn_1_1BundleList.html#bf8997bf56c3876e1bc96e8b2ce895e8" title="notifier for blocking list">notifier_</a>; 
<a name="l00322"></a>00322 };
<a name="l00323"></a>00323 
<a name="l00330"></a><a class="code" href="classdtn_1_1BlockingBundleList.html">00330</a> <span class="keyword">class </span><a class="code" href="classdtn_1_1BlockingBundleList.html" title="A simple derivative to the BundleList class that hooks in an oasys Notifier, which...">BlockingBundleList</a> : <span class="keyword">public</span> <a class="code" href="classdtn_1_1BundleList.html" title="List structure for handling bundles.">BundleList</a> {
<a name="l00331"></a>00331 <span class="keyword">public</span>:
<a name="l00332"></a>00332     <a class="code" href="classdtn_1_1BlockingBundleList.html#c14d6077337e48362b390f2ea3f2e095">BlockingBundleList</a>(<span class="keyword">const</span> std::string&amp; <a class="code" href="classdtn_1_1BundleList.html#fe57f15c8a9270d90861739598390c78" title="Return the identifier name of this list.">name</a>);
<a name="l00333"></a>00333 
<a name="l00334"></a>00334     <span class="keyword">virtual</span> <a class="code" href="classdtn_1_1BlockingBundleList.html#ca722942b1031dae4a0c0012938297aa">~BlockingBundleList</a>();
<a name="l00335"></a>00335     
<a name="l00343"></a>00343     <a class="code" href="namespacedtn.html#87094f3b26b9f1d469e616d311ae57b1" title="Class definition for a Bundle reference.">BundleRef</a> <a class="code" href="classdtn_1_1BlockingBundleList.html#e26c8fce019eb0062f0cff1a03f4e2a3" title="Remove (and return) the first bundle on the list, blocking (potentially limited by...">pop_blocking</a>(<span class="keywordtype">int</span> timeout = -1);
<a name="l00344"></a>00344 
<a name="l00348"></a><a class="code" href="classdtn_1_1BlockingBundleList.html#77bf490a649453c36030dc6c8a359fe7">00348</a>     oasys::Notifier* <a class="code" href="classdtn_1_1BlockingBundleList.html#77bf490a649453c36030dc6c8a359fe7" title="Accessor for the internal notifier.">notifier</a>() { <span class="keywordflow">return</span> <a class="code" href="classdtn_1_1BundleList.html#bf8997bf56c3876e1bc96e8b2ce895e8" title="notifier for blocking list">notifier_</a>; }
<a name="l00349"></a>00349 };
<a name="l00350"></a>00350 
<a name="l00351"></a>00351 } <span class="comment">// namespace dtn</span>
<a name="l00352"></a>00352 
<a name="l00353"></a>00353 <span class="preprocessor">#endif </span><span class="comment">/* _BUNDLE_LIST_H_ */</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Fri Jan 30 09:26:52 2009 for DTN Reference Implementation by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
</body>
</html>